/* ============================================================
   PREVIEWMYPRODUCT — DESIGN SYSTEM & CSS VARIABLES
   Based on: Dribbble Equipay AI Enterprise Design
   For: ProductPreview by Vernovision (Pty) Ltd
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ────────────────────────────────────────────────────────────── */
:root {
  /* ── PRIMARY PALETTE ── */
  --color-orange:        #FE6E27;    /* Primary accent — CTAs, highlights */
  --color-orange-hover:  #E55E1A;    /* Orange darkened for hover states */
  --color-green:         #00F57E;    /* Secondary accent — buttons, tags */
  --color-green-hover:   #00D66E;    /* Green darkened for hover */
  --color-yellow:        #FEF220;    /* Tertiary accent — banners, callouts */
  --color-yellow-hover:  #E5D91C;

  /* ── NEUTRALS ── */
  --color-black:         #1E1D1B;    /* Rich warm black (NOT pure #000) */
  --color-dark-brown:    #242021;    /* Dark brown-black for text */
  --color-warm-gray:     #6E6755;    /* Muted text, captions */
  --color-light-gray:    #F0EFEB;    /* Section backgrounds, cards */
  --color-off-white:     #FFFFF5;    /* Page background — warm off-white */
  --color-white:         #FFFFFF;    /* Pure white for contrast panels */

  /* ── SEMANTIC COLORS ── */
  --color-text-primary:    var(--color-dark-brown);
  --color-text-secondary:  var(--color-warm-gray);
  --color-text-on-dark:    var(--color-off-white);
  --color-text-on-orange:  var(--color-black);
  --color-text-on-green:   var(--color-black);
  --color-bg-page:         var(--color-off-white);
  --color-bg-dark:         var(--color-black);
  --color-bg-card:         var(--color-white);
  --color-bg-muted:        var(--color-light-gray);

  /* ── TYPOGRAPHY ── */
  --font-display:  'Anton', 'Impact', 'Arial Black', sans-serif;
  --font-body:     'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Font Sizes — Fluid scale */
  --text-hero:     clamp(2.45rem, 5.6vw, 4.9rem);     /* Hero headlines */
  --text-h1:       clamp(1.75rem, 3.5vw, 3.15rem);   /* Section headlines */
  --text-h2:       clamp(2rem, 4vw, 3.5rem);      /* Sub-headlines */
  --text-h3:       clamp(1.32rem, 2.4vw, 1.68rem);  /* Card titles */
  --text-body:     clamp(1rem, 1.2vw, 1.125rem);  /* Body copy */
  --text-small:    clamp(0.8rem, 1vw, 0.9rem);    /* Captions, labels */
  --text-nav:      0.875rem;                        /* Nav links */

  /* ── SPACING ── */
  --space-xs:    0.5rem;    /* 8px */
  --space-sm:    1rem;      /* 16px */
  --space-md:    1.5rem;    /* 24px */
  --space-lg:    2.5rem;    /* 40px */
  --space-xl:    4rem;      /* 64px */
  --space-2xl:   6rem;      /* 96px */
  --space-3xl:   8rem;      /* 128px */

  --section-padding:  clamp(3.5rem, 7vw, 6.75rem) 0;
  --container-max:    1408px;
  --container-wide:   1584px;

  /* ── BORDERS & RADIUS ── */
  --radius-none:   0;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-pill:   999px;          /* Pill-shaped buttons */

  /* ── SHADOWS ── */
  --shadow-sm:    0 1px 3px rgba(30, 29, 27, 0.08);
  --shadow-md:    0 4px 12px rgba(30, 29, 27, 0.12);
  --shadow-lg:    0 8px 32px rgba(30, 29, 27, 0.16);

  /* ── TRANSITIONS ── */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
}


/* ──────────────────────────────────────────────────────────────
   2. RESET & BASE
   ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }


/* ──────────────────────────────────────────────────────────────
   3. TYPOGRAPHY CLASSES
   ────────────────────────────────────────────────────────────── */

/* Display headlines — Anton, uppercase, tight tracking */
.heading-hero,
.heading-h1,
.heading-h2,
.heading-h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.2;
  letter-spacing: 1px;
  color: var(--color-text-primary);
}

.heading-hero { font-size: var(--text-hero); }
.heading-h1   { font-size: var(--text-h1); }
.heading-h2   { font-size: var(--text-h2); }
.heading-h3   { font-size: var(--text-h3); }

