/* sehn.ai: vintage hand-drawn, plum & dusty rose, now with things to touch */

:root {
  /* dark sections (night blue) */
  --night-1: #18263F;
  --night-2: #0A111D;
  --night-card: #16233A;
  --night-card-2: #16202E;
  --night-line: #2A3A52;
  --night-frame: #3A4E74;
  --on-dark: #F5F2EA;
  --on-dark-2: #B9C3D0;
  --on-dark-3: #8C96A5;

  /* light sections (old paper) */
  --paper-1: #FBF7EE;
  --paper-2: #ECE2CD;
  --paper-bg: #F6F0E3;     /* flat paper between paper-1 and paper-2, so sections flow into each other */
  --paper-card: #FBF9F4;
  --paper-cream: #FFFDF7;
  --paper-line: #D9D3C5;
  --paper-frame: #BFA77F;
  --paper-dash: #CDBB9C;
  --ink: #16202E;
  --ink-2: #46505E;
  --ink-3: #5F6775;

  /* accents */
  --plum: #8E2F55;
  --plum-deep: #6E2A47;
  --plum-mid: #9C4466;
  --plum-line: #B4506F;
  --plum-track: #7E3352;
  --rose: #E7A1B6;
  --rose-pale: #F7DDE5;
  --rose-soft: #F3D6DF;
  --rose-frame: #D8A3B7;
  --rose-white: #FBF2F5;

  /* illustration ink */
  --sketch-ink: #3B2A1E;
  --sketch-tan: #E9C9A0;
  --sketch-sand: #F3E3C6;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --header-h: 68px;
  --shadow-paper: 0 1px 0 rgba(59, 42, 30, .06), 0 10px 24px -12px rgba(59, 42, 30, .28);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--paper-bg); color: var(--ink);
  font-family: var(--sans); font-size: 18px; line-height: 1.5; overflow-x: hidden;
}
@media (min-width: 900px) { body { font-size: 19px; } }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.01em; }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--rose); color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-family: var(--mono); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 721px) { .wrap { padding: 0 32px; } }

