/* =============================================================================
   247Aisupports — LIGHT premium theme (adopted from Lovable "voice-ai-stride")
   F0 design system. Tokens per WEB-ENHANCEMENT-PLAN.md §9.7.3 (verbatim, OKLCH).
   Self-authored — no new CDN origin. Pair with Google Fonts (Inter + Inter Tight)
   in each page <head>; CSP already allows fonts.googleapis.com + fonts.gstatic.com.
   ============================================================================= */

:root {
  /* Surfaces (light) */
  --background:         oklch(100% 0 0);          /* #ffffff  page */
  --surface:           oklch(98.5% .005 270);     /* ~#f9f9fb soft section bg */
  --card:              oklch(100% 0 0);           /* #ffffff  card */
  --card-foreground:   oklch(18% .03 270);        /* ~#1b1b22 text on card */
  --popover:           oklch(100% 0 0);
  --muted:             oklch(97% .008 270);        /* ~#f4f4f6 muted surface */
  --muted-foreground:  oklch(50% .02 270);         /* ~#6c6c78 muted text */
  --accent:            oklch(96% .02 305);         /* ~#f1ecf8 accent surface (tint) */
  --accent-foreground: oklch(25% .06 295);         /* ~#33235e text on accent */

  /* Text */
  --foreground:        oklch(18% .03 270);         /* ~#1b1b22 primary text (NOT pure black) */

  /* Brand accent — indigo -> violet -> magenta (KEEP) */
  --primary:           oklch(55.5% .245 295);      /* ~#7b3fe4 violet — primary CTA / ring */
  --primary-foreground:oklch(99% 0 0);             /* ~#fcfcfc text on primary */
  --secondary:         oklch(66% .235 305);        /* ~#a64de0 secondary violet */
  --secondary-foreground:oklch(99% 0 0);
  --magenta:           oklch(66% .29 325);         /* ~#d840d0 magenta accent (gradient end) */
  --glow:              oklch(83% .13 330);         /* ~#f0a6e6 soft glow */

  /* Lines / states */
  --border:            oklch(92% .01 270);         /* ~#e6e6ea hairline border */
  --input:             oklch(92% .01 270);
  --ring:              oklch(55.5% .245 295);      /* focus ring = primary */
  --destructive:       oklch(60% .24 27);          /* ~#e2483d red */
  --destructive-foreground:oklch(99% 0 0);
  --success:           oklch(62% .17 150);         /* ~#1fa463 positive/live indicator */

  /* Gradients */
  --gradient-brand:    linear-gradient(135deg, var(--primary), var(--magenta));
  --gradient-soft:     linear-gradient(180deg, oklch(100% 0 0), oklch(98% .02 310));
  --gradient-radial:   radial-gradient(60% 60% at 50% 0%,
                         color-mix(in oklab, var(--primary) 18%, transparent), transparent 70%);

  /* Shadows (soft layered depth — the "premium light" feel) */
  --shadow-card:    0 1px 2px #1118270a, 0 8px 24px -12px #11182714;
  --shadow-glow:    0 30px 80px -20px color-mix(in oklab, var(--primary) 35%, transparent);
  --shadow-elegant: 0 20px 60px -20px color-mix(in oklab, var(--primary) 25%, transparent),
                    0 2px 6px #1118270a;

  /* Radius scale (Lovable base .875rem = 14px) */
  --radius:    .875rem;                    /* 14px = "lg" */
  --radius-sm: calc(var(--radius) - 4px);  /* 10px */
  --radius-md: calc(var(--radius) - 2px);  /* 12px */
  --radius-xl: calc(var(--radius) + 4px);  /* 18px */
  --radius-2xl:calc(var(--radius) + 8px);  /* 22px */
  --radius-3xl:calc(var(--radius) + 12px); /* 26px */

  /* Type */
  --font-display: "Inter Tight", ui-sans-serif, system-ui, sans-serif; /* headings 500–800 */
  --font-sans:    "Inter", ui-sans-serif, system-ui, sans-serif;       /* body 400–700 */
  --tracking-tight: -.02em;

  /* Layout / motion */
  --container: 1200px;
  --section-y: clamp(56px, 8vw, 112px);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Base / reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 .5em;
  color: var(--foreground);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
p  { margin: 0 0 1rem; color: var(--muted-foreground); }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.section   { padding-block: var(--section-y); }
.section--soft { background: var(--surface); }
.eyebrow   { display:inline-block; font-family:var(--font-display); font-weight:600; font-size:.8125rem;
             letter-spacing:.04em; text-transform:uppercase; color:var(--primary); margin-bottom:.75rem; }
.gradient-text { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted-foreground); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .8rem 1.4rem; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--gradient-brand); color: var(--primary-foreground); box-shadow: var(--shadow-elegant); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn--ghost { background: var(--card); color: var(--foreground); border-color: var(--border); box-shadow: var(--shadow-card); }
.btn--ghost:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--primary) 40%, var(--border)); }
.btn--lg { padding: 1rem 1.75rem; font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card); padding: 1.75rem;
}
.card--glow { box-shadow: var(--shadow-elegant); }
.feature-card .icon, .stat .icon {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: grid; place-items: center; margin-bottom: 1rem;
  background: var(--accent); color: var(--accent-foreground);
}
.stat__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1; }
.stat__label { color: var(--muted-foreground); font-size: .95rem; margin-top: .35rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-foreground); border: 1px solid var(--border);
}
.badge--brand { background: color-mix(in oklab, var(--primary) 12%, white); color: var(--primary); border-color: color-mix(in oklab, var(--primary) 30%, var(--border)); }
.badge--live  { background: color-mix(in oklab, var(--success) 14%, white); color: var(--success); border-color: color-mix(in oklab, var(--success) 30%, var(--border)); }
.badge--live .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }

