/* The Vanta Lab: light (B) and dark (A). Dark follows the device until the
   visitor picks one with the sun/moon button, which is remembered. */
:root {
  --bg: #FAFAF9; --surface: #FFFFFF; --ink: #111111; --stone: #57534E; --line: #E7E5E4;
  --accent: #B04000; --btn: #111111; --on-btn: #FAFAF9;
  --chip-bg: #FDEEE4; --chip-ink: #9A3800; --live-bg: #E3F0E7; --live-ink: #2F6E4B;
  --tip: #111111; --glow: rgb(255 122 46 / .22);
  /* Braised's lifted look: a faint edge and a warm two-layer shadow. */
  --edge: rgb(74 52 28 / .05);
  --shadow-lift: 0 1px 2px rgb(74 52 28 / .08), 0 12px 28px -12px rgb(74 52 28 / .2);
  --shadow-lift-lg: 0 2px 4px rgb(74 52 28 / .08), 0 30px 60px -22px rgb(74 52 28 / .32);
  --drop: drop-shadow(0 10px 12px rgb(74 52 28 / .22));
  --nav-bg: rgb(250 250 249 / .78); --doc: #FFFFFF; --doc-line: #D4D4D8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0A0A; --surface: #141414; --ink: #F5F5F4; --stone: #A8A29E; --line: #262626;
    --accent: #FF8A45; --btn: #F5F5F4; --on-btn: #0A0A0A;
    --chip-bg: rgb(255 122 46 / .14); --chip-ink: #FF9A5C; --live-bg: rgb(124 199 154 / .16); --live-ink: #8FD3A9;
    --tip: #FFFFFF; --glow: rgb(255 122 46 / .30);
    /* Shadows hardly show on black, so the edge carries the card and hover glows. */
    --edge: rgb(255 255 255 / .07);
    --shadow-lift: 0 1px 2px rgb(0 0 0 / .5), 0 12px 28px -12px rgb(0 0 0 / .85);
    --shadow-lift-lg: 0 2px 4px rgb(0 0 0 / .5), 0 30px 60px -22px rgb(255 122 46 / .32);
    --drop: drop-shadow(0 10px 14px rgb(0 0 0 / .55));
    --nav-bg: rgb(20 20 20 / .78); --doc: #FAFAFA; --doc-line: #D4D4D8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0A0A; --surface: #141414; --ink: #F5F5F4; --stone: #A8A29E; --line: #262626;
  --accent: #FF8A45; --btn: #F5F5F4; --on-btn: #0A0A0A;
  --chip-bg: rgb(255 122 46 / .14); --chip-ink: #FF9A5C; --live-bg: rgb(124 199 154 / .16); --live-ink: #8FD3A9;
  --tip: #FFFFFF; --glow: rgb(255 122 46 / .30);
  /* Shadows hardly show on black, so the edge carries the card and hover glows. */
  --edge: rgb(255 255 255 / .07);
  --shadow-lift: 0 1px 2px rgb(0 0 0 / .5), 0 12px 28px -12px rgb(0 0 0 / .85);
  --shadow-lift-lg: 0 2px 4px rgb(0 0 0 / .5), 0 30px 60px -22px rgb(255 122 46 / .32);
  --drop: drop-shadow(0 10px 14px rgb(0 0 0 / .55));
  --nav-bg: rgb(20 20 20 / .78); --doc: #FAFAFA; --doc-line: #D4D4D8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; transition: background-color .35s ease, color .35s ease;
}
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: #FF7A2E; color: #0A0A0A; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--btn); color: var(--on-btn); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }
@media (min-width: 720px) { .wrap { padding: 0 48px; } }