/* ---------- sections ---------- */
.section { position: relative; padding: 88px 0; }
@media (min-width: 721px) { .section { padding: 120px 0; } }
.section--light { background: var(--paper-bg); color: var(--ink); }
.section--dark  { background: radial-gradient(ellipse at 50% 30%, #18263F 0%, #0A111D 100%); color: var(--on-dark); }
.section--dark-left { background: radial-gradient(ellipse at 30% 30%, #18263F 0%, #0A111D 100%); color: var(--on-dark); }
.section--plum  { background: radial-gradient(ellipse at 50% 30%, #9C4466 0%, #6E2A47 100%); color: var(--rose-white); }
.section--tight-top { padding-top: 24px; }

/* torn / wavy edges where dark meets paper */
.edge { position: absolute; left: 0; right: 0; height: 28px; pointer-events: none;
  background-repeat: repeat-x; background-size: 1200px 28px; }
.edge--bottom { bottom: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,28 L0,14 Q75,4 150,14 T300,12 T450,16 T600,11 T750,15 T900,10 T1050,15 T1200,14 L1200,28 Z' fill='%23F6F0E3'/%3E%3C/svg%3E"); }
.edge--top { top: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L0,14 Q75,24 150,14 T300,16 T450,12 T600,17 T750,13 T900,18 T1050,13 T1200,14 L1200,0 Z' fill='%23F6F0E3'/%3E%3C/svg%3E"); }
.edge--bottom-night { bottom: -1px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 28' preserveAspectRatio='none'%3E%3Cpath d='M0,28 L0,14 Q75,4 150,14 T300,12 T450,16 T600,11 T750,15 T900,10 T1050,15 T1200,14 L1200,28 Z' fill='%230E1726'/%3E%3C/svg%3E"); }

.eyebrow {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 4px;
  font-size: 14px; color: var(--plum); margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: "✦"; letter-spacing: 0; font-size: 12px; }
.section--dark .eyebrow, .section--dark-left .eyebrow { color: var(--rose); }
.section--plum .eyebrow { color: var(--rose-pale); }

.lead { color: var(--ink-2); font-size: 1.05em; max-width: 36em; }
.section--dark .lead, .section--dark-left .lead { color: var(--on-dark-2); }
.section--plum .lead { color: var(--rose-white); opacity: .92; }

/* heading left, text right (like a magazine spread) */
.split-head { display: grid; gap: 20px; margin-bottom: 56px; align-items: end; }
@media (min-width: 960px) { .split-head { grid-template-columns: 1.15fr 1fr; gap: 72px; } .split-head .lead { padding-bottom: 6px; } }

/* handwritten notes */
.note {
  font-family: var(--hand); font-weight: 600; font-size: 24px; line-height: 1.1; color: var(--plum);
  display: inline-flex; align-items: center; gap: 6px; transform: rotate(-3deg);
}
.section--dark .note, .section--dark-left .note, .site-header .note { color: var(--rose); }
.section--plum .note { color: var(--rose-pale); }
.note svg { width: 46px; height: 30px; flex: none; }

/* ---------- cards, chips ---------- */
.card { background: var(--paper-card); border: 1px solid var(--paper-line); border-radius: 16px; padding: 24px; }
.card--dark { background: var(--night-card-2); border-color: var(--night-line); color: var(--on-dark); }
@media (min-width: 721px) { .card { padding: 32px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip {
  background: var(--paper-cream); border: 1px solid var(--paper-line); border-radius: 999px;
  padding: 5px 14px; font-size: 15px; color: var(--ink); white-space: nowrap;
}
.card--dark .chip, .chat .chip { background: transparent; border-color: var(--night-frame); color: var(--on-dark); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 2px; font-size: 14px; font-weight: 700;
  padding: 14px 24px; border-radius: 10px; border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--rose { background: var(--rose); color: var(--ink); }
.btn--plum { background: var(--plum); color: var(--rose-white); }
.btn--ghost { background: transparent; color: var(--on-dark); border-color: var(--night-frame); box-shadow: none; }
.btn--ghost:hover { border-color: var(--rose); color: var(--rose); box-shadow: none; }
.btn--light { background: var(--rose-white); color: var(--plum-deep); border-color: var(--plum-deep); box-shadow: 4px 4px 0 var(--plum-deep); }
.btn--light:hover { box-shadow: 5px 5px 0 var(--plum-deep); }
.btn--small { padding: 10px 16px; font-size: 13px; box-shadow: 3px 3px 0 var(--ink); }
.btn svg { width: 14px; height: 14px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(10, 17, 29, .9); color: var(--on-dark);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--night-line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 46px; height: auto; }
.brand span { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; }
.site-nav { display: none; gap: 4px; }
@media (min-width: 900px) { .site-nav { display: flex; } }
.site-nav a {
  text-decoration: none; color: var(--on-dark-2); font-size: 16px; padding: 8px 12px; border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
}
.site-nav a:hover { color: var(--on-dark); background: rgba(255, 255, 255, .05); }
.site-nav a.is-active { color: var(--rose); }
.site-header .btn { border-color: var(--rose); box-shadow: 3px 3px 0 var(--plum); }
.site-header .btn:hover { box-shadow: 4px 4px 0 var(--plum); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 112px; overflow: hidden; }
@media (min-width: 960px) { .hero { padding: 72px 0 140px; } }
.hero__grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 40px; } }
.hero__art { position: relative; order: -1; max-width: 420px; margin: 0 auto; width: 100%; }
@media (min-width: 960px) { .hero__art { order: 0; max-width: 580px; } }
.hero__logo { width: 100%; height: auto; }
.hero__art .note { position: absolute; right: 2%; bottom: 4%; transform: rotate(-6deg); }
.hero__art .note svg { transform: scaleX(-1) rotate(10deg); }
.hero h1 { font-size: clamp(46px, 7vw, 92px); letter-spacing: -0.02em; color: var(--on-dark); }
.hero h1 em { color: var(--rose); }
.hero__sub { color: var(--on-dark-2); max-width: 30em; margin-top: 24px; font-size: 1.1em; }
.hero__tagline { font-family: var(--serif); font-style: italic; color: var(--rose); font-size: clamp(20px, 2vw, 24px); margin-top: 22px; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; }
.hero__pron { margin-top: 34px; display: flex; align-items: center; gap: 14px; color: var(--on-dark-3); font-size: 15px; }
.hero__pron .note { font-size: 26px; transform: rotate(-2deg); }
.hero .eyebrow { color: var(--rose); }

/* logo motion */
.logo-star { animation: twinkle 4s ease-in-out infinite; }
.logo-star.s2 { animation-duration: 3.4s; animation-delay: -1.2s; }
.logo-star.s3 { animation-duration: 4.6s; animation-delay: -2.1s; }
.logo-star.s4 { animation-duration: 3s;   animation-delay: -.6s; }
.logo-star.s5 { animation-duration: 5s;   animation-delay: -3s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.logo-dust > * > * { animation: dust-in .7s ease-out both; animation-delay: calc(.6s + var(--i) * .12s); }
@keyframes dust-in { from { opacity: 0; } to { opacity: 1; } }
.iris { will-change: transform; }

/* ---------- problem: puzzle ---------- */
.puzzle-layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .puzzle-layout { grid-template-columns: 1.35fr 1fr; gap: 56px; } }
.puzzle-card { position: relative; padding: 18px; background: var(--paper-cream); box-shadow: var(--shadow-paper); transform: rotate(-.6deg); }
@media (min-width: 721px) { .puzzle-card { padding: 28px; } }
.tape {
  position: absolute; top: -12px; left: 50%; width: 110px; height: 24px; transform: translateX(-50%) rotate(-2deg);
  background: rgba(231, 161, 182, .55); border-left: 2px dotted rgba(255, 255, 255, .6); border-right: 2px dotted rgba(255, 255, 255, .6);
}
.puzzle { position: relative; aspect-ratio: 480 / 300; }
.puzzle > svg { width: 100%; height: 100%; overflow: visible; }
.puzzle .tile { transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: center; }
.puzzle .tile-edge { opacity: 0; transition: opacity .4s ease; }
.puzzle.is-patched .tile { transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) rotate(calc(var(--r) * 1deg)) scale(.86); }
.puzzle.is-patched .tile-edge { opacity: 1; }
.trace { fill: none; stroke: var(--plum); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; opacity: .85; }
.trace.is-drawing { animation: draw 1.6s ease-in-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.puzzle.is-patched .trace { opacity: 0; }

.pz-label, .pz-box {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--mono); font-weight: 700; color: var(--ink); line-height: 1;
  transition: opacity .3s ease;
}
.pz-label { font-size: clamp(12px, 2.2vw, 16px); pointer-events: none; }
.pz-box {
  width: 14%; height: 19%; border-radius: 10px; border: 2px solid transparent; background: transparent; cursor: pointer;
  font-size: clamp(14px, 2.6vw, 20px); display: grid; place-items: center;
}
.pz-box:hover { border-color: var(--plum); background: rgba(231, 161, 182, .25); }
.pz-box.is-right { border-color: var(--plum); background: rgba(231, 161, 182, .5); }
.pz-box.is-wrong { animation: shake .4s ease; }
@keyframes shake { 25% { transform: translate(-56%, -50%); } 75% { transform: translate(-44%, -50%); } }
.puzzle.is-patched .pz-label, .puzzle.is-patched .pz-box { opacity: 0; pointer-events: none; }

.puzzle-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.puzzle-q { font-family: var(--serif); font-size: 22px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: 0; padding: 4px; font-size: 15px; color: var(--ink-2); }
.switch__track { position: relative; width: 46px; height: 26px; border-radius: 99px; background: var(--paper-line); border: 2px solid var(--ink); transition: background-color .2s ease; flex: none; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper-cream); border: 2px solid var(--ink); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.switch[aria-pressed="true"] .switch__track { background: var(--rose); }
.switch[aria-pressed="true"] .switch__track::after { transform: translateX(20px); }
.chat .switch { color: var(--on-dark-2); }
.chat .switch__track { border-color: var(--on-dark-2); background: var(--night-line); }
.chat .switch__track::after { border-color: var(--on-dark-2); background: var(--on-dark); }
.chat .switch[aria-pressed="true"] .switch__track { background: var(--rose); }

.puzzle-feedback { min-height: 3em; margin-top: 14px; color: var(--ink-2); font-size: 17px; }
.puzzle-feedback strong { color: var(--plum); font-weight: 600; }
.problem-side p + p { margin-top: 18px; }
.problem-side .note { margin-top: 28px; }
.patch-caption { display: none; font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--plum); margin-top: 6px; }
.puzzle-card.is-patched .patch-caption { display: block; }

/* ---------- how it works: steps + chat ---------- */
.how { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .how { grid-template-columns: .9fr 1.25fr; gap: 64px; } }
.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps-v > li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px dashed var(--paper-dash); }
.steps-v > li:first-child { padding-top: 0; }
.steps-v > li:last-child { border-bottom: 0; }
.steps-v .num { font-family: var(--mono); font-size: 22px; color: var(--plum); letter-spacing: 2px; padding-top: 2px; }
.steps-v h3 { font-size: 24px; margin-bottom: 8px; }
.steps-v p { color: var(--ink-2); font-size: 17px; }
.steps-v .chips { margin-top: 10px; }
.steps-v .quote { font-family: var(--serif); font-style: italic; color: var(--plum); font-size: 20px; }

.chat {
  position: relative; background: var(--night-card-2); color: var(--on-dark); border-radius: 18px;
  border: 1px solid var(--night-line); box-shadow: 0 24px 48px -24px rgba(10, 17, 29, .55); overflow: hidden;
}
.chat__bar { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--night-line); }
.chat__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--night-frame); }
.chat__bar span { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--on-dark-3); text-transform: uppercase; }
.chat__tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px 0; }
.chat__tab {
  cursor: pointer; border: 1px solid var(--night-frame); background: transparent; color: var(--on-dark-2);
  border-radius: 99px; padding: 6px 14px; font-size: 14px; transition: all .2s ease;
}
.chat__tab:hover { color: var(--on-dark); border-color: var(--on-dark-3); }
.chat__tab[aria-selected="true"] { background: var(--rose); border-color: var(--rose); color: var(--ink); }
.chat__body { padding: 20px 18px 8px; min-height: 360px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 721px) { .chat__body { padding: 24px 28px 8px; } }
.bubble { max-width: 88%; padding: 12px 16px; border-radius: 16px; font-size: 16px; line-height: 1.45; animation: pop .35s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.bubble--user { align-self: flex-end; background: var(--paper-cream); color: var(--ink); border-bottom-right-radius: 4px; }
.bubble--user svg { width: 100%; max-width: 220px; height: auto; margin-top: 10px; border-radius: 8px; background: var(--sketch-sand); }
.bubble--agent { align-self: flex-start; background: var(--night-card); border: 1px solid var(--night-line); border-bottom-left-radius: 4px; }
.bubble--agent.is-right { background: var(--rose-soft); color: var(--plum-deep); border-color: var(--rose-frame); font-family: var(--serif); font-size: 20px; font-style: italic; }
.bubble__tag { display: block; font-family: var(--hand); font-size: 20px; font-style: normal; margin-top: 4px; }
.bubble--agent .bubble__tag { color: var(--on-dark-3); }
.bubble--agent.is-right .bubble__tag { color: var(--plum); }
.toolcall { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; color: var(--rose); animation: pop .35s ease both; }
.toolcall .chip { font-family: var(--sans); font-size: 13px; letter-spacing: 0; padding: 3px 10px; }
.typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; border-radius: 16px; background: var(--night-card); border: 1px solid var(--night-line); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--on-dark-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.chat__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--night-line); }
.chat__foot small { color: var(--on-dark-3); font-size: 13px; }
.chat-wrap { position: relative; }
.chat-wrap > .note { position: absolute; right: 8px; top: -40px; }
@media (max-width: 720px) { .chat-wrap > .note { position: static; margin: 0 0 8px; } }

/* ---------- what we model: tabs + stage ---------- */
.model { display: grid; gap: 0; overflow: hidden; padding: 0; }
@media (min-width: 960px) { .model { grid-template-columns: 1fr 1.15fr; } }
.model__list { list-style: none; margin: 0; padding: 12px; display: grid; gap: 4px; }
@media (min-width: 721px) { .model__list { padding: 24px; } }
.model__btn {
  width: 100%; display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--on-dark);
  transition: background-color .2s ease, border-color .2s ease;
}
.model__btn:hover { background: rgba(255, 255, 255, .04); }
.model__btn[aria-selected="true"] { background: var(--night-card); border-color: var(--night-frame); }
.model__btn strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.2; }
.model__btn span { color: var(--on-dark-2); font-size: 16px; }
.model__btn .arrow { color: var(--rose); opacity: 0; transition: opacity .2s ease, transform .2s ease; transform: translateX(-4px); font-size: 20px; }
.model__btn[aria-selected="true"] .arrow { opacity: 1; transform: none; }
.model__stage { position: relative; background: radial-gradient(ellipse at 50% 40%, #18263F 0%, #0A111D 100%); border-top: 1px solid var(--night-line); padding: 24px 24px 56px; display: grid; place-items: center; min-height: 300px; }
@media (min-width: 960px) { .model__stage { border-top: 0; border-left: 1px solid var(--night-line); } }
.model__stage svg { width: 100%; max-width: 440px; height: auto; }
.model__caption { position: absolute; left: 24px; bottom: 16px; font-family: var(--hand); font-size: 24px; color: var(--rose); }
.model-next { margin: 0 24px 24px; padding: 14px 18px; border: 2px dashed var(--night-frame); border-radius: 10px; color: var(--on-dark-2); font-size: 16px; }
.model-next b { font-family: var(--mono); text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--rose); margin-right: 8px; }

/* stage elements: everything dim, the active idea lights up */
.st > g { transition: opacity .5s ease; opacity: .18; }
.st .st-blob path { transition: fill .6s ease, stroke .4s ease; }
.st .st-front { transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: center; }
.st .st-key { transform-box: fill-box; transform-origin: center; }
.st .st-path { stroke-dasharray: 4 8; }
.st[data-mode="boundaries"] .st-blob { opacity: 1; }
.st[data-mode="boundaries"] .st-blob path { fill: transparent; stroke: #E7A1B6; stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.8s ease forwards; }
.st[data-mode="surfaces"] .st-blob { opacity: 1; }
.st[data-mode="surfaces"] .st-blob path { fill: #E7A1B6; stroke: #F5F2EA; }
.st[data-mode="connections"] .st-conn { opacity: 1; }
.st[data-mode="connections"] .st-path { animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.st[data-mode="depth"] .st-depth { opacity: 1; }
.st[data-mode="depth"] .st-front { transform: translate(-10px, 8px); }
.st[data-mode="filtering"] .st-filter { opacity: 1; }
.st[data-mode="filtering"] .st-noise { opacity: .1; }
.st[data-mode="filtering"] .st-key { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.35); } }

/* ---------- evidence ---------- */
.evidence { padding-top: 140px; padding-bottom: 150px; }
.chart { display: grid; gap: 26px; margin: 0; padding: 0; list-style: none; }
.chart__row { display: grid; gap: 10px; }
@media (min-width: 960px) { .chart__row { grid-template-columns: 340px 520px auto; align-items: center; gap: 28px; } }
.chart__label small { display: block; color: var(--on-dark-3); font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-top: 2px; }
.chart__track { display: block; width: 260px; height: 28px; background: #2A3A52; border-radius: 8px; overflow: hidden; }
.chart__bar { display: block; height: 100%; background: #8C96A5; border-radius: 8px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.chart__bar--ours { background: #E7A1B6; }
/* fixed pixel widths: 260px track on phones, 520px on desktop (32%, 34%, 87%) */
.w32 { width: 82px; }  .w34 { width: 87px; }  .w87 { width: 225px; }
@media (min-width: 960px) {
  .chart__track { width: 520px; }
  .w32 { width: 164px; } .w34 { width: 174px; } .w87 { width: 450px; }
}
.js .chart:not(.is-visible) .chart__bar { width: 0; }
.chart__row:nth-child(2) .chart__bar { transition-delay: .15s; }
.chart__row:nth-child(3) .chart__bar { transition-delay: .3s; }
.chart__value { font-family: var(--mono); font-size: 18px; color: var(--on-dark-2); letter-spacing: 1px; }
.chart__value strong { color: var(--on-dark); font-size: 22px; }
.chart__row--ours .chart__value strong, .chart__row--ours .chart__label { color: var(--rose); }
.chart-title { font-size: 24px; color: var(--on-dark); margin-bottom: 28px; }
.chart-note { margin-top: 28px; color: var(--on-dark-3); font-size: 16px; max-width: 720px; }
.evidence__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; margin-top: 48px; }
.honest { padding: 18px 22px; border: 2px dashed var(--night-frame); border-radius: 10px; color: var(--on-dark-2); max-width: 720px; }
.honest b { font-family: var(--mono); text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--rose); display: block; margin-bottom: 6px; }

/* ---------- markets: sticky notes ---------- */
.markets { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.market {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 22px 24px;
  background: var(--paper-cream); box-shadow: var(--shadow-paper); border-radius: 4px;
  transform: rotate(var(--tilt, 0deg)); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s ease, opacity .8s ease;
}
.market:nth-child(1) { --tilt: -1.6deg; } .market:nth-child(2) { --tilt: 1.2deg; background: var(--rose-white); }
.market:nth-child(3) { --tilt: -.8deg; } .market:nth-child(4) { --tilt: 1.6deg; background: var(--rose-white); }
.market:nth-child(5) { --tilt: -1.2deg; }
.market:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 2px 0 rgba(59, 42, 30, .06), 0 22px 30px -14px rgba(59, 42, 30, .35); }
.market .tape { width: 70px; height: 20px; top: -10px; }
.market:nth-child(even) .tape { background: rgba(233, 201, 160, .7); transform: translateX(-50%) rotate(3deg); }
.market svg { width: 100%; height: auto; aspect-ratio: 160 / 100; }
.market h3 { font-size: 23px; }
.market p { color: var(--ink-2); font-size: 16px; }
.status { display: grid; gap: 14px; margin-top: 48px; }
@media (min-width: 960px) { .status { grid-template-columns: 1fr 1fr 1fr; } }
.status > div { padding: 16px 20px; border-radius: 10px; font-size: 17px; }
.status b { display: flex; align-items: center; gap: 8px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--plum); margin-bottom: 4px; }
.status__now { background: var(--rose-soft); border: 1px solid var(--rose-frame); }
.status__now b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--plum); animation: blink 1.6s infinite; }
.status__test { background: var(--paper-card); border: 1px solid var(--paper-line); }
.status__next { border: 2px dashed var(--paper-dash); }

