/* glealabs.com shared styles (home, 404), on the Labs design system (DESIGN.md):
   warm light canvas, black and white
   components, Geist with tabular numerals, type 12/13/15/17/20/24/32/44,
   spacing 4-64, radius 8 controls / 12 cards / 999 pills, flat hairline
   surfaces, shadows only on overlays. Glea Labs accent: #E8862E, the brand
   amber of the logo mark, used for marks, state and selection only (never
   as text on light). Dark scheme inverts the neutrals. */

@font-face {
  font-family: "Geist";
  src: url("/assets/geist-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --canvas: #F4F3F1;
  --surface: #FFFFFF;
  --surface-2: #EFEDEA;
  --hair: #E6E3DF;
  --hair-2: #D5D1CB;
  --ink: #111111;
  --ink-2: #5F5B55;
  --ink-3: #8E8981;
  --primary: #111111;
  --primary-hover: #2A2927;
  --on-primary: #FFFFFF;
  --accent: #E8862E;
  --on-accent: #111111;
  --positive: #1F8A4C;
  --negative: #C8372D;
  --backdrop: rgba(17, 17, 17, 0.32);
  --lift: 0 8px 24px rgb(0 0 0 / 0.08);
  --word-dim: 0.5;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-ctl: 8px;
  --r-card: 12px;
  --gutter: 16px;
  --max: 1120px;
  --head: 60px;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1);
  --spring-dur: 600ms;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root { --spring: linear(0, 0.0412 4.2%, 0.1377 8.3%, 0.2592 12.5%, 0.3859 16.7%, 0.5062 20.8%, 0.6136 25%, 0.7054 29.2%, 0.7812 33.3%, 0.8419 37.5%, 0.8892 41.7%, 0.9251 45.8%, 0.9517 50%, 0.9709 54.2%, 0.9842 58.3%, 0.9932 62.5%, 0.9989 66.7%, 1.0024 70.8%, 1.0042 75%, 1.0049 79.2%, 1.005 83.3%, 1.0046 87.5%, 1.0041 91.7%, 1.0035 95.8%, 1); }
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0E0E0D; --surface: #171716; --surface-2: #1F1F1D; --hair: #2A2A27; --hair-2: #3A3936;
    --ink: #F2F1EE; --ink-2: #A29D95; --ink-3: #6E6A63;
    --primary: #F2F1EE; --primary-hover: #FFFFFF; --on-primary: #111111;
    --accent: #F09A4E; --positive: #3FB673; --negative: #E5574C;
    --backdrop: rgba(0, 0, 0, 0.55); --lift: 0 8px 24px rgb(0 0 0 / 0.4); --word-dim: 0.45;
  }
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
html.lenis, html.lenis body { height: auto; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2 { text-wrap: balance; }
ul { padding: 0; list-style: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 12px 16px; border-radius: var(--r-ctl); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.eyebrow { font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.display { font-size: 44px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.h2 { font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.lede { font-size: 20px; line-height: 1.4; color: var(--ink-2); }
.body-l { font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.fine { font-size: 13px; color: var(--ink-2); }

/* logo: black tile with the amber mark */
.logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.logo .mk { position: relative; width: 24px; height: 24px; border-radius: 6px; background: var(--ink); }
.logo .mk::after { content: ""; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }

/* minimal sticky nav */
.top { position: sticky; top: 0; z-index: 60; background: var(--canvas); border-bottom: 1px solid var(--hair); }
.top-in { height: var(--head); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--on-primary); background: var(--primary); height: 36px; padding: 0 16px; border-radius: var(--r-ctl); display: inline-flex; align-items: center; }
.nav .nav-cta:hover { color: var(--on-primary); background: var(--primary-hover); }
.menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; position: relative; border-radius: var(--r-ctl); }
.menu-btn i { position: absolute; left: 12px; width: 20px; height: 1.5px; border-radius: 1px; background: var(--ink); transition: transform var(--spring-dur) var(--spring); }
.menu-btn i:nth-child(1) { top: 17px; }
.menu-btn i:nth-child(2) { top: 26px; }
.menu-btn[aria-expanded="true"] i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
/* full-screen mobile menu, opening from its trigger */
.menu { position: fixed; left: 0; right: 0; top: var(--head); bottom: 0; z-index: 59; background: var(--canvas); padding: 24px var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
  transform-origin: calc(100% - 32px) 0; opacity: 0; transform: scale(0.96); visibility: hidden; pointer-events: none;
  transition: opacity 160ms linear, transform var(--spring-dur) var(--spring), visibility 0s linear 180ms; }
.menu.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 120ms linear, transform var(--spring-dur) var(--spring), visibility 0s; }
.menu-links a { display: flex; align-items: center; min-height: 64px; color: var(--ink); text-decoration: none; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; border-bottom: 1px solid var(--hair); opacity: 0; transform: translateY(8px); transition: opacity 160ms linear, transform var(--spring-dur) var(--spring); }
.menu.open .menu-links a { opacity: 1; transform: none; }
.menu.open .menu-links a:nth-child(2) { transition-delay: 30ms; }
.menu.open .menu-links a:nth-child(3) { transition-delay: 60ms; }
.menu.open .menu-links a:nth-child(4) { transition-delay: 90ms; }
.menu-foot .btn { width: 100%; }
.menu-foot .fine { margin-top: 12px; text-align: center; }
html.menu-open { overflow: hidden; }
@media (max-width: 719px) { .nav { display: none; } .menu-btn { display: block; } }
@media (min-width: 720px) { .menu { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-ctl); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform 280ms var(--spring); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hair); }
.btn-ghost:hover { border-color: var(--hair-2); }
.btn svg { flex: none; }

/* status pills: the dot carries state */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pill.live i { background: var(--positive); }

/* phone mockup + marked asset slot */
.phone { --w: 240px; position: relative; width: var(--w); padding: calc(var(--w) * 0.034); border-radius: calc(var(--w) * 0.165); background: #111; box-shadow: inset 0 0 0 1px #2B2B2B; }
.phone .screen { position: relative; aspect-ratio: 600 / 1300; border-radius: calc(var(--w) * 0.13); overflow: hidden; background: var(--surface-2); }
.phone .island { position: absolute; left: 50%; top: calc(var(--w) * 0.028); width: 31%; height: calc(var(--w) * 0.088); border-radius: 999px; background: #000; transform: translateX(-50%); }
.slot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; background: var(--surface-2); color: var(--ink-2); }
.slot::after { content: ""; position: absolute; inset: 10px; border: 1px dashed var(--hair-2); border-radius: 10px; pointer-events: none; }
.phone .slot::after { border-radius: calc(var(--w) * 0.1); }
.slot img, .slot .app-ic { width: 48px; height: 48px; border-radius: 11px; }
.slot-t { font-size: 15px; font-weight: 600; color: var(--ink); }
.slot-s { font-size: 12px; max-width: 22ch; }
.app-ic { display: block; }
.app-ic.iq { background: #111; position: relative; }
.app-ic.iq::after { content: "IQ"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.app-ic.al { background: #111; position: relative; }
.app-ic.al::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 0 0 5px #111, 0 0 0 6.5px rgba(255, 255, 255, 0.35); }

/* reveals */
.js [data-reveal] { opacity: 0; transform: translateY(16px); }
.js [data-text-effect] .tw { display: inline-block; opacity: 0; transform: translateY(6px); filter: blur(4px); }
.js [data-words] .w { opacity: var(--word-dim); }

/* dialog: a plate morphs out of the card, content swaps in with blur + fade */
.dlg-layer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.dlg-layer[hidden] { display: none; }
.dlg-backdrop { position: absolute; inset: 0; background: var(--backdrop); opacity: 0; }
.dlg { position: relative; width: min(600px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.dlg-plate { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: var(--r-card); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--lift); transform-origin: 0 0; }
.dlg-body { position: relative; padding: 32px 24px 24px; }
.dlg-body h3 { margin-top: 8px; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; padding-right: 32px; }
.dlg-body p { margin-top: 12px; font-size: 17px; color: var(--ink-2); }
.dlg-body dl { margin: 24px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; font-size: 15px; }
.dlg-body dt { color: var(--ink-2); }
.dlg-body dd { margin: 0; }
.dlg-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.dlg-x { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.dlg-x:hover { background: var(--surface-2); }
.dlg-x svg { width: 16px; height: 16px; }
@media (min-width: 720px) { .dlg-body { padding: 48px 48px 32px; } }

/* contact + toasts */
.copy .ico { position: relative; width: 16px; height: 16px; }
.copy .ico svg { position: absolute; inset: 0; }
.copy .ico .i-check { opacity: 0; transform: scale(0.6); }
.swap { display: inline-grid; }
.swap > span { grid-area: 1 / 1; }
.inline-err { margin-top: 12px; font-size: 15px; color: var(--negative); }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 95; width: min(380px, calc(100vw - 32px)); height: 0; translate: -50% 0; pointer-events: none; }
.toast { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-card); background: var(--primary); color: var(--on-primary); font-size: 15px; font-weight: 500; box-shadow: var(--lift); transform-origin: 50% 100%; opacity: 0; }
.toast.err { background: var(--negative); color: #fff; }
.toast svg { flex: none; width: 16px; height: 16px; }

/* footer */
.foot { border-top: 1px solid var(--hair); padding: 48px 0 32px; font-size: 15px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 48px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-nav a { color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-nav a:hover { color: var(--ink); }
.foot .legal { margin-top: 24px; color: var(--ink-2); font-size: 13px; }

/* review banner: these pages are internal template directions */
.review { background: var(--ink); color: var(--canvas); font-size: 13px; }
.review .wrap { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: space-between; min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.review a { color: var(--canvas); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-text-effect] .tw { opacity: 1; transform: none; filter: none; }
  .js [data-words] .w { opacity: 1; }
}
