/* buzzin v2: calm, editorial, one moving demo. Tokens from the app (lecture-helper/src/app/globals.css). */
:root {
  --paper: #faf8f2;
  --card: #fff;
  --soft: #f2ede1;
  --line: #ece6d6;
  --line-strong: #e3dcca;
  --ink: #11161d;
  --navy: #0e1b33;
  --muted: #5e5a52;
  --faint: #bdb7a8;
  --honey: #ffb81c;
  --honey-deep: #e9a000;
  --honey-text: #8a5a00;
  --tint: #fff3d6;
  --tint-text: #7a4f00;
  --mark: #ffe1a0;
  --danger: #b4321c;
  --display: Gabarito, system-ui, sans-serif;
  --text: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tap: 44px;
  --gutter: max(16px, env(safe-area-inset-left));
  /* The app's shared controls (src/app/globals.css, 2026-11-22): flat ground, glass, one spring for presses. */
  --ground: #f3f1ea;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --glass-hair: rgba(14, 27, 51, 0.09);
  --glass-shine: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(14, 27, 51, 0.04);
  --glass-shadow: 0 12px 32px rgba(14, 27, 51, 0.1), 0 1px 2px rgba(14, 27, 51, 0.06);
  --lift: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px rgba(14, 27, 51, 0.14);
  --field-ring: 0 0 0 2.5px var(--honey), 0 4px 12px rgba(14, 27, 51, 0.08);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --r-control: 16px;
  --r-control-lg: 18px;
  --r-glass: 22px;
  --wide: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(255, 184, 28, 0.25);
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 14px; border-radius: 10px; background: var(--navy); color: #fff; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- Buttons: the app's (src/app/globals.css .btn, .btn-primary, .btn-navy). Pressed, they give way and spring
   back (`scale`); with a mouse they lift 1px (`translate`). ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px;
  border: 1px solid var(--glass-hair); border-radius: var(--r-control);
  background: var(--glass-strong); box-shadow: var(--glass-shine); color: var(--ink);
  font: 700 16px/1 var(--display); text-decoration: none; cursor: pointer;
  touch-action: manipulation;
  transition: scale 380ms var(--spring), translate 150ms var(--ease), background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
@media (hover: hover) { .btn:hover { translate: 0 -1px; } }
.btn:active { translate: none; scale: 0.96; transition-duration: 90ms; transition-timing-function: ease-out; }
.btn-honey { background: var(--honey); border-color: var(--honey); color: var(--navy); box-shadow: var(--lift); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: var(--lift); }
.btn-quiet { padding: 0 16px; font: 600 15px/1 var(--text); }

/* ---- Header ---- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--wide); margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 0;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap);
  color: var(--navy); text-decoration: none; --spark: var(--honey-deep);
  font: 700 22px/1 var(--display); letter-spacing: -0.02em;
}
.wordmark.sm { font-size: 17px; min-height: 0; }

/* ---- Hero ---- */
.hero { position: relative; overflow-x: clip; padding: clamp(22px, 3.2vw, 40px) var(--gutter) 0; }
.hero-text { max-width: 860px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); color: var(--navy); }
.hero h1 .buzz { color: var(--honey); }
.lede { max-width: 33em; margin: clamp(18px, 2.4vw, 26px) auto 0; color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); }
.roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.roles .btn { min-height: 54px; min-width: 168px; padding: 0 24px; border-radius: var(--r-control-lg); font-size: 17px; }
.roles .btn:active { scale: 0.985; }
@media (max-width: 480px) {
  .roles { flex-wrap: nowrap; }
  .roles .btn { flex: 1 1 0; min-width: 0; max-width: 200px; padding: 0 12px; font-size: 16px; white-space: nowrap; }
}

/* =====================================================================
   The demo: a three.js scene (hero3d.js) on a transparent canvas, so the
   honeycomb shows through. A rendered poster sits underneath until the
   scene is ready, and stays if WebGL or the script can't run.
   ===================================================================== */