/* ---------- Nav / footer (shared shells) ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--background) 88%, transparent);
       backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }
.nav__links a { color: var(--muted-foreground); font-weight: 500; font-size: .95rem; }
.nav__links a:hover { color: var(--foreground); text-decoration: none; }
.footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 3rem; color: var(--muted-foreground); }
.footer a { color: var(--muted-foreground); }
.footer a:hover { color: var(--foreground); }

/* ---------- Pricing card ---------- */
.pricing-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 2rem; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.pricing-card--featured { border-color: color-mix(in oklab, var(--primary) 45%, var(--border)); box-shadow: var(--shadow-elegant); position: relative; }
.pricing-card__price { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: 1; margin: .5rem 0; }
.pricing-card__price small { font-size: 1rem; font-weight: 500; color: var(--muted-foreground); }
.pricing-card ul { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: .6rem; }
.pricing-card li { display: flex; gap: .6rem; align-items: flex-start; color: var(--foreground); font-size: .95rem; }

/* ---------- Comparison table ---------- */
.compare { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-card); }
.compare th, .compare td { padding: .9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); }
.compare thead th { font-family: var(--font-display); background: var(--surface); }

/* ---------- Accordion (FAQ) ---------- */
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: none; border: 0; padding: 1.1rem 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--foreground); cursor: pointer; text-align: left; }
.accordion__trigger .chevron { transition: transform .25s var(--ease); flex: none; }
.accordion__item[aria-expanded="true"] .chevron, .accordion__trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.accordion__panel { overflow: hidden; height: 0; }
.accordion__panel-inner { padding-bottom: 1.1rem; color: var(--muted-foreground); }

/* ---------- Hero waveform / float (always-on motion) ---------- */
.waveform { display: inline-flex; align-items: flex-end; gap: 3px; height: 28px; }
.waveform span { width: 4px; height: 100%; border-radius: 2px; background: var(--gradient-brand); transform-origin: bottom; animation: wave-pulse 1.2s var(--ease) infinite; }
.float-slow { animation: float-slow 6s ease-in-out infinite; }
.shimmer { background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--primary) 18%, transparent), transparent);
           background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }

/* ---------- Keyframes (CSS-only, zero deps) ---------- */
@keyframes float-slow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes wave-pulse { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
@keyframes shimmer    { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse      { 50% { opacity: .5; } }

/* ---------- Scroll reveal (REPLAYS on enter AND exit; see public/js/reveal.js) ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); will-change: opacity, transform; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }

/* ---------- Grid utility ---------- */
.grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Reduced motion: kill all non-essential animation, render reveals in place ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
