/* Landing page, built from docs/design/landing-mockup.html (design brief section 9,
   8 Oct 2026): L1's wording in L3's order, L2's phone and desk at the end, colour 5.
   Tokens as in the app (frontend/src/auth/gate.css). Nothing here loads from another
   site: the CSP in _headers allows only this site's own files. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #121212; --panel: #f3f3f1; --rule: #e7e7e3; --signed: #0b7f47;
  --brand: #b4471f; --brand-hover: #9a3b19; --concrete: #ece8e1;
  --grid: linear-gradient(rgba(180, 71, 31, .16) 1px, transparent 1px) 0 0 / 28px 28px,
          linear-gradient(90deg, rgba(180, 71, 31, .16) 1px, transparent 1px) 0 0 / 28px 28px;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font-family: "Archivo", system-ui, sans-serif; line-height: 1.45; font-variant-numeric: tabular-nums; }
h1, h2 { font-stretch: 92%; letter-spacing: -0.012em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin: 0 auto; }

/* Focus: ink on light grounds, white on the rust section, ink again inside the phone */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.show :focus-visible { outline-color: #fff; }
.show .screen :focus-visible { outline-color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border-radius: 8px; font-weight: 700; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; transition: background-color 150ms ease-out; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ghost { background: rgba(18, 18, 18, .07); color: var(--ink); }
.btn.ghost:hover { background: rgba(18, 18, 18, .12); }
.btn.white { background: #fff; color: var(--ink); }
.btn.white:hover { background: var(--concrete); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; font-stretch: 94%; }
.brand svg rect { fill: var(--brand); }
.brand svg path { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Top: the concrete band carries the bar and the hero */
.top { background: var(--grid), var(--concrete); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 72px; }
.links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.links .link { color: var(--ink); text-decoration: none; }
.links .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.links .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.hero { padding: 72px 0 96px; display: grid; justify-items: center; text-align: center; gap: 20px; }
.hero h1 { font-size: 60px; line-height: 1.02; max-width: 14ch; }
.hero p { font-size: 18px; font-weight: 550; max-width: 50ch; }
.hero .btns { display: flex; gap: 10px; margin-top: 6px; }

/* One item, start to finish (L3) */
.story { padding: 88px 0 0; display: grid; gap: 28px; scroll-margin-top: 16px; }
.story header { display: grid; gap: 8px; }
.story h2 { font-size: 38px; line-height: 1.08; max-width: 26ch; }
.story header p { font-weight: 600; font-size: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--panel); border-radius: 14px; padding: 20px; display: grid; gap: 12px; align-content: start; }
.step b { font-size: 16px; }
.step .card { background: #fff; border-radius: 10px; padding: 16px; font-size: 17px; line-height: 1.5; }
.step .note { font-weight: 600; }
.tag { display: block; font-size: 13px; font-weight: 750; margin-bottom: 6px; }
.tag.ok { color: var(--signed); }
.metric { display: flex; align-items: baseline; gap: 28px; padding: 22px 24px; border-radius: 14px; background: var(--panel); }
.metric strong { font-size: 40px; font-stretch: 90%; white-space: nowrap; }
.metric span { font-weight: 550; font-size: 15px; max-width: 70ch; }

/* Phone and desk together (L2's section, moved to the end), in rust */
.show { margin-top: 96px; background: var(--brand); color: #fff; overflow: hidden; scroll-margin-top: 0; }
.show .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: end; padding-top: 72px; }
.show .copy { display: grid; gap: 18px; padding-bottom: 80px; align-content: center; }
.show h2 { font-size: 44px; line-height: 1.04; }
.show .copy p { font-size: 17px; font-weight: 550; max-width: 40ch; }
.show .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.pair { position: relative; height: 470px; }
.pair .desk { position: absolute; right: -60px; bottom: 0; width: 640px; height: 400px; object-fit: cover; object-position: top left; border-radius: 12px 12px 0 0; box-shadow: 0 -4px 40px rgba(0, 0, 0, .25); }

/* The try-it phone (demo.js): pre-written wording, never calls anything */
.phone { position: absolute; left: 0; bottom: -40px; width: 236px; height: 480px; border-radius: 40px; background: var(--ink); padding: 10px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); }
.screen { width: 100%; height: 100%; border-radius: 31px; background: #fff; color: var(--ink); overflow: hidden; display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; font-size: 13px; }
.screen .demo-note { padding: 14px 16px 0; font-size: 11px; font-weight: 750; }
.screen .top-row { padding: 6px 16px 4px; display: flex; justify-content: space-between; font-weight: 750; font-size: 15px; }
.screen .ctx { padding: 0 16px 10px; font-weight: 600; font-size: 12px; }
.screen .photo { margin: 0 12px; height: 104px; border-radius: 12px; background: #8d8a84 url("img/photo-hatch.svg"); }
/* The wording scrolls inside the phone; the button stays above the section's bottom
   edge, which hides the phone's last 40px */
.screen .rest { padding: 12px 14px 8px; display: grid; gap: 8px; align-content: start; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.screen .rest:focus-visible { outline-offset: -3px; border-radius: 12px; }
.screen .act { padding: 0 14px 50px; display: grid; }
.screen .lbl { font-weight: 750; font-size: 12px; }
.screen .box { background: var(--panel); border-radius: 9px; padding: 9px 10px; font-weight: 550; line-height: 1.4; }
.screen .box .tag { font-size: 11px; margin-bottom: 3px; }
.screen button { height: 40px; border-radius: 10px; border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 750; font-size: 14px; cursor: pointer; }
.tap { position: absolute; left: 196px; bottom: 120px; padding: 8px 12px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 750; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); white-space: nowrap; }
.tap::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); margin-right: 8px; }

/* Built for how engineers work */
.facts { padding: 96px 0 88px; display: grid; gap: 26px; scroll-margin-top: 16px; }
.facts h2 { font-size: 34px; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.facts li { background: var(--panel); border-radius: 12px; padding: 18px; display: grid; gap: 4px; font-size: 15px; font-weight: 550; }
.facts li b { font-size: 16px; font-weight: 750; }
.foot { border-top: 1px solid var(--rule); }
.foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 14px; font-weight: 550; }
.foot a { color: var(--ink); font-weight: 700; }

/* Below 1060px two columns would put the desk picture over the heading: copy on top,
   the phone and the desk picture below, running off the right edge (the section clips it) */
@media (max-width: 1060px) {
  .show .wrap { grid-template-columns: minmax(0, 1fr); }
  .show .copy { padding-bottom: 0; }
  .pair .desk { left: 140px; right: auto; }
}

/* Phone width: one column, the phone without the desk */
@media (max-width: 640px) {
  .links .link { display: none; }
  .hero { padding: 48px 0 64px; gap: 16px; }
  .hero h1 { font-size: 38px; }
  .hero p { font-size: 16px; }
  .hero .btns { flex-direction: column; width: 100%; }
  .story { padding-top: 56px; gap: 20px; }
  .story h2 { font-size: 28px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .metric { flex-direction: column; gap: 6px; }
  .metric strong { font-size: 34px; }
  .show { margin-top: 64px; }
  .show .wrap { padding-top: 52px; gap: 28px; }
  .show h2 { font-size: 32px; }
  .pair .desk { display: none; }
  .phone { left: 50%; transform: translateX(-50%); }
  .tap { left: auto; right: 0; bottom: 280px; }
  .facts { padding: 64px 0; }
  .facts h2 { font-size: 28px; }
  .facts ul { grid-template-columns: minmax(0, 1fr); }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
