/* ============================================================
   SmartTaka AI — main.css
   Profile: AI_DATA_EDITORIAL — deep ink + warm parchment,
   rich green (#0E6B45) + copper (#B0642F), editorial financial
   data presentation, oversized Bengali display type.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #F6F2E7;            /* warm parchment */
  --surface: #FDFBF4;       /* card */
  --surface-2: #EDE7D5;     /* raised band */
  --border: #DCD3BB;
  --ink: #1C2420;           /* deep ink text */
  --muted: #434A42;         /* secondary text — 7:1+ on every light ground */
  --accent: #0E6B45;        /* rich green */
  --accent-hover: #0A5236;
  --accent-tint: #DEEBDF;
  --copper: #B0642F;
  --copper-deep: #8F4E1F;
  --copper-tint: #F3E3D0;
  --ink-panel: #14201A;     /* deep ink data panel */
  --ink-panel-2: #1C2C24;
  --on-ink: #F2EEE1;
  --on-ink-muted: #B9C4B4;

  --font-display: 'Noto Serif Bengali', 'Hind Siliguri', serif;
  --font-body: 'Hind Siliguri', system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(38, 46, 34, .07), 0 2px 6px rgba(38, 46, 34, .06);
  --shadow-md: 0 1px 2px rgba(38, 46, 34, .07), 0 10px 26px rgba(38, 46, 34, .11);
  --shadow-lg: 0 2px 4px rgba(38, 46, 34, .08), 0 20px 48px rgba(38, 46, 34, .16);

  --container: 1200px;
  /* motion scale (transitions.dev) */
  --duration-fast: .15s;
  --duration-medium: .2s;
  --duration-slower: .25s;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --grid-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='1.4' cy='1.4' r='1.15' fill='%230E6B45' fill-opacity='.13'/%3E%3C/svg%3E");
  --grid-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M44 .5H.5V44' fill='none' stroke='%230E6B45' stroke-opacity='.09'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe, video, canvas { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.32; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.22; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.3; }
h3 { font-size: 1.22rem; line-height: 1.45; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: .45em; }
strong { font-weight: 700; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
main { display: block; }
.icon { width: 22px; height: 22px; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 18px; border-radius: var(--r-sm); font-weight: 600;
  transition: top var(--duration-fast) var(--ease-smooth-out);
}
.skip-link:focus { top: 12px; text-decoration: none; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; border-radius: 4px; }

/* editorial section rhythm */
.section { padding: clamp(48px, 7vw, 88px) 0; position: relative; }
.section--tint { background: var(--surface-2); }
.section--inkband { background: var(--ink-panel); color: var(--on-ink); }
.section--inkband h2, .section--inkband h3 { color: var(--on-ink); }
.section--grid-bg { background-image: var(--grid-line); background-color: var(--surface); }
.section-head { max-width: 760px; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.section--inkband .section-head p { color: var(--on-ink-muted); }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  color: var(--copper-deep); border: 1px solid var(--copper); border-radius: 999px;
  padding: 3px 14px; margin-bottom: 14px; letter-spacing: .02em; background: var(--copper-tint);
}
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.3;
  border-radius: 10px; padding: 12px 26px; min-height: 48px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); transition: background-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); transition: background-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out); }