.demo { margin: clamp(0px, 0.6vw, 8px) auto 0; max-width: 1180px; container-type: inline-size; }
.stage { position: relative; height: 50cqw; }
.stage .gl, .stage .poster img { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .poster img { object-fit: contain; transition: opacity 500ms ease; }
.stage .gl { opacity: 0; transition: opacity 500ms ease; touch-action: pan-y; }
.stage.ready .gl { opacity: 1; }
.stage.ready .poster img { opacity: 0; }

/* Under the stage: progress and pause */
.demo-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.demo-steps { display: flex; gap: 6px; }
.demo-steps i { width: 22px; height: 3px; border-radius: 3px; background: var(--line-strong); transition: background-color 300ms ease, width 400ms var(--ease); }
.demo-steps i.on { width: 36px; background: var(--honey-deep); }
.pause { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--muted); font: 500 14px/1 var(--text); cursor: pointer; touch-action: manipulation; transition: background-color 150ms ease, color 150ms ease; }
.pause:hover { background: rgba(14, 27, 51, 0.05); color: var(--ink); }
.pause-ico { width: 10px; height: 11px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.pause[aria-pressed="true"] .pause-ico { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
html:not(.js) .demo-bar { display: none; }

@container (max-width: 640px) {
  .stage { height: 100cqw; }
}

/* ---- The demo video, with a hand-written sign pointing at it.
   On a wide screen it sits in the middle of the stage and hero3d.js moves the laptop
   to its left and the phone to its right. Narrower, it stacks above the devices. */
.watch { position: relative; width: min(100%, 600px); margin: 112px auto 18px; z-index: 1; }
.film {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; background: var(--navy); color: var(--navy);
  box-shadow: 0 1px 0 rgba(14, 27, 51, 0.04), 0 18px 44px -14px rgba(14, 27, 51, 0.38), 0 0 0 1px rgba(14, 27, 51, 0.08);
}
.film img, .film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film img { object-fit: cover; transition: transform 400ms var(--ease), filter 300ms ease; }
.film::after { content: ""; position: absolute; inset: 0; background: rgba(14, 27, 51, 0.18); pointer-events: none; }
.play {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 78px; height: 78px; margin: -39px 0 0 -39px;
  border-radius: 50%; background: var(--honey); box-shadow: var(--lift), 0 10px 28px -6px rgba(14, 27, 51, 0.5);
  transition: scale 380ms var(--spring);
}
.play::before { content: ""; position: absolute; left: 31px; top: 24px; border-left: 24px solid var(--navy); border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.film:hover .play { scale: 1.07; }
.film:active .play { scale: 0.94; transition-duration: 90ms; }
.film:hover img { transform: scale(1.02); }
.film:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; }
.film.playing::after { display: none; }

.sign {
  position: absolute; left: -2%; bottom: calc(100% + 30px); margin: 0;
  padding: 10px 20px 8px; border-radius: 4px 10px 6px 12px;
  background: var(--honey); color: var(--navy);
  font: 400 clamp(21px, 2.1vw, 28px)/1.1 "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
  letter-spacing: 0.01em; white-space: nowrap;
  transform: rotate(-6deg); transform-origin: 30% 60%;
  box-shadow: 0 2px 0 var(--honey-deep), 0 12px 24px -10px rgba(14, 27, 51, 0.45);
}
/* A strip of tape holding the sign up. */
.sign::before {
  content: ""; position: absolute; left: 50%; top: -11px; width: 74px; height: 22px; margin-left: -37px;
  background: rgba(255, 253, 245, 0.72); border: 1px solid rgba(14, 27, 51, 0.06);
  transform: rotate(4deg); box-shadow: 0 1px 2px rgba(14, 27, 51, 0.08);
}
.arrow {
  position: absolute; left: calc(100% - 26px); top: 30%; width: 84px; height: 78px;
  fill: none; stroke: var(--navy); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(4deg); overflow: visible;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .watch:hover .sign { animation: wiggle 520ms var(--ease); }
}
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 30% { transform: rotate(-9deg); } 65% { transform: rotate(-4deg); } }

/* Wide: the video in the middle of the stage, devices on either side. */
@media (min-width: 900px) {
  .demo { display: grid; max-width: 1480px; }
  .demo > .watch, .demo > .stage { grid-area: 1 / 1; }
  .demo > .demo-bar { grid-area: 2 / 1; }
  .watch { align-self: center; width: clamp(400px, 38cqw, 620px); margin: 64px auto 0; }
  .stage { height: 40cqw; min-height: 440px; }
  .stage .poster { display: none; }
}

@media (max-width: 640px) {
  .demo { margin: 6px calc(-1 * var(--gutter)) 0; }
  .watch { width: auto; margin: 104px var(--gutter) 6px; }
  .sign { left: 0; bottom: calc(100% + 26px); font-size: 19px; }
  .arrow { left: calc(100% - 12px); width: 60px; height: 58px; }
}

/* ---- Where the team has worked: the companies' own logos in one liquid-glass block, grey until hovered.
   Square corners, nothing behind it. Each logo's
   height is a share of its cell's width (--h, in cqw), so the block stays even at any size. ---- */
.worked { max-width: 1200px; margin: clamp(44px, 6vw, 72px) auto 0; padding: 0 var(--gutter); text-align: center; }
.worked h2 { font: 500 15px/1.4 var(--text); letter-spacing: 0; color: var(--muted); }
.wall { position: relative; isolation: isolate; margin-top: 22px; }
.wall ul {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none; overflow: hidden; border-radius: 0;
  /* Frosted: a fine matte grain over milky white glass. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.1 0 0 0 0 0.2 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(14, 27, 51, 0.06),
    0 2px 6px rgba(14, 27, 51, 0.05), 0 28px 60px -32px rgba(14, 27, 51, 0.4);
}
.wall li {
  position: relative; z-index: 1; display: grid; place-items: center; aspect-ratio: 2.2; container-type: inline-size;
  box-shadow: inset -1px 0 0 rgba(14, 27, 51, 0.07), inset 0 -1px 0 rgba(14, 27, 51, 0.07);
  transition: background-color 180ms ease;
}
.wall li:nth-child(5n) { box-shadow: inset 0 -1px 0 rgba(14, 27, 51, 0.07); }
.wall li:nth-child(n+6) { box-shadow: inset -1px 0 0 rgba(14, 27, 51, 0.07); }
.wall li:nth-child(10) { box-shadow: none; }
.wall img { display: block; width: auto; max-width: 74%; height: calc(var(--h) * 1cqw); filter: var(--rest, grayscale(1)); opacity: 0.8; transition: filter 180ms ease, opacity 180ms ease; }
.wall li:hover { background: rgba(255, 255, 255, 0.4); }
.wall li:hover img { filter: none; opacity: 1; }
@media (max-width: 640px) {
  .wall ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wall li, .wall li:nth-child(5n), .wall li:nth-child(n+6) { box-shadow: inset -1px 0 0 rgba(14, 27, 51, 0.07), inset 0 -1px 0 rgba(14, 27, 51, 0.07); }
  .wall li:nth-child(2n) { box-shadow: inset 0 -1px 0 rgba(14, 27, 51, 0.07); }
  .wall li:nth-child(9) { box-shadow: inset -1px 0 0 rgba(14, 27, 51, 0.07); }
  .wall li:nth-child(10) { box-shadow: none; }
}

/* ---- Shared: section titles and cards ---- */
.sec-title { font-size: clamp(30px, 4vw, 44px); color: var(--navy); }
/* The app's glass card. */
.card {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--r-glass);
  box-shadow: var(--glass-shine), var(--glass-shadow);
}

/* ---- How it works ---- */
.how { max-width: 1000px; margin: clamp(80px, 10vw, 140px) auto 0; padding: 0 var(--gutter); text-align: center; }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; text-align: left; }
.how .card { padding: clamp(22px, 3vw, 32px); }
.card-head { display: flex; align-items: center; gap: 14px; }
.badge { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--tint); color: var(--honey-text); flex: none; }
.badge svg, .fine svg, .in svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.how h3 { font-size: clamp(24px, 2.6vw, 30px); color: var(--navy); }
.how ol { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 14px; }
.how li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; color: var(--ink); font-size: 17px; }
.how li::before {
  content: counter(n); display: grid; place-items: center; width: 28px; height: 28px; margin-top: -1px; border-radius: 50%;
  background: var(--honey); color: var(--navy); font: 700 14px/1 var(--display); font-variant-numeric: tabular-nums;
}
.fine {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px; border-radius: 999px;
  background: var(--soft); color: var(--muted); font-size: 15px; text-align: left;
}
.fine svg { width: 18px; height: 18px; flex: none; color: var(--navy); }