.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.lede { font-size: 19px; color: var(--stone); }
.pill, .ghost {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; font-size: 16px; transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.pill { background: var(--btn); color: var(--on-btn); font-weight: 500; }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ghost { border: 1px solid var(--line); }
.pill:hover, .ghost:hover { transform: translateY(-2px); }
.pill:hover { box-shadow: var(--shadow-lift-lg); }
.ghost:hover { background: var(--surface); box-shadow: var(--shadow-lift); }

/* Top bar: clear over the hero, frosted once the page scrolls under it. */
.nav { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid transparent; transition: background-color .3s ease, border-color .3s ease; }
.nav.scrolled { background: var(--nav-bg); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.nav-row { height: 72px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.brand.small { font-size: 15px; font-weight: 400; color: var(--stone); gap: 10px; }
.mark-small { width: 30px; height: 30px; }
.brand.small .mark-small { width: 22px; height: 22px; }
.tip { fill: var(--tip); transition: fill .35s ease; }
.links { margin-left: auto; display: flex; gap: 32px; font-size: 15px; color: var(--stone); }
.links a:hover { color: var(--ink); }
.theme {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--ink); display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.theme { transition: background-color .3s ease, box-shadow .3s ease; }
.theme:hover { background: var(--surface); box-shadow: var(--shadow-lift); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1); }
/* Shows what a tap switches to: the moon in light mode, the sun in dark. */
.icon-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"] .icon-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .icon-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
}
@media (max-width: 719px) { .links { display: none; } .theme { margin-left: auto; } }

/* Hero */
.hero { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 72px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; gap: 48px; padding-top: 72px; padding-bottom: 104px; } }
.hero h1 { font-size: clamp(40px, 6.4vw, 68px); line-height: 1.03; margin: 18px 0 22px; }
.hero .lede { max-width: 540px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-art { position: relative; display: grid; place-items: center; height: clamp(280px, 40vw, 440px); }
.mark-big { position: relative; width: clamp(170px, 26vw, 300px); height: auto; overflow: visible; filter: var(--drop); }
.glow { position: absolute; width: 120%; aspect-ratio: 1; max-width: 520px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 62%); animation: breathe 5s ease-in-out infinite; }

.band { transform-box: fill-box; transform-origin: center; }
.drop { animation: drop .9s var(--d, 0s) cubic-bezier(.22, 1, .36, 1) both; }
.pop { animation: pop .7s var(--d, 0s) cubic-bezier(.22, 1, .36, 1) both; }
.rise { animation: rise .9s var(--d, 0s) cubic-bezier(.22, 1, .36, 1) both; }

/* What our apps do, sliding past */
.marquee { padding: 8px 0 24px; display: grid; gap: 12px; }
.track { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.row { display: flex; gap: 10px; width: max-content; animation: marquee 48s linear infinite; }
.row.reverse { animation-direction: reverse; animation-duration: 56s; }
.track:hover .row { animation-play-state: paused; }
.row span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; color: var(--stone); white-space: nowrap; }

/* Sections */
.section { padding-block: 96px 72px; border-top: 1px solid var(--line); }
.section h2, .contact h2 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; margin-top: 14px; max-width: 760px; }

.apps { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 820px) { .apps { grid-template-columns: 1fr 1fr; gap: 24px; } }
.app {
  background: var(--surface); border: 1px solid var(--edge); border-radius: 28px; padding: 24px;
  box-shadow: var(--shadow-lift); display: flex; flex-direction: column; gap: 14px;
  transition: translate .3s ease, box-shadow .3s ease;
}
@media (min-width: 720px) { .app { padding: 32px; } }
@media (hover: hover) {
  /* translate, not transform, so the lift doesn't fight the scroll reveal. */
  .app:hover, .how > div:hover { translate: 0 -4px; box-shadow: var(--shadow-lift-lg); }
  .app:hover .arrow { transform: translateX(5px); }
}
.app-head { display: flex; justify-content: space-between; align-items: flex-start; }
.app-head img { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow-lift); }
.chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--chip-bg); color: var(--chip-ink); }
.chip.live { background: var(--live-bg); color: var(--live-ink); }
.app h3 { font-size: 26px; }
.tagline { font-size: 17px; font-weight: 400; }
.app .body { font-size: 15.5px; color: var(--stone); }
.app-link { margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 500; color: var(--accent); align-self: flex-start; }
.arrow { display: inline-block; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }

/* A small demo in each card, on a 7 second loop */
.demo { position: relative; height: 200px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.demo-braised .link-chip { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; min-height: 34px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--stone); white-space: nowrap; animation: link-out 7s ease-in-out infinite; }
.recipe { position: absolute; left: 50%; top: 16px; bottom: 16px; width: min(260px, 82%); translate: -50% 0; border-radius: 14px; background: #FBF8F2; color: #1D1A17; padding: 10px; font-size: 12px; line-height: 1.5; box-shadow: var(--shadow-lift); animation: card-in 7s cubic-bezier(.22, 1, .36, 1) infinite both; }
.recipe img { width: 100%; height: 64px; object-fit: cover; border-radius: 9px; }
.recipe-title { font-size: 13.5px; font-weight: 500; margin: 7px 0 3px; }
.recipe b { font-weight: 600; display: inline-block; min-width: 30px; }
.doc { position: absolute; left: 50%; top: 16px; bottom: 16px; width: min(220px, 70%); translate: -50% 0; background: var(--doc); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; box-shadow: var(--shadow-lift); }
.doc span { display: block; height: 6px; width: var(--w, 80%); border-radius: 3px; background: var(--doc-line); }
.doc .doc-title { width: 60%; height: 8px; background: #27272A; margin-bottom: 3px; }
.doc .hi { animation: hi 7s ease-in-out infinite; }
.doc .sweep { position: absolute; left: 0; right: 0; width: auto; height: 3px; border-radius: 0; background: #FF7A2E; box-shadow: 0 0 12px #FF7A2E; animation: sweep 7s linear infinite; }
.paused .demo *, .paused .row { animation-play-state: paused !important; }

.how { display: grid; gap: 20px; margin-top: 40px; }
.how > div {
  background: var(--surface); border: 1px solid var(--edge); border-radius: 22px; padding: 24px;
  box-shadow: var(--shadow-lift); transition: translate .3s ease, box-shadow .3s ease;
}
@media (min-width: 640px) { .how { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .how { grid-template-columns: repeat(4, 1fr); } }
.how h3 { font-size: 18px; margin: 16px 0 6px; }
.how p { font-size: 15.5px; color: var(--stone); }
.tile { width: 44px; height: 44px; border-radius: 13px; background: var(--chip-bg); color: var(--chip-ink); display: grid; place-items: center; }
.tile svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.contact-wrap { padding-top: 24px; padding-bottom: 80px; }
.contact { background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow-lift); border-radius: 32px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
@media (min-width: 820px) { .contact { flex-direction: row; align-items: center; justify-content: space-between; padding: 56px; } }
.contact h2 { margin: 14px 0 12px; }
.contact .lede { font-size: 17px; max-width: 540px; }

.foot { border-top: 1px solid var(--line); padding-top: 32px; padding-bottom: max(48px, env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; font-size: 14px; }
.foot-links { display: flex; gap: 24px; color: var(--stone); }
.foot-links a:hover { color: var(--ink); }

/* Fades up into place the first time it scrolls into view (as on Braised's page). */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--d, 0ms); }
.js .reveal.visible { opacity: 1; transform: none; }
/* Cards keep their staggered reveal, but the hover lift answers at once. */
.js .app.reveal, .js .how > .reveal {
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms), transform .8s cubic-bezier(.22, 1, .36, 1) var(--d, 0ms), translate .3s ease, box-shadow .3s ease;
}

@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-36px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes breathe { 0%, 100% { opacity: .6; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes link-out { 0%, 20% { opacity: 1; scale: 1; } 28%, 92% { opacity: 0; scale: .9; } 100% { opacity: 1; scale: 1; } }
@keyframes card-in { 0%, 24% { opacity: 0; transform: translateY(12px) scale(.97); } 34%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes sweep { 0% { top: -6%; opacity: 0; } 8% { opacity: 1; } 40% { top: 100%; opacity: 0; } 100% { top: 100%; opacity: 0; } }
@keyframes hi { 0%, 40% { background-color: var(--doc-line); } 50%, 88% { background-color: #FF8A45; } 96%, 100% { background-color: var(--doc-line); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  /* Still pictures instead: the finished recipe card and the picked-out lines. */
  .rise, .drop, .pop, .glow, .row, .recipe, .link-chip, .doc .hi, .doc .sweep { animation: none !important; }
  .demo-braised .link-chip, .doc .sweep { display: none; }
  .doc .hi { background: #FF8A45; }
  .track { overflow-x: auto; }
}