.btn-outline:hover { background: var(--accent-tint); transform: translateY(-2px); transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out); }
.btn-copper { background: var(--copper); color: #fff; transition: background-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out); }
.btn-copper:hover { background: var(--copper-deep); transform: translateY(-2px); transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out), background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out); }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.08rem; padding: 14px 32px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 242, 231, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration-medium) var(--ease-smooth-out);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; text-decoration: none !important; }
.brand .logo-svg { width: 208px; height: auto; display: block; }
.brand-fallback { font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.main-nav { margin-left: auto; }
.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--ink);
  background: none; border: 0; border-radius: var(--r-sm); padding: 10px 13px; cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-smooth-out);
}
.nav-trigger:hover { background: var(--accent-tint); }
.nav-trigger .icon-caret { width: 16px; height: 16px; transition: transform var(--duration-medium) var(--ease-smooth-out); }
.nav-item { position: relative; }
.nav-item.is-open .nav-trigger .icon-caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 110;
  min-width: 262px; max-width: 340px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: 8px;
  opacity: 0; transform: translateY(8px); visibility: hidden; pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), visibility var(--duration-fast);
}
.dropdown.align-right { left: auto; right: 0; }
.nav-item.is-open .dropdown { opacity: 1; transform: translateY(0); visibility: visible; pointer-events: auto; transition: opacity var(--duration-slower) var(--ease-smooth-out), transform var(--duration-slower) var(--ease-smooth-out), visibility var(--duration-slower); }
.dropdown::before {
  content: ""; position: absolute; top: -5px; left: 26px; width: 10px; height: 10px;
  background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border);
  transform: rotate(45deg);
}
.dropdown.align-right::before { left: auto; right: 26px; }
.dropdown ul { list-style: none; margin: 0; padding: 0; max-height: min(62vh, 520px); overflow-y: auto; }
.dropdown a {
  display: block; padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--ink); font-weight: 500; font-size: .98rem;
  transition: background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out);
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--accent-tint); color: var(--ink); text-decoration: none; }
.btn-header { flex: none; }
.nav-burger {
  display: none; background: none; border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px; cursor: pointer; color: var(--ink);
}
.nav-burger .icon-close { display: none; }
.nav-burger[aria-expanded="true"] .icon-menu { display: none; }
.nav-burger[aria-expanded="true"] .icon-close { display: block; }

/* mobile nav */
.mobile-nav { border-top: 1px solid var(--border); background: var(--bg); padding: 18px 0 26px; }
.mobile-nav .btn { margin-top: 16px; }
.mobile-group { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.mobile-group summary {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  padding: 12px 16px; font-weight: 600; font-size: 1.02rem; list-style: none;
}
.mobile-group summary::-webkit-details-marker { display: none; }
.mobile-group summary .icon { width: 18px; height: 18px; transition: transform var(--duration-medium) var(--ease-smooth-out); }
.mobile-group[open] summary .icon { transform: rotate(180deg); }
.mobile-group ul { list-style: none; margin: 0; padding: 4px 10px 12px; }
.mobile-group ul a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink); font-size: .98rem; transition: background-color var(--duration-fast) var(--ease-smooth-out), color var(--duration-fast) var(--ease-smooth-out); }
.mobile-group ul a:hover { background: var(--accent-tint); text-decoration: none; }

/* ---------- ticker row ---------- */
.ticker-row { border-bottom: 1px solid var(--border); background: var(--surface); }

/* ---------- home hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--bg);
  padding: clamp(40px, 5vw, 64px) 0 clamp(48px, 5vw, 72px);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grid-dot); background-size: 26px 26px;
  opacity: .55; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(1100px 520px at 82% 8%, rgba(14, 107, 69, .12), transparent 62%),
              radial-gradient(760px 420px at 8% 92%, rgba(176, 100, 47, .10), transparent 58%);
}
.hero .container { position: relative; z-index: 2; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.hero h1 { margin-bottom: .4em; max-width: 18ch; font-size: clamp(1.95rem, 3.9vw, 2.9rem); }
.hero h1 .accent-run { color: var(--accent); }
.hero-lead { font-size: 1.04rem; color: var(--muted); max-width: 58ch; margin-bottom: 18px; }
.hero-kicker {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-weight: 600; font-size: .95rem; color: var(--copper-deep);
}
.hero-kicker::before { content: ""; width: 34px; height: 2px; background: var(--copper); border-radius: 2px; }
.hero-flags { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; flex-wrap: wrap; }
.hero-flags .caption { font-size: .95rem; color: var(--muted); font-weight: 600; margin-right: 2px; }
.flag-chip { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.flag-chip .flag { width: 26px; height: 19px; border-radius: 4px; overflow: hidden; display: block; box-shadow: inset 0 0 0 1px rgba(28, 36, 32, .08); }
.flag-chip .flag svg { width: 100%; height: 100%; display: block; }
.hero-trust { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-trust a {
  display: inline-flex; align-items: flex-start; gap: 10px;
  padding: 6px 2px; font-weight: 600; font-size: .95rem; color: var(--ink);
  text-decoration: none !important; border-bottom: 2px solid transparent;
  transition: border-bottom-color var(--duration-fast) var(--ease-smooth-out);
}
.hero-trust a:hover { border-bottom-color: var(--accent); }
.hero-trust .icon { width: 26px; height: 26px; color: var(--accent); }
.hero-trust small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; line-height: 1.35; }

/* hero market strip (GSAP motif + static fallback) */
.hero-market {
  margin-top: 22px; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--ink-panel); box-shadow: var(--shadow-md); overflow: hidden; position: relative;
}
.hero-market__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid rgba(242, 238, 225, .14);
  font-size: .82rem; color: var(--on-ink-muted); font-weight: 600;
}
.hero-market__bar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); margin-right: 7px; box-shadow: 0 0 0 3px rgba(176, 100, 47, .25); }
.hero-market canvas { display: block; width: 100%; height: 185px; }
.hero-market svg.hero-market-static { display: block; width: 100%; height: 185px; }

