/* ============================================================
   JT SmartRoutes — landing page
   Style: Swiss / minimalist editorial. Flat, high-contrast,
   grid-based, hairline rules. No shadows, no gradients, no cards.
   Type: Outfit (geometric grotesque) · Space Mono (labels/indices).
   Accent: brand green (#0b5041 / #1D9E75).
   ============================================================ */

:root {
  --ink: #111311;          /* near-black text */
  --ink-2: #3a3f3b;
  --paper: #ffffff;
  --paper-2: #f5f6f2;      /* warm off-white for alt blocks */
  --brand: #0b5041;
  --accent: #1d9e75;
  --muted: #6a716b;
  --line: #e4e6df;         /* hairline */
  --line-2: #cfd3ca;
  --on-dark: #f3f5ef;

  --maxw: 1200px;
  --ease: cubic-bezier(.4, 0, .2, 1);

  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: rgba(11,80,65,.14);
}
a, button { touch-action: manipulation; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font); font-weight: 800; line-height: 1.0; letter-spacing: -0.03em; text-wrap: balance; }
p { color: var(--muted); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; font-family: var(--mono); font-size: .8rem; transition: top .18s var(--ease); }
.skip-link:focus-visible { top: 12px; }

/* Index / eyebrow label */
.kicker { font-family: var(--mono); font-size: .74rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.kicker .idx { color: var(--muted); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }
.section { padding: 104px 0; }
.rule { border: 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 720px; }
.sec-head h2 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 18px 0 0; }
.sec-head p { margin-top: 18px; font-size: 1.12rem; max-width: 560px; }