/* On dark backgrounds */
.heading-hero.on-dark,
.heading-h1.on-dark,
.heading-h2.on-dark,
.heading-h3.on-dark {
  color: var(--color-text-on-dark);
}

/* Body text */
.body-text {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-primary);
  max-width: 60ch; /* Readable line length */
}

.body-text.on-dark {
  color: var(--color-text-on-dark);
  opacity: 0.85;
}

.text-small {
  font-family: var(--font-body);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--color-text-secondary);
}


/* ──────────────────────────────────────────────────────────────
   4. LAYOUT
   ────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--sm {
  max-width: 800px;
}

.container--md {
  max-width: 1000px;
}

/* Section base */
.section {
  padding: var(--section-padding);
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

.section--orange {
  background-color: var(--color-orange);
  color: var(--color-text-on-orange);
}

.section--yellow {
  background-color: var(--color-yellow);
  color: var(--color-text-on-orange);
}

.section--green {
  background-color: var(--color-green);
  color: var(--color-text-on-green);
}

.section--muted {
  background-color: var(--color-bg-muted);
}

/* Grid — simple two-column split */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (max-width: 768px) {
  .grid-2col { grid-template-columns: 1fr; }
}

/* Grid — three column for features/cards */
.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .grid-3col { grid-template-columns: 1fr; }
}

/* 4 Column Grid for Footer */
.grid-4col {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .grid-4col { grid-template-columns: 1fr; }
}

/* 4 Equal Column Grid for Pricing */
.grid-4col-equal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .grid-4col-equal { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-4col-equal { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────────────────────────────
   5. COMPONENTS
   ────────────────────────────────────────────────────────────── */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.btn-arrow::after {
  content: '→';
  font-size: 1.1em;
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* Primary — Green pill (like the Dribbble CTA) */
.btn--primary {
  background-color: var(--color-green);
  color: var(--color-black);
  border-color: var(--color-green);
}
.btn--primary:hover {
  background-color: var(--color-green-hover);
  border-color: var(--color-green-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Secondary — Dark pill */
.btn--secondary {
  background-color: var(--color-black);
  color: var(--color-off-white);
  border-color: var(--color-black);
}
.btn--secondary:hover {
  background-color: var(--color-dark-brown);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline — Transparent with border */
.btn--outline {
  background-color: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-dark-brown);
}
.btn--outline:hover {
  background-color: var(--color-black);
  color: var(--color-off-white);
}

/* Outline on dark */
.btn--outline-light {
  background-color: transparent;
  color: var(--color-off-white);
  border-color: var(--color-off-white);
}
.btn--outline-light:hover {
  background-color: var(--color-off-white);
  color: var(--color-black);
}

/* Orange CTA */
.btn--orange {
  background-color: var(--color-orange);
  color: var(--color-black);
  border-color: var(--color-orange);
}
.btn--orange:hover {
  background-color: var(--color-orange-hover);
  border-color: var(--color-orange-hover);
  transform: translateY(-1px);
}


/* ── NAVBAR ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) clamp(1.5rem, 5vw, 4rem);
  background-color: var(--color-off-white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid rgba(110, 103, 85, 0.3);
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.navbar__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.navbar__links a {
  font-family: var(--font-body);
  font-size: 1.05rem; /* Increased by 20% from 0.875rem */
  font-weight: 700;
  transition: color var(--duration-fast);
}

.navbar__links a:hover {
  color: var(--color-orange);
}


/* ── CARDS ── */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}


/* ── IMAGE PLACEHOLDER ── */
.img-placeholder {
  background: var(--color-light-gray);
  border-radius: var(--radius-md);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-sm);
}

.img-placeholder--tall { aspect-ratio: 3/4; }
.img-placeholder--square { aspect-ratio: 1/1; }
.img-placeholder--wide { aspect-ratio: 21/9; }

.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ── LOGO BAR ── */
.logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
  padding: var(--space-lg) clamp(1.5rem, 5vw, 4rem);
  border-top: 1px solid var(--color-light-gray);
  border-bottom: 1px solid var(--color-light-gray);
  background-color: var(--color-off-white);
}

.logo-bar__label {
  width: 100%;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.logo-bar__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.logo-box {
  background: var(--color-light-gray);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--color-warm-gray);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.7;
  transition: opacity var(--duration-normal);
}

.logo-box:hover {
  opacity: 1;
}

.logo-bar img,
.logo-bar svg {
  height: 32px;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity var(--duration-normal);
}

.logo-bar img:hover,
.logo-bar svg:hover {
  opacity: 1;
}


/* ── PRICING CARDS ── */
.pricing-card {
  background: var(--color-bg-card);
  border: 2px solid var(--color-light-gray);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.pricing-card--featured {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  border-color: var(--color-orange);
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.pricing-card:hover {
  border-color: var(--color-orange);
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  text-transform: uppercase;
}

.pricing-card__period {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pricing-card__features {
  list-style: none;
  margin: var(--space-lg) 0;
  text-align: left;
  flex-grow: 1;
}

.pricing-card__features li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-light-gray);
  font-size: var(--text-body);
}

.pricing-card--featured .pricing-card__features li {
  border-bottom-color: rgba(255,255,255,0.1);
}

.pricing-card__features li::before {
  content: '✓ ';
  color: var(--color-green);
  font-weight: 700;
}


/* ── STEP COUNTER (How it Works) ── */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-orange);
  color: var(--color-black);
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}