/* hero side form */
.hero-form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: clamp(20px, 3vw, 30px);
  position: relative;
}
.hero-form-card::before {
  content: ""; position: absolute; inset: 8px; border: 1px dashed rgba(14, 107, 69, .22);
  border-radius: calc(var(--r-xl) - 6px); pointer-events: none;
}
.form-heading { font-family: var(--font-display); font-size: 1.28rem; margin: 0 0 4px; }
.form-sub { font-size: .92rem; color: var(--muted); margin: 0 0 14px; }

/* ---------- formFactory block ---------- */
.form-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-md); padding: clamp(18px, 3vw, 28px);
}
/* inside a hero form card the block must not add a second card surface */
.hero-form-card .form-block, .so-hero .form-block { background: transparent; border: 0; box-shadow: none; padding: 0; }
/* formFactory placeholder contrast (its bundle ships a 3.3:1 grey; AA needs 4.5:1) */
.form-block ::placeholder, .hero-form-card ::placeholder { color: #5f6459; opacity: 1; }
.form-block__intro { font-size: 1rem; color: var(--ink); margin: 0 0 12px; font-weight: 500; }
.form-legal { font-size: .85rem; color: var(--muted); margin: 12px 0 0; line-height: 1.6; }
.form-block form { margin: 0; }
.form-block input[type="text"],
.form-block input[type="email"],
.form-block input[type="tel"],
.form-block input[type="password"] {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; min-height: 48px; margin: 0 0 12px;
  transition: border-color var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out);
}
.form-block input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 107, 69, .16); outline: none; }
.form-block input::placeholder { color: #5f6459; }
.form-block input[type="submit"] {
  width: 100%; font-family: var(--font-body); font-size: 1.04rem; font-weight: 700;
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 13px 20px; min-height: 50px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out);
}
.form-block input[type="submit"]:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.form-block input[type="submit"]:active { transform: translateY(0); }
.form-note-under { font-size: .92rem; color: var(--copper-deep); font-weight: 600; margin: 10px 0 0; display: flex; gap: 8px; align-items: baseline; }
.form-note-under .icon { width: 17px; height: 17px; transform: translateY(3px); }

/* ---------- generic page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background: var(--surface); padding: clamp(38px, 5vw, 66px) 0;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grid-line); opacity: .8; pointer-events: none;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 420px at 88% 0%, rgba(14, 107, 69, .10), transparent 60%),
              radial-gradient(700px 380px at 0% 100%, rgba(176, 100, 47, .09), transparent 55%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: clamp(26px, 4vw, 52px); align-items: start; }
.page-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: .4em; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }
.page-hero--photo .page-hero__media { position: relative; }
.page-hero--photo .page-hero__media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.page-hero--photo .page-hero__media figcaption { display: none; }

/* breadcrumbs */
.breadcrumbs { border-bottom: 1px solid var(--border); background: var(--surface-2); padding: 11px 0; font-size: .9rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; color: var(--border); font-weight: 700; }
.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- cards & icon badges ---------- */
.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-tint); color: var(--accent);
}
.icon-badge .icon { width: 26px; height: 26px; }
.icon-badge--copper { background: var(--copper-tint); color: var(--copper-deep); }
.icon-badge--ink { background: var(--ink-panel); color: var(--on-ink); }
/* stacked badge+h3 cards (security block, faq "read more" cards): icon and
   heading share a row — side-by-side like .card-head, not the generic AI tile-stack */
