/* =========================================================
   TrueScanner SDK — landing page styles
   Light + flat green (no gradients) — "Soft Product" design,
   built on the BudgetAI design tokens.
   ========================================================= */

/* ----------------------- Design tokens ----------------------- */
:root {
  /* ===== BRAND ===== */
  --brand-green:        #11B887;    /* decorative only — reticle, dots, scanline.
                                       Fails AA for text/white-on-fill, so never
                                       use it to carry text. Use --brand-ink. */
  --brand-ink:          #0B7355;    /* AA-safe: 5.84:1 under white, 5.39:1 as text on --bg */
  --brand-ink-600:      #095E45;    /* hover  */
  --brand-ink-700:      #074A36;    /* active */
  --brand-green-600:    #17A77A;    /* darker press/hover */
  --brand-green-700:    #0F8A64;
  --brand-green-400:    #3FD2A3;
  --brand-green-100:    #D8F0E6;    /* soft tile/icon background */
  --brand-green-50:     #ECF8F3;    /* soft band background */
  --brand-green-disabled: #A9DFCC;

  --success:            #11B887;
  --danger:             #E74C3C;

  /* ===== NEUTRALS — LIGHT THEME ===== */
  --bg:                 #F5F6F7;
  --bg-elevated:        #FFFFFF;
  --bg-muted:           #ECEEF0;
  --border:             #E5E7E9;
  --border-strong:      #CDD2D6;
  --divider:            #EDEEF0;

  --fg:                 #0E0F12;
  --fg-strong:          #000000;
  --fg-muted:           #5C636A;
  --fg-subtle:          #8A9099;
  --fg-on-brand:        #FFFFFF;

  /* ===== TYPOGRAPHY ===== */
  --font-sans: 'Montserrat', ui-rounded, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;
  --fw-extrabold: 800;
  --fw-black:   900;

  --lh-tight:   1.2;
  --lh-snug:    1.3;
  --lh-normal:  1.45;
  --lh-relaxed: 1.6;
  --ls-caps:    0.08em;
  --ls-tight:   -0.01em;

  /* ===== RADII ===== */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* ===== SHADOWS ===== */
  --shadow-card:    0 1px 2px rgba(18, 24, 30, 0.04), 0 4px 10px rgba(18, 24, 30, 0.04);
  --shadow-card-lg: 0 2px 6px rgba(18, 24, 30, 0.05), 0 12px 28px rgba(18, 24, 30, 0.08);
  --shadow-button:  0 6px 16px rgba(11, 115, 85, 0.26);
  --shadow-focus:   0 0 0 3px rgba(11, 115, 85, 0.38);

  /* ===== MOTION ===== */
  --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:      140ms;
  --dur-base:      220ms;
  --dur-slow:      360ms;

  /* ===== PAGE TYPE SCALE ===== */
  --t-display: clamp(38px, 5.4vw, 64px);
  --t-h2:      clamp(28px, 3.6vw, 42px);
  --t-h3:      20px;
  --t-lead:    clamp(16px, 1.6vw, 20px);
  --maxw:      1160px;
  --gutter:    clamp(20px, 5vw, 56px);

  color-scheme: light;
}

/* ----------------------- Base ----------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--lh-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

/* ----------------------- Buttons ----------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 26px;
  border-radius: var(--r-pill);
  border: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--fg-on-brand);
  transition: transform var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--brand-ink); box-shadow: var(--shadow-button); }
.btn-primary:hover  { background: var(--brand-ink-600); transform: translateY(-1px); }
.btn-primary:active { background: var(--brand-ink-700); transform: translateY(0) scale(.99); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--brand-ink);
  border: 1.5px solid var(--brand-ink);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--brand-green-50); }
.btn-sm { height: 44px; padding: 0 20px; font-size: 15px; }

/* Keyboard focus — one ring, every interactive element. */
.btn:focus-visible,
.nav-links a:focus-visible,
.lang a:focus-visible,
.store-badge:focus-visible,
.brand:focus-visible,
.sub-form input:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 3px;
  border-radius: var(--r-pill);
}
.store-badge:focus-visible { border-radius: 12px; }

/* ----------------------- NAV ----------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-standard),
              background var(--dur-base) var(--ease-standard);
}
.nav.scrolled { border-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); }

.nav-inner {
  height: 74px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
/* The PNG carries ~20% transparent padding top and bottom, so the visible
   mark renders at ~0.6x the box. 50px box => ~30px mark, inside the 74px bar. */