/* ── FAQ ACCORDION ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  background: var(--color-bg-card);
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--duration-fast);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: block;
  padding: var(--space-md) calc(var(--space-lg) + 2rem) var(--space-md) var(--space-lg);
  font-family: var(--font-body);
  font-size: calc(var(--text-h3) * 0.8);
  font-weight: 700;
  color: var(--color-text-primary);
  cursor: pointer;
  position: relative;
  list-style: none; /* Hide default arrow */
}

/* Custom arrow for summary */
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--color-orange);
  transition: transform var(--duration-fast);
}

.faq-item[open] .faq-question::after {
  content: '−';
  transform: translateY(-50%) rotate(180deg);
}

.faq-item[open] .faq-question {
  border-bottom: 1px solid var(--color-light-gray);
  color: var(--color-orange);
}

.faq-answer {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-page);
  border-top: 1px solid var(--color-light-gray);
  animation: fadeIn var(--duration-fast) var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────
   6. UTILITY CLASSES
   ────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-green);
  color: var(--color-black);
  margin-bottom: var(--space-sm);
}

.icon-circle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-link {
  transition: color var(--duration-fast);
}

.contact-link:hover {
  color: var(--color-orange);
}

.mt-auto { margin-top: auto; }

.mt-xs  { margin-top: var(--space-xs); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs  { margin-bottom: var(--space-xs); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }


/* ──────────────────────────────────────────────────────────────
   7. RESPONSIVE BREAKPOINTS
   ────────────────────────────────────────────────────────────── */
/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: clamp(3rem, 6vw, 4.25rem) 0;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar__links { display: none; } /* Hamburger menu needed */
  .pricing-card--featured { transform: scale(1); }
  
  .navbar {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-image {
    width: 100% !important;
  }

  .grid-4col {
    text-align: center;
  }
  .grid-4col > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .order-first-mobile {
    order: -1;
  }
}

/* Footer styling */
.footer-link {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-warm-gray);
  margin-bottom: var(--space-xs);
  display: block;
  transition: color var(--duration-fast);
}

.footer-link:hover {
  color: var(--color-orange);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--color-off-white);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────────────
   8. ANIMATIONS & SCROLL EFFECTS
   ────────────────────────────────────────────────────────────── */

/* Base Initial States */
.animate-fade-up,
.animate-fade-in,
.animate-slide-left,
.animate-slide-right {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 1.04s var(--ease-out), transform 1.04s var(--ease-out);
}

.animate-fade-up {
  transform: translateY(40px);
}

.animate-slide-left {
  transform: translateX(-40px);
}

.animate-slide-right {
  transform: translateX(40px);
}

/* Delay modifiers */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Visible State (triggered by JS) */
.animate-fade-up.is-visible,
.animate-slide-left.is-visible,
.animate-slide-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

.animate-fade-in.is-visible {
  opacity: 1;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .animate-fade-in,
  .animate-slide-left,
  .animate-slide-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ──────────────────────────────────────────────────────────────
   9. FORMS
   ────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-md);
  text-align: left;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-primary);
  background-color: var(--color-off-white);
  border: 1px solid var(--color-light-gray);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 2px rgba(254, 110, 39, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-input--dark,
.form-select.form-input--dark,
.form-textarea--dark {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-off-white);
}

.form-input--dark:focus,
.form-select.form-input--dark:focus,
.form-textarea--dark:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 2px rgba(254, 110, 39, 0.2);
}

.form-select.form-input--dark option {
  background-color: var(--color-black);
  color: var(--color-off-white);
}