.card:has(> .icon-badge + h3) { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon title" "body body"; column-gap: 14px; row-gap: 10px; }
.card:has(> .icon-badge + h3) > .icon-badge { grid-area: icon; align-self: center; width: 46px; height: 46px; }
.card:has(> .icon-badge + h3) > h3 { grid-area: title; margin: 0; align-self: center; }
.card:has(> .icon-badge + h3) > p { grid-area: body; margin: 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 24px;
  transition: transform var(--duration-medium) var(--ease-smooth-out), box-shadow var(--duration-medium) var(--ease-smooth-out), border-color var(--duration-medium) var(--ease-smooth-out);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(14, 107, 69, .35); }
.card h3 { margin: 14px 0 6px; }
.card p:last-child { margin-bottom: 0; }
.card-row { display: grid; gap: 20px; }
/* explicit columns at desktop — auto-fit left short last rows partly empty */
.card-row--3 { grid-template-columns: 1fr; }
.card-row--2 { grid-template-columns: 1fr; }
.card-row--4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
@media (min-width: 700px) {
  .card-row--2 { grid-template-columns: repeat(2, 1fr); }
  .card-row--2 > .card:last-child:nth-child(odd) { grid-column: 1 / -1; } /* 3rd/5th card: full-width closer */
  .card-row--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-row--3 { grid-template-columns: repeat(6, 1fr); }
  .card-row--3 > .card { grid-column: span 2; }
  /* 2 cards left in the last row (3+2, 6+2…): each spans half the row */
  .card-row--3 > .card:nth-last-child(2):nth-child(3n+4),
  .card-row--3 > .card:nth-last-child(2):nth-child(3n+4) ~ .card { grid-column: span 3; }
  /* single card left in the last row (4, 7…): full-width closer */
  .card-row--3 > .card:last-child:nth-child(3n+1):not(:first-child) { grid-column: 1 / -1; }
}
.card-head { display: flex; align-items: center; gap: 14px; }
.card-head h3 { margin: 0; }

/* numbered steps */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 22px; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); transition: transform var(--duration-medium) var(--ease-smooth-out), box-shadow var(--duration-medium) var(--ease-smooth-out); }
.step__num {
  counter-increment: step; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.step__num::before { content: counter(step); font-family: var(--font-body); }
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { font-size: .97rem; color: var(--muted); margin: 0; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .97rem; min-width: 560px; }
thead th {
  background: var(--surface-2); text-align: left; font-weight: 700; font-size: .92rem;
  padding: 13px 16px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(237, 231, 213, .38); }
.yes { color: var(--accent); font-weight: 700; }
.no { color: #A5402D; font-weight: 700; }
.cmp-col { background: var(--accent-tint); }

/* ---------- exchange strip ---------- */
.exchanges { padding: clamp(34px, 5vw, 54px) 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.exchanges .section-head { margin-bottom: 20px; }
.exchange-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.exchange-chip {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg); border-radius: 999px;
  padding: 9px 22px; color: #57604F; box-shadow: var(--shadow-sm);
  transition: color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out);
}
.exchange-chip:hover { color: var(--ink); border-color: var(--copper); transform: translateY(-2px); }
.exchange-chip img { height: 30px; width: auto; display: block; }

/* ---------- calculator section ---------- */
.calc-section { background: var(--surface-2); background-image: var(--grid-dot); background-size: 26px 26px; }
.calc-section .section-head { max-width: 800px; }
.calc-wrap { max-width: 920px; margin-inline: auto; }

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.review { display: flex; flex-direction: column; gap: 10px; }
.review__head { display: flex; align-items: center; gap: 13px; }
.review__avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: none; overflow: hidden;
  border: 2px solid var(--accent-tint); background: var(--accent-tint); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.review__avatar--copper { background: var(--copper-tint); border-color: var(--copper-tint); color: var(--copper-deep); }
.review__avatar--ink { background: var(--ink-panel); border-color: var(--ink-panel); color: var(--on-ink); }
.review__avatar .icon { width: 28px; height: 28px; }
.review__name { font-weight: 700; line-height: 1.3; }
.review__role { font-size: .86rem; color: var(--muted); }
.review__body { font-size: .99rem; color: var(--ink); flex: 1; }
.review__stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.review__stat {
  font-size: .84rem; font-weight: 600; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px;
}
.review__stat--gain { background: var(--accent-tint); border-color: rgba(14, 107, 69, .3); color: var(--accent-hover); }
.review__note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- company block (home) ---------- */
.company-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: clamp(26px, 4vw, 50px); align-items: start; }
.company-facts { list-style: none; margin: 18px 0 0; padding: 0; }
.company-facts li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .97rem; }
.company-facts li:last-child { border-bottom: 0; }
.company-facts .icon { color: var(--copper-deep); width: 20px; height: 20px; transform: translateY(4px); }
.company-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.company-cards a {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none !important;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 20px; color: var(--ink); font-weight: 600;
  transition: transform var(--duration-fast) var(--ease-smooth-out), box-shadow var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out);
}
.company-cards a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.company-cards a .icon { width: 24px; height: 24px; color: var(--accent); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; margin-inline: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-family: var(--font-body); font-size: 1.02rem; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { width: 19px; height: 19px; color: var(--copper-deep); flex: none; transition: transform var(--duration-medium) var(--ease-smooth-out); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); font-size: .99rem; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink-panel); color: var(--on-ink-muted); padding: clamp(44px, 6vw, 72px) 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 30px; }
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-col h3 { color: var(--on-ink); font-size: 1rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { color: var(--on-ink-muted); font-size: .93rem; display: inline-block; padding: 3px 0; }
.footer-col a:hover { color: var(--on-ink); }
.footer-disclaimer { border-top: 1px solid rgba(242, 238, 225, .16); margin-top: 36px; padding-top: 22px; font-size: .84rem; line-height: 1.75; }
.footer-disclaimer p { margin-bottom: 10px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 18px; color: var(--on-ink-muted); }
.footer-meta a { color: var(--on-ink); }
.footer-credits { font-size: .78rem; opacity: .72; margin: 6px 0 0; }

/* ---------- special offer ---------- */
.so-urgency {
  background: var(--copper); color: #fff; font-size: .9rem; font-weight: 600;
  padding: 9px 0; position: relative; z-index: 5;
}
.so-urgency .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; }
.so-hero { background: var(--ink-panel); color: var(--on-ink); padding: clamp(40px, 5vw, 66px) 0; position: relative; overflow: hidden; }
.so-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--grid-dot); opacity: .35; }
.so-hero .container { position: relative; }
.so-hero h1 { color: var(--on-ink); }
.so-hero .hero-lead { color: var(--on-ink-muted); }
.so-badge {
  display: inline-block; border: 1px solid rgba(201, 123, 61, .7); background: rgba(201, 123, 61, .16);
  color: #E8B98C; border-radius: 999px; font-size: .85rem; font-weight: 600; padding: 4px 15px; margin-bottom: 16px;
}
.so-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.so-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.so-cta-band { background: linear-gradient(94deg, var(--accent) 0%, #0d5c3c 60%, var(--ink-panel) 100%); color: #fff; padding: clamp(38px, 5vw, 58px) 0; text-align: center; }
.so-cta-band h2 { color: #fff; }
.so-cta-band p { color: rgba(255, 255, 255, .88); max-width: 58ch; margin-inline: auto; }
.countdown { display: inline-flex; gap: 8px; align-items: center; }
.countdown .cd-seg {
  background: var(--ink-panel); border: 1px solid rgba(242, 238, 225, .22); border-radius: 10px;
  min-width: 64px; padding: 8px 6px; text-align: center;
  font-family: var(--font-body); font-variant-numeric: tabular-nums;
}
.countdown .cd-num { display: block; font-size: 1.55rem; font-weight: 700; color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
.countdown .cd-label { display: block; font-size: .68rem; color: var(--on-ink-muted); font-weight: 600; }
.countdown .cd-sep { color: var(--on-ink-muted); font-weight: 700; font-size: 1.3rem; }

/* exit-intent modal — transitions.dev modal-open-close recipe:
   250ms in / 150ms out, scale from .96, smooth ease-out (no display pop) */
.so-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; visibility: hidden; pointer-events: none; opacity: 0; transition: opacity 150ms var(--ease-smooth-out), visibility 0s linear 150ms; }
.so-modal.is-open { visibility: visible; pointer-events: auto; opacity: 1; transition: opacity var(--duration-slower) var(--ease-smooth-out); }
.so-modal.is-open .so-modal__overlay { animation: soFadeIn var(--duration-slower) var(--ease-smooth-out) both; }
.so-modal.is-open .so-modal__card { animation: soPopIn var(--duration-slower) var(--ease-smooth-out) both; }
.so-modal.is-closing .so-modal__overlay { animation: soFadeOut 150ms var(--ease-smooth-out) both; }
.so-modal.is-closing .so-modal__card { animation: soPopOut 150ms var(--ease-smooth-out) both; }
@keyframes soFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes soFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes soPopIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes soPopOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  .so-modal.is-open .so-modal__overlay, .so-modal.is-open .so-modal__card,
  .so-modal.is-closing .so-modal__overlay, .so-modal.is-closing .so-modal__card { animation: none; }
}
.so-modal__overlay { position: absolute; inset: 0; background: rgba(20, 32, 26, .62); backdrop-filter: blur(3px); }
.so-modal__card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); max-width: 480px; width: 100%; padding: 30px 28px 28px; text-align: center;
}
.so-modal__close {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg); color: var(--ink); font-size: 1.25rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background-color var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-smooth-out);
}
.so-modal__close:hover { background: var(--copper-tint); border-color: var(--copper); }
.so-modal__title { font-family: var(--font-display); font-size: 1.6rem; margin: 12px 0 8px; }
.so-modal__text { color: var(--muted); font-size: .99rem; }
.so-modal .countdown { margin: 16px 0; }
.so-modal .countdown .cd-seg { background: var(--surface-2); border-color: var(--border); }
.so-modal .countdown .cd-num { color: var(--ink); }
.so-modal .countdown .cd-label { color: var(--muted); }
.so-modal .btn { width: 100%; }
.so-illustration { width: 130px; height: auto; margin: 0 auto; display: block; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: clamp(60px, 9vw, 110px) 0; }
.error-code { font-family: var(--font-display); font-size: clamp(4.4rem, 13vw, 8.5rem); font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.error-page .btn { margin: 8px 6px 0; }
.error-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; list-style: none; padding: 0; }
.error-links a { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 18px; font-weight: 600; font-size: .93rem; color: var(--ink); }
.error-links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- content helpers ---------- */
.two-col-list { columns: 2; column-gap: 34px; }
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.notice {
  display: flex; gap: 14px; align-items: flex-start; background: var(--accent-tint);
  border: 1px solid rgba(14, 107, 69, .28); border-radius: var(--r-md); padding: 16px 18px; font-size: .96rem;
}
.notice .icon { color: var(--accent); transform: translateY(3px); width: 22px; height: 22px; }
.notice--copper { background: var(--copper-tint); border-color: rgba(176, 100, 47, .32); }
.notice--copper .icon { color: var(--copper-deep); }
.map-embed { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); max-width: 860px; aspect-ratio: 16 / 9; min-height: 320px; background: var(--surface-2); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: clamp(22px, 3.5vw, 44px); align-items: start; }
.tag-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.tag-line li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; font-size: .88rem; font-weight: 600; margin: 0; }