/* ---- Team ---- */
.team { max-width: 1000px; margin: clamp(80px, 10vw, 128px) auto 0; padding: 0 var(--gutter); text-align: center; }
.team-lede { margin-top: 12px; color: var(--muted); }
.team ul { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; text-align: left; }
.person { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; padding: 22px 64px 22px 22px; }
.avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: var(--honey); font: 700 19px/1 var(--display); letter-spacing: 0.02em; }
.who h3 { font-size: 20px; color: var(--navy); letter-spacing: -0.015em; }
.who p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.who .did { margin-top: 4px; color: var(--ink); font-weight: 600; }
.in { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 14px; color: var(--muted); transition: scale 380ms var(--spring), background-color 150ms ease, color 150ms ease; }
.in:hover { background: rgba(14, 27, 51, 0.05); color: var(--navy); }
.in:active { scale: 0.9; transition-duration: 90ms; }

/* ---- Contact ---- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; max-width: 1000px; margin: clamp(80px, 11vw, 144px) auto 0; padding: 0 var(--gutter); scroll-margin-top: 24px; }
.contact-intro { position: sticky; top: 32px; padding-top: 8px; }
.contact form.card { margin-top: 0; padding: clamp(20px, 3vw, 32px); }
.contact-lede { margin-top: 12px; color: var(--muted); }
form { margin-top: 28px; display: grid; gap: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 15px; font-weight: 600; color: var(--ink); }
/* Fields: the app's .input (frosted, the honey ring on focus). */
input, select, textarea {
  width: 100%; min-height: 52px; padding: 13px 16px;
  border: 1px solid var(--glass-hair); border-radius: var(--r-control);
  background: var(--glass-strong); color: var(--ink);
  font: 400 16px/1.4 var(--text);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
select { appearance: none; padding-right: 40px; background: var(--glass-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235e5a52' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center; }
select:invalid, select option[value=""] { color: var(--muted); }
select option { color: var(--ink); }
textarea { resize: vertical; min-height: 120px; }
::placeholder { color: #9c968a; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: transparent; box-shadow: var(--field-ring); }
input[aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.send-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.send-row .btn { min-width: 132px; min-height: 54px; border-radius: var(--r-control-lg); }
[data-contact-status] { flex: 1 1 220px; min-width: 0; color: var(--muted); font-size: 15px; }
form[data-state="sending"] .btn { opacity: 0.7; pointer-events: none; }
form[data-state="sent"] [data-contact-status] { color: var(--navy); font-weight: 600; }
form[data-state="error"] [data-contact-status], [data-contact-status].bad { color: var(--danger); }

/* ---- Footer ---- */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1000px; margin: clamp(80px, 10vw, 128px) auto 0; padding: 24px var(--gutter) max(32px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-underline-offset: 3px; }
.foot-links a:hover { color: var(--navy); }

@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .contact-intro { position: static; }
}
@media (max-width: 720px) {
  .how-grid, .team ul { grid-template-columns: 1fr; }
  .fine { border-radius: 14px; }
  .pair { grid-template-columns: 1fr; }
  .send-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .demo-bar { display: none; }
}