.brand-logo { height: 50px; width: auto; }
.brand-name-img { height: 20px; width: auto; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 15px; font-weight: var(--fw-semibold); color: var(--fg-muted);
  transition: color var(--dur-fast) var(--ease-standard);
}
.nav-links a:hover { color: var(--fg); }

/* language toggle (server-rendered links) */
.lang {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--r-pill);
  padding: 3px; gap: 2px; background: var(--bg-elevated);
}
.lang a {
  font-family: var(--font-sans); font-weight: var(--fw-bold); font-size: 13px;
  letter-spacing: 0.04em; color: var(--fg-muted);
  padding: 6px 12px; border-radius: var(--r-pill);
  transition: all var(--dur-fast) var(--ease-standard);
}
.lang a.active { background: var(--brand-ink); color: #fff; }

/* ----------------------- Headings ----------------------- */
h1, h2, h3 { letter-spacing: -0.02em; }
.section-head { max-width: 640px; }
.section-head h2 { font-size: var(--t-h2); font-weight: var(--fw-extrabold); line-height: 1.08; }
.section-head .lead { font-size: var(--t-lead); color: var(--fg-muted); margin-top: 16px; line-height: 1.5; }

/* ----------------------- HERO ----------------------- */
.hero { padding-top: clamp(48px, 7vw, 90px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-copy h1 {
  font-size: var(--t-display); font-weight: var(--fw-black);
  line-height: 1.04;
}
.hero-copy .lead {
  font-size: var(--t-lead); color: var(--fg-muted);
  margin: 22px 0 0; max-width: 30em; line-height: 1.5;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* platform row */
.platforms { margin-top: 30px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.platforms .pf-label {
  font-size: 12px; font-weight: var(--fw-bold); letter-spacing: var(--ls-caps);
  text-transform: uppercase; color: var(--fg-muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 14px; font-size: 13.5px; font-weight: var(--fw-semibold);
  background: var(--brand-green-100); color: var(--brand-ink); border: 0;
  border-radius: var(--r-pill);
}

/* Hero right: phone device with live video + scan reticle */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.device-stage { position: relative; }
.phone {
  position: relative;
  width: 300px; height: 600px;
  background: #0E0F12; border-radius: 46px;
  padding: 11px;
  box-shadow: 0 30px 70px rgba(18,24,30,.22), 0 8px 22px rgba(18,24,30,.12);
}
/* Dynamic Island — floating, symmetric pill */
.phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 112px; height: 28px; background: #0E0F12; border-radius: 999px; z-index: 4;
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 36px; overflow: hidden; background: var(--bg);
}
.phone-screen img,
.phone-screen video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* scan reticle overlay */
.reticle { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.reticle .frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 80%; aspect-ratio: 3/4;
}
.reticle .corner {
  position: absolute; width: 34px; height: 34px;
  border: 3.5px solid var(--brand-green); border-radius: 6px;
}
.reticle .corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle .corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle .corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle .corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.reticle .scanline {
  position: absolute; left: 4%; right: 4%; height: 3px; border-radius: 3px;
  background: var(--brand-green);
  box-shadow: 0 0 16px 3px color-mix(in srgb, var(--brand-green) 70%, transparent);
  top: 8%;
  animation: scan 2.6s var(--ease-standard) infinite;
}
@keyframes scan { 0%,100% { top: 8%; } 50% { top: 90%; } }
@media (prefers-reduced-motion: reduce) { .reticle .scanline { animation: none; top: 50%; } }
.reticle .pill {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: rgba(14,15,18,.74); color: #fff; backdrop-filter: blur(4px);
  font-size: 12px; font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 14px; border-radius: var(--r-pill); display: inline-flex; gap: 7px; align-items: center;
}
.reticle .pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-green); }

/* ----------------------- VIDEO SHOWCASE ----------------------- */
.showcase { padding: clamp(40px, 6vw, 80px) 0; }
.showcase-inner {
  background: var(--bg-elevated); border-radius: var(--r-xl);
  box-shadow: var(--shadow-card); padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 4vw, 56px); align-items: center;
}
.showcase-video-col { display: flex; justify-content: center; }
.showcase-copy h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: var(--fw-extrabold); line-height: 1.12; }
.showcase-copy .lead { color: var(--fg-muted); font-size: var(--t-lead); margin: 16px 0 26px; line-height: 1.5; }

.video-slot {
  position: relative; width: 100%; max-width: 296px; aspect-ratio: 9 / 16;
  border-radius: var(--r-xl); overflow: hidden; background: var(--bg);
  box-shadow: var(--shadow-card-lg); border: 7px solid #0E0F12;
}
.video-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* ----------------------- FEATURES ----------------------- */
.features { padding: clamp(48px, 7vw, 96px) 0; }
.features .section-head { margin-inline: auto; text-align: center; }
.feature-grid {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  position: relative;
  background: var(--bg-elevated); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 28px;
  transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-lg); }