/* ---------- scroll reveal (design.md §5 — enhancement only) ---------- */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .main-nav, .btn-header { display: none; }
  .nav-burger { display: inline-flex; margin-left: auto; }
  .hero-grid, .page-hero__grid { grid-template-columns: 1fr; }
  .company-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand .logo-svg { width: 176px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col-list { columns: 1; }
  .hero-market canvas, .hero-market svg.hero-market-static { height: 150px; }
  .countdown .cd-seg { min-width: 56px; }
  .btn { width: 100%; }
  .btn-header { width: auto; }
  .hero-trust a { flex: 1 1 100%; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Ticker and international phone field */
.tv-ticker-wrapper {
  padding-top: 0px !important;
  height: 58px !important;
}
.iti__selected-country, .iti__selected-dial-code {
  color: rgb(24, 33, 47) !important;
}

/* Header registration and navigation */
.site-header .registration-cta {
  min-height: 44px;
  gap: .65em;
  font-weight: 700;
}
.registration-cta .cta-arrow { width: 1.05em; height: 1.05em; flex: none; }
.registration-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-header .dropdown { top: 100%; }
.site-header .dropdown ul { max-height: min(62vh, 32rem); overflow-y: auto; }
.site-header .mobile-nav { max-height: calc(100dvh - 5rem); overflow-y: auto; overscroll-behavior: contain; }
.site-header .mobile-nav[hidden] { display: none; }
.site-header .mobile-nav summary, .site-header .mobile-nav li a { min-height: 44px; align-content: center; }
.site-header .nav-burger { min-width: 44px; min-height: 44px; }

/* Home page media */
#content > .hero h1 { text-wrap: balance; }
#content > .hero .form-block { scroll-margin-top: 6rem; }
.review-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.review-photo-note { margin-block: .65rem 1rem; font-size: .875rem; }

#content > .hero .hero-bg-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; color: var(--accent); }
#content > .hero .hero-bg-layer svg { display: block; width: 100%; height: 100%; }
#content > .hero .hero-kicker { margin-bottom: 12px; }

#content > .hero .hero-grid {
  grid-template-areas: "copy form" "market form";
  row-gap: clamp(18px, 3vw, 28px);
}
#content > .hero .hero-copy { grid-area: copy; }
#content > .hero .hero-form-card { grid-area: form; }
#content > .hero .hero-market { grid-area: market; margin-top: 0; }
@media (max-width: 960px) {
  #content > .hero .hero-grid { grid-template-areas: "copy" "form" "market"; }
}

/* Home reading and spacing */
.home-page .form-block :is(input[type="text"], input[type="email"], input[type="tel"]),
.home-page .calc-modal :is(input[type="text"], input[type="email"], input[type="tel"]) {
  min-height: 44px;
  font-size: 1rem;
  margin-block-end: 0;
}
.home-page :is(.form-block, .calc-modal) :is(input[type="text"], input[type="email"], input[type="tel"])::placeholder {
  font-size: .875rem;
  opacity: 1;
}
.home-page .form-legal { font-size: .875rem; line-height: 1.5; }
.home-page .review-photo-note { max-width: 65ch; line-height: 1.5; }
@media (max-width: 640px) {
  .home-page > .section .section-head { margin-bottom: 20px; }
}

#content.home-page > .section { padding-block: clamp(38px, 5.8vw, 82px); }
.home-page > .hero .hero-bg-layer { opacity: .48; }
.home-page > .hero .hero-flags .caption { flex: 0 0 100%; }
.home-page > .hero .hero-flags { gap: 8px 10px; }
.home-page > .hero .hero-trust { gap: 8px 18px; }
.home-page > .hero .hero-trust a { padding-block: 8px; }
@media (max-width: 640px) {
  .home-page > .hero .hero-market__bar { flex-wrap: wrap; gap: 4px 12px; padding: 10px 12px; }
  .home-page > .hero .hero-kicker { margin-bottom: 8px; }
  .home-page > .hero .hero-kicker::before { width: 20px; flex: none; }
}

/* The registration form reserves a grid row for an optional password. */
#content.home-page :is(.form-block, .calc-modal) form > div:has(> div > input[name="first_name"]):not(:has(input[type="password"])) {
  row-gap: 0;
}
#content.home-page :is(.form-block, .calc-modal) form > div:has(> div > input[name="first_name"]):not(:has(input[type="password"])) > div:has(> :is(input[name="first_name"], input[name="last_name"], input[type="email"], input[type="tel"], .iti)) {
  margin-block-end: 12px;
}
.home-page :is(.form-block, .calc-modal) :is(input, button)[type="submit"] {
  min-height: 44px;
}