/* ---------- the name + stereogram ---------- */
.name-grid { display: grid; gap: 20px 72px; align-items: start; margin-bottom: 56px; }
@media (min-width: 960px) { .name-grid { grid-template-columns: 1fr 1fr; } }
.polaroid-wrap { max-width: 980px; margin: 0 auto; }
.name-text p { color: var(--ink-2); }
.name-text p + p { margin-top: 16px; }
.name-text .big { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); line-height: 1.25; color: var(--ink); margin: 0 0 18px; }
.name-text .big em { color: var(--plum); }
.polaroid { position: relative; background: #FBF7EE; padding: 30px 16px 20px; border-radius: 12px; box-shadow: var(--shadow-paper); transform: rotate(.8deg); }
.polaroid .tape { left: 18%; transform: translateX(-50%) rotate(-6deg); }
.polaroid .tape + .tape { left: 82%; transform: translateX(-50%) rotate(5deg); background: rgba(233, 201, 160, .7); }
.stereo { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 4px; padding-top: 16px; }
.stereo__inner { position: relative; min-width: 700px; }
.stereo img { width: 100%; height: auto; border-radius: 4px; }
.stereo__dots { position: absolute; top: -14px; left: 0; right: 0; height: 10px; }
.stereo__dots i { position: absolute; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); }
.stereo__dots i:first-child { left: 45%; } .stereo__dots i:last-child { left: 55%; }
.stereo__answer {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; border-radius: 4px;
  background: rgba(251, 247, 238, .9); opacity: 0; transition: opacity .35s ease;
  font-family: var(--serif); font-weight: 600; font-size: 210px; color: var(--plum); letter-spacing: -0.02em;
}
.stereo.is-peeking .stereo__answer { opacity: 1; }
.stereo-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.stereo-controls p { font-size: 16px; color: var(--ink-2); max-width: 30em; }
.stereo-scroll-hint { display: none; font-family: var(--mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
@media (max-width: 760px) { .stereo-scroll-hint { display: block; } }
.howto { margin-top: 20px; color: var(--ink-2); font-size: 16px; }
.howto summary { cursor: pointer; font-family: var(--mono); text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--plum); }
.howto p { margin-top: 10px; }

/* ---------- team ---------- */
.team { display: grid; gap: 28px; }
@media (min-width: 900px) { .team { grid-template-columns: 1fr 1fr; } }
.person { display: grid; grid-template-columns: auto 1fr; gap: 20px 24px; align-items: center; }
@media (max-width: 560px) { .person { grid-template-columns: 1fr; } }
.photo { position: relative; width: 150px; transform: rotate(-3deg); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.person:nth-child(2) .photo { transform: rotate(3deg); }
.person:hover .photo { transform: rotate(0) scale(1.03); }
.photo img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--paper-cream); box-shadow: var(--shadow-paper); }
.person h3 { font-size: 30px; }
.person .role { font-family: var(--mono); text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--plum); margin-top: 6px; }
.card--dark.person .role { color: var(--rose); }
.person ul { grid-column: 1 / -1; margin: 6px 0 0; padding-left: 1.1em; color: var(--ink-2); font-size: 17px; }
.card--dark.person ul { color: var(--on-dark-2); }
.person li + li { margin-top: 6px; }
.person li::marker { color: var(--plum); }
.card--dark.person li::marker { color: var(--rose); }