/* ---------- Buttons / links ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 24px; font-family: var(--font); font-weight: 600; font-size: .98rem; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; border-radius: 6px; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.btn .arw { transition: transform .2s var(--ease); }
.btn:hover .arw { transform: translateX(3px); }
.btn--brand { background: var(--brand); border-color: var(--brand); }
.btn--brand:hover { background: #0e6553; border-color: #0e6553; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn--ondark { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--ondark:hover { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--lg { height: 56px; padding: 0 30px; font-size: 1.05rem; }
.tlink { position: relative; font-weight: 600; font-size: .98rem; border-bottom: 1.5px solid var(--accent); padding-bottom: 3px; transition: color .18s; }
.tlink::after { content: ""; position: absolute; left: 0; bottom: -1.5px; height: 1.5px; width: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .34s var(--ease-out); }
.tlink:hover { color: var(--brand); }
.tlink:hover::after { transform: scaleX(1); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 26px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 1.16rem; }
.brand svg { width: 28px; height: 28px; border-radius: 7px; }
.nav__links { display: flex; align-items: center; gap: 30px; margin-left: 18px; }
.nav__links a { position: relative; font-family: var(--mono); font-size: .82rem; letter-spacing: .02em; color: var(--ink-2); transition: color .15s; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -5px; height: 1.5px; width: 100%; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .26s var(--ease-out); }
.nav__links a:hover { color: var(--brand); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 0; }
.hero h1 { font-size: clamp(3rem, 8.6vw, 6.4rem); font-weight: 800; letter-spacing: -0.045em; margin: 26px 0 0; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__sub { margin-top: 30px; font-size: 1.24rem; line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.hero__cta { margin-top: 40px; display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero__foot { margin-top: 80px; display: grid; grid-template-columns: repeat(3, max-content); gap: 64px; padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figure .n { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.figure .k { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }

/* ---------- Proof / logos ---------- */
.proof { padding: 30px 0; }
.proof__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.proof__label { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.proof__logos { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.proof__logos span { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: #aeb4ac; transition: color .2s; }
.proof__logos span:hover { color: var(--ink); }

/* ---------- Numbered grid (features / steps) ---------- */
.grid-list { display: grid; grid-template-columns: repeat(3, 1fr); }
.gitem { padding: 34px 28px 40px 0; border-top: 1.5px solid var(--ink); transition: border-color .3s var(--ease); }
.gitem:hover { border-top-color: var(--accent); }
.gitem .idx { font-family: var(--mono); font-size: .82rem; color: var(--accent); transition: color .2s var(--ease); }
.gitem h3 { font-size: 1.32rem; font-weight: 700; letter-spacing: -0.02em; margin: 16px 0 10px; transition: color .2s var(--ease); }
.gitem:hover h3 { color: var(--brand); }
.gitem p { font-size: .98rem; line-height: 1.55; }
.gitem .stat { margin-top: 18px; font-family: var(--mono); font-size: .8rem; color: var(--brand); }
.gitem .stat b { font-family: var(--font); font-weight: 800; font-size: 1.05rem; }

/* ---------- Metrics (inverted block) ---------- */
.invert { background: var(--brand); color: var(--on-dark); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 20px 24px 20px 0; }
.metric + .metric { border-left: 1px solid rgba(255,255,255,.16); padding-left: 24px; }
.metric .n { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.04em; color: #fff; font-variant-numeric: tabular-nums; }
.metric .n em { font-style: normal; color: var(--accent); }
.metric .k { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(243,245,239,.72); margin-top: 8px; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.quote { padding: 34px 30px 34px 0; border-top: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.quote blockquote { font-size: 1.12rem; line-height: 1.5; letter-spacing: -0.01em; color: var(--ink); }
.quote blockquote em { font-style: normal; color: var(--brand); font-weight: 700; }
.quote figcaption { margin-top: 22px; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.quote figcaption b { color: var(--ink); font-weight: 700; }

/* ---------- Pricing ---------- */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--ink); }
.price__left { padding: 48px 44px; border-right: 1.5px solid var(--ink); }
.price__amt { font-size: clamp(3.4rem, 7vw, 5rem); font-weight: 800; letter-spacing: -0.05em; line-height: .9; margin: 20px 0 14px; }
.price__amt span { display: block; font-family: var(--mono); font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 14px; }
.price__left p { font-size: 1rem; }
.price__left .btn { margin-top: 30px; }
.price__right { padding: 48px 44px; background: var(--paper-2); }
.plist { list-style: none; padding: 0; margin: 0; display: grid; }
.plist li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.plist li:last-child { border-bottom: 0; }
.plist li::before { content: "→"; color: var(--accent); font-weight: 700; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; letter-spacing: -0.04em; max-width: 18ch; margin: 0 auto; }
.cta h2 em { font-style: normal; color: var(--accent); }
.cta__actions { margin-top: 36px; display: flex; gap: 20px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1.5px solid var(--ink); padding: 56px 0 40px; }
.footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__tag { margin-top: 14px; max-width: 300px; color: var(--muted); font-size: .96rem; }
.footer__cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer__col h4 { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; font-weight: 400; }
.footer__col a { display: block; font-size: .96rem; padding: 5px 0; color: var(--ink-2); transition: color .15s; }
.footer__col a:hover { color: var(--brand); }
.footer__bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: .76rem; color: var(--muted); }

/* ---------- Animations (gated on .anim so no-JS shows everything) ---------- */
/* Scroll reveal — plain fade-rise for simple blocks (pricing, etc.) */
.anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.anim .reveal.visible { opacity: 1; transform: none; }

/* Grid items & quotes: the top hairline DRAWS in (left→right), then the
   content builds — index → heading → text — with a left-to-right column
   cascade. Ties the motion to the Swiss rule/grid motif instead of a flat fade. */
.gitem, .quote { position: relative; }
.anim .gitem.reveal, .anim .quote.reveal { opacity: 1; transform: none; }   /* container stays; children + rule animate */
.anim .gitem, .anim .quote { border-top-color: transparent; }
.anim .gitem::before, .anim .quote::before {
  content: ""; position: absolute; top: -1.5px; left: 0; right: 0; height: 1.5px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease-out);
}
.anim .gitem.visible::before, .anim .quote.visible::before { transform: scaleX(1); }
.anim .gitem { --d: 0s; }
.anim .grid-list .gitem:nth-child(3n+2) { --d: .09s; }
.anim .grid-list .gitem:nth-child(3n)   { --d: .18s; }
.anim .quote { --d: 0s; }
.anim .quotes .quote:nth-child(2) { --d: .09s; }
.anim .quotes .quote:nth-child(3) { --d: .18s; }
.anim .gitem > *, .anim .quote > * { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .6s var(--ease-out); }
.anim .gitem.visible > *, .anim .quote.visible > * { opacity: 1; transform: none; }
.anim .gitem.visible > *:nth-child(1), .anim .quote.visible > *:nth-child(1) { transition-delay: calc(var(--d) + .16s); }
.anim .gitem.visible > *:nth-child(2), .anim .quote.visible > *:nth-child(2) { transition-delay: calc(var(--d) + .24s); }
.anim .gitem.visible > *:nth-child(3), .anim .quote.visible > *:nth-child(3) { transition-delay: calc(var(--d) + .32s); }
.anim .gitem.visible > *:nth-child(4) { transition-delay: calc(var(--d) + .40s); }

/* Metric numbers: a short accent underline draws in (count-up animates the digits). */
.metric .n { position: relative; padding-bottom: 12px; }
.anim .metric .n::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 40px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-out) .25s;
}
.anim .metric.visible .n::after { transform: scaleX(1); }

/* Hero headline: per-word rise + un-blur */
.hero h1 .w { display: inline-block; }
.anim .hero h1 .w { opacity: 0; transform: translateY(.5em); filter: blur(10px); transition: opacity .55s var(--ease), transform .6s var(--ease-out), filter .55s var(--ease); }
.anim .hero h1.in .w { opacity: 1; transform: none; filter: none; }

/* Sequenced hero entrance */
.anim .a-rise { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease-out); }
.anim .a-rise.in { opacity: 1; transform: none; }

/* Mono terminal typewriter */
.term { margin-top: 32px; font-family: var(--mono); font-size: .84rem; letter-spacing: .01em; color: var(--muted); min-height: 1.5em; }
.term__txt { color: var(--brand); }
.term__cursor { display: inline-block; margin-left: 1px; color: var(--accent); font-weight: 700; }
.anim .term__cursor { animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .anim .reveal, .anim .hero h1 .w, .anim .a-rise,
  .anim .gitem > *, .anim .quote > * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .anim .gitem, .anim .quote { border-top-color: var(--ink) !important; }
  .anim .gitem::before, .anim .quote::before, .anim .metric .n::after { transform: scaleX(1) !important; }
  .anim .term__cursor { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-list, .quotes { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .price { grid-template-columns: 1fr; }
  .price__left { border-right: 0; border-bottom: 1.5px solid var(--ink); }
}
@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .wrap { padding-inline: 22px; }
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__links.open { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; position: absolute; top: 72px; left: 0; right: 0; padding: 22px; margin: 0; background: #fff; border-bottom: 1px solid var(--line); }
  .nav__signin { display: none; }
  .grid-list, .quotes { grid-template-columns: 1fr; }
  .gitem, .quote { padding-right: 0; }
  .hero__foot { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .price__left, .price__right { padding: 34px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