.feature-card .ic-tile {
  width: 54px; height: 54px; border-radius: var(--r-md);
  background: var(--brand-green-100); color: var(--brand-ink);
  display: grid; place-items: center; margin-bottom: 20px;
}
.feature-card .ic-tile svg { width: 27px; height: 27px; }
.feature-card h3 { font-size: var(--t-h3); font-weight: var(--fw-bold); }
.feature-card p { margin-top: 10px; color: var(--fg-muted); font-size: 15px; line-height: 1.55; }

/* ----------------------- TRY IT — store badges band ----------------------- */
.tryit { padding: clamp(40px, 5vw, 72px) 0; }
.tryit-inner {
  background: var(--brand-green-50); border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 64px); text-align: center;
}
.tryit-inner h2 { font-size: clamp(26px, 3vw, 38px); font-weight: var(--fw-extrabold); }
.tryit-inner .lead { color: var(--fg-muted); font-size: var(--t-lead); margin: 14px auto 30px; max-width: 36em; }
.store-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #0E0F12; color: #fff; border-radius: 12px;
  padding: 11px 20px; min-width: 196px; transition: transform var(--dur-fast) var(--ease-standard);
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge span { display: flex; flex-direction: column; align-items: flex-start; }
.store-badge .sb-t { font-size: 10px; line-height: 1; letter-spacing: .03em; opacity: .82; text-transform: uppercase; }
.store-badge .sb-b { font-size: 18px; font-weight: var(--fw-bold); line-height: 1.15; margin-top: 3px; }

/* ----------------------- SUBSCRIBE ----------------------- */
.subscribe { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 100px); }
.subscribe-card { max-width: 720px; margin: 0 auto; text-align: center; }
.subscribe-card h2 { font-size: clamp(28px, 3.4vw, 44px); font-weight: var(--fw-extrabold); line-height: 1.08; }
.subscribe-card .lead { color: var(--fg-muted); font-size: var(--t-lead); margin: 16px auto 32px; max-width: 34em; }
.sub-form { display: flex; gap: 12px; max-width: 520px; margin: 0 auto; }
.sub-form input {
  flex: 1; height: 54px; border-radius: var(--r-pill); border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated); padding: 0 22px; font-family: var(--font-sans); font-size: 16px; color: var(--fg);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.sub-form input::placeholder { color: var(--fg-subtle); }
.sub-form input:focus { outline: 0; border-color: var(--brand-ink); box-shadow: var(--shadow-focus); }
.sub-form input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(231,76,60,.18); }
.sub-note { margin-top: 16px; font-size: 13px; color: var(--fg-muted); }
.sub-success {
  display: none; align-items: center; justify-content: center; gap: 10px;
  margin-top: 22px; color: var(--brand-ink); font-weight: var(--fw-bold); font-size: 16px;
}
.sub-success.show { display: inline-flex; }
.sub-success svg { width: 22px; height: 22px; }

/* ----------------------- FOOTER ----------------------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .brand-logo { height: 46px; }
.footer .brand-name-img { height: 18px; }
.footer .copy { font-size: 13.5px; color: var(--fg-muted); }

/* ----------------------- Responsive ----------------------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: 2; }
  .showcase-inner { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  /* hero already carries the primary CTA — drop the redundant nav button */
  .nav .btn-primary.btn-sm { display: none; }
  .nav-inner { gap: 12px; }
  .brand-name-img { height: 16px; }
  .brand-logo { height: 42px; }
  /* The device is the most product-specific thing on the page, so it stays on
     mobile — scaled down rather than dropped. */
  .phone { width: 232px; height: 464px; border-radius: 36px; padding: 8px; }
  .phone::before { top: 17px; width: 86px; height: 21px; }
  .phone-screen { border-radius: 28px; }
  .reticle .corner { width: 26px; height: 26px; border-width: 3px; }
  .reticle .pill { bottom: 16px; font-size: 11px; padding: 6px 12px; }
  /* smaller buttons on mobile */
  .btn { height: 48px; padding: 0 18px; font-size: 14px; }
  .btn svg { width: 17px; height: 17px; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 160px; }
  .sub-form { flex-direction: column; }
  /* column layout makes flex-basis act on height — reset flex so height applies */
  .sub-form input { flex: 0 0 auto; height: 68px; }
  .sub-form .btn { width: 100%; }
}