.story { margin-top: 88px; }
.story h3 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 36px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; position: relative; }
@media (min-width: 900px) { .timeline { grid-template-columns: repeat(4, 1fr); } }
.timeline li { position: relative; padding-left: 34px; color: var(--ink-2); font-size: 17px; }
.timeline li::before { content: ""; position: absolute; top: 18px; bottom: -28px; left: 7px; border-left: 2px dashed var(--plum-line); }
.timeline li:last-child::before { display: none; }
@media (min-width: 900px) {
  .timeline li { padding-left: 0; padding-top: 34px; }
  .timeline li::before { top: 9px; bottom: auto; left: 0; right: -28px; border-left: 0; border-top: 2px dashed var(--plum-line); }
  .timeline li:last-child::before { display: block; right: 0; }
}
.timeline li::after { content: ""; position: absolute; top: 2px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--paper-bg); border: 3px solid var(--plum); }
.timeline li:last-child::after { background: var(--rose); }
.timeline .num { display: block; font-family: var(--mono); font-size: 24px; letter-spacing: 3px; color: var(--plum); margin-bottom: 6px; }

/* ---------- contact ---------- */
.contact { padding-top: 140px; padding-bottom: 140px; }
.contact__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.contact h2 { font-family: var(--serif); font-style: italic; color: var(--rose-white); font-size: clamp(36px, 4.8vw, 60px); }
.contact .lead { margin-top: 24px; }
.contact__direct { margin-top: 32px; font-family: var(--mono); letter-spacing: 1px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.contact__direct a { color: var(--rose-white); text-decoration-color: var(--rose-frame); text-underline-offset: 4px; }
.contact__direct a:hover { color: var(--rose-pale); }
.index-card {
  position: relative; background-color: var(--paper-cream); color: var(--ink); border-radius: 6px; padding: 28px 24px 24px;
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .45); transform: rotate(1deg);
}
@media (min-width: 721px) { .index-card { padding: 36px 36px 30px; } }
.index-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 18px; border-left: 2px solid rgba(180, 80, 111, .35); }
.index-card .tape { background: rgba(247, 221, 229, .85); }
.index-card h3 { font-size: 26px; margin-bottom: 18px; padding-left: 12px; }
.field { display: block; padding-left: 12px; margin-bottom: 16px; }
.field span { display: block; font-family: var(--mono); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: var(--plum); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: #fff;
  border: 1.5px solid var(--paper-line); border-radius: 8px; padding: 10px 12px; resize: vertical;
}
.field textarea { min-height: 96px; font-family: var(--hand); font-size: 24px; line-height: 1.2; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 3px rgba(231, 161, 182, .5); }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 12px; margin: -4px 0 22px; }
.idea { cursor: pointer; background: var(--rose-white); border: 1px dashed var(--rose-frame); color: var(--plum-deep); border-radius: 99px; padding: 5px 12px; font-size: 14px; transition: background-color .2s ease; }
.idea:hover { background: var(--rose-soft); }
.index-card .btn { margin-left: 12px; }
.index-card small { display: block; margin: 16px 0 0 12px; color: var(--ink-3); font-size: 14px; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 72px 0; background: #0E1726; }
.footer img { width: 160px; height: auto; margin: 0 auto 20px; }
.footer p { font-family: var(--mono); text-transform: uppercase; letter-spacing: 4px; font-size: 13px; color: var(--on-dark-3); }
.footer p + p { margin-top: 12px; }
.footer a { color: var(--on-dark-2); text-underline-offset: 4px; }
.footer a:hover { color: var(--rose); }
.footer .tm { text-transform: none; letter-spacing: .5px; font-size: 12px; margin-top: 24px; }

/* ---------- legal page ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal h1 { font-size: clamp(44px, 6vw, 72px); margin-bottom: 16px; }
.legal h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 56px 0 16px; }
.legal h3 { font-size: 22px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.legal dt { font-family: var(--mono); text-transform: uppercase; letter-spacing: 2px; font-size: 14px; color: var(--plum); padding-top: 3px; }
.legal dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .legal dl { grid-template-columns: 1fr; } .legal dd { margin-bottom: 8px; } }
.todo { background: var(--rose-soft); color: var(--plum-deep); padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: .9em; }
.back { display: inline-block; margin-bottom: 40px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 3px; font-size: 14px; color: var(--plum); text-underline-offset: 4px; }

/* ---------- reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .1s; } .js .reveal.d2 { transition-delay: .2s; }
.js .reveal.d3 { transition-delay: .3s; } .js .reveal.d4 { transition-delay: .4s; }
/* rotated paper keeps its tilt once revealed */
.js .puzzle-card.reveal.is-visible { transform: rotate(-.6deg); }
.js .polaroid.reveal.is-visible { transform: rotate(.8deg); }
.js .index-card.reveal.is-visible { transform: rotate(1deg); }
.js .market.reveal.is-visible { transform: rotate(var(--tilt, 0deg)); }
.js .market.reveal.is-visible:hover { transform: rotate(0) translateY(-6px); transition-delay: 0s; }

/* ---------- small phones ---------- */
@media (max-width: 720px) {
  .eyebrow { letter-spacing: 3px; }
  .btn { letter-spacing: 1.5px; font-size: 13px; padding: 12px 18px; }
  .site-header .btn { padding: 9px 12px; font-size: 12px; }
  .brand span { font-size: 22px; }
  .brand img { width: 38px; }
  .footer p { letter-spacing: 3px; }
  .puzzle-q { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .st[data-mode="boundaries"] .st-blob path { stroke-dashoffset: 0; }
  .trace.is-drawing { stroke-dashoffset: 0; }
}

/* grid children may shrink below their content (the stereogram scrolls inside its card) */
.hero__grid > *, .puzzle-layout > *, .how > *, .name-grid > *, .contact__grid > *, .split-head > *, .model > * { min-width: 0; }

/* phones: show the animated stage above the list, so a tap shows its effect right away */
@media (max-width: 959px) { .model__stage { order: -1; border-top: 0; border-bottom: 1px solid var(--night-line); min-height: 240px; } }
