/* Takanome landing. Colours mirror frontend/src/theme/palette.ts. */
@font-face { font-family: 'Bricolage'; src: url('fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'GeistMono'; src: url('fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --signal: #d4f23a;
  --ink: #0b0e0c;
  --paper: #e9ebe5;
  --plate: #f7f8f4;
  --text-2: #4f5a52;
  --night: #0c0f0e;
  --night-plate: #141816;
  --night-text: #eef2ea;
  --night-text-2: #98a39b;
  --ok: #2fcb7c;
  --wait: #ffa21f;
  --deny: #ff4d42;
  --line: rgba(16, 20, 17, 0.1);
  --night-line: rgba(222, 236, 224, 0.1);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --display: 'Bricolage', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --body: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'GeistMono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Fixed, inert film grain. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  background-image: 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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-weight: 700; line-height: 0.94; letter-spacing: -0.03em; }
h2 { font-size: clamp(38px, 5.2vw, 76px); font-weight: 680; line-height: 1; letter-spacing: -0.025em; }
h3 { font-size: clamp(22px, 2.1vw, 29px); font-weight: 650; line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { width: min(1360px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(96px, 12vw, 176px) 0; }
.lede { max-width: 34em; color: var(--text-2); font-size: clamp(17px, 1.35vw, 20px); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 60; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px; }
.skip:focus { top: 16px; }
.icon { width: 30px; height: 30px; fill: currentColor; flex: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 5px 13px;
  border-radius: 99px;
  box-shadow: 0 0 0 1px var(--line);
  background: rgba(255, 255, 255, 0.55);
  font: 600 10px/1.5 var(--body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--signal); box-shadow: 0 0 0 1px rgba(16, 20, 17, 0.35); }
.dark .eyebrow { background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--night-line); }

/* ── Buttons: pill with a nested arrow island ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  padding: 6px 6px 6px 26px;
  border: 0;
  border-radius: 99px;
  background: var(--ink);
  color: #fff;
  font: 550 15px/1.2 var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.6s var(--ease);
}
.btn i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--signal); color: var(--ink); transition: transform 0.6s var(--ease); }
.btn i .icon { width: 18px; height: 18px; }
.btn:hover i { transform: translate(3px, -1px) scale(1.06); }
.btn:active { transform: scale(0.98); }
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal i { background: var(--ink); color: var(--signal); }
.btn--plain { padding: 6px 24px; background: transparent; color: inherit; box-shadow: inset 0 0 0 1px var(--line); }

/* ── Bezel: tray and plate ──────────────────────────────────────────── */
.bezel { padding: 7px; border-radius: 34px; background: rgba(16, 20, 17, 0.045); box-shadow: 0 0 0 1px var(--line); }
.core { height: 100%; border-radius: 27px; background: var(--plate); box-shadow: inset 0 1px 1px #fff, 0 30px 60px -46px rgba(16, 32, 20, 0.55); }
.dark .bezel { background: rgba(255, 255, 255, 0.035); box-shadow: 0 0 0 1px var(--night-line); }
.dark .core { background: var(--night-plate); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08); }

/* ── Nav: floating island ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 7px 7px 7px 10px;
  border-radius: 99px;
  background: rgba(247, 248, 244, 0.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -28px rgba(16, 32, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.brand { display: flex; align-items: center; gap: 10px; font: 650 18px/1 var(--body); letter-spacing: -0.035em; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--text-2); transition: color 0.4s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 6px; }
.lang { min-width: 40px; height: 40px; border: 0; border-radius: 99px; background: transparent; color: var(--ink); font: 600 12px var(--mono); cursor: pointer; }
.lang:hover { background: rgba(16, 20, 17, 0.06); }
.nav .btn { min-height: 42px; gap: 10px; padding: 4px 4px 4px 18px; font-size: 14px; }
.nav .btn i { width: 34px; height: 34px; }
.burger { display: none; position: relative; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--ink); cursor: pointer; }
.burger span { position: absolute; left: 12px; width: 18px; height: 1.5px; background: #fff; transition: transform 0.55s var(--ease); }
.burger span:first-child { transform: translateY(-4px); }
.burger span:last-child { transform: translateY(4px); }
.burger[aria-expanded='true'] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 96px 28px 40px;
  background: rgba(233, 235, 229, 0.93);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s var(--ease), visibility 0s 0.5s;
}
.menu.open { visibility: visible; opacity: 1; transition: opacity 0.5s var(--ease); }
.menu span { display: block; overflow: hidden; }
.menu a { display: block; padding: 6px 0; font: 650 40px/1.15 var(--display); letter-spacing: -0.03em; text-decoration: none; transform: translateY(110%); transition: transform 0.7s var(--ease); }
.menu.open a { transform: none; transition-delay: calc(var(--i) * 60ms + 80ms); }

/* ── Hero: editorial split ──────────────────────────────────────────── */
.hero { min-height: 100dvh; display: flex; align-items: center; padding: 128px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 4vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(50px, 6.2vw, 96px); }
.hero h1 mark { background: linear-gradient(transparent 62%, var(--signal) 62% 92%, transparent 92%); color: inherit; padding: 0 0.04em; }
.hero .lede { margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 40px 0 0; padding: 0; list-style: none; color: var(--text-2); font: 500 12px/1.8 var(--mono); }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ''; width: 5px; height: 5px; background: var(--ink); }

/* ── Gate simulation ────────────────────────────────────────────────── */
.sim .bezel { background: rgba(16, 20, 17, 0.08); }
.sim .core { background: var(--night); color: var(--night-text); overflow: hidden; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 50px 90px -50px rgba(8, 20, 12, 0.75); }
.sim-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--night-text-2); }
.sim-bar b { color: var(--night-text); font-weight: 500; white-space: nowrap; }
.sim-tag { padding: 3px 10px; border-radius: 99px; box-shadow: 0 0 0 1px var(--night-line); }
.verdict { display: flex; align-items: center; gap: 12px; margin: 0 8px 8px; padding: 14px 18px; border-radius: 16px; color: var(--ink); background: var(--deny); font: 700 clamp(20px, 2.2vw, 27px)/1.15 var(--display); letter-spacing: -0.02em; transition: background-color 0.6s var(--ease); }
.verdict small { margin-left: auto; font: 550 12px/1.35 var(--body); letter-spacing: 0; text-align: right; }
.verdict[data-state='clear'] { background: var(--ok); }
.verdict[data-state='idle'] { background: #8a948d; }
.sim-view { display: block; width: calc(100% - 16px); height: auto; margin: 0 8px; border-radius: 16px; }
.person { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.person.gone { opacity: 0; transform: translateX(70px); }
.gear { transition: opacity 0.35s var(--ease); }
.box { fill: none; stroke-width: 2.5; stroke: var(--deny); transition: stroke 0.5s var(--ease); }
.chip rect { fill: var(--deny); transition: fill 0.5s var(--ease); }
.chip text { fill: var(--ink); font: 600 13px var(--mono); }
.person[data-state='clear'] .box { stroke: var(--ok); }
.person[data-state='clear'] .chip rect { fill: var(--ok); }
.roster { margin: 0; padding: 10px 18px 4px; list-style: none; }
.roster li { display: grid; grid-template-columns: 10px 6.5em minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--night-line); font-size: 13px; color: var(--night-text-2); }
.roster li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--deny); }
.roster li[data-state='clear']::before { background: var(--ok); }
.roster li[hidden] { display: none; }
.roster b { color: var(--night-text); font-weight: 550; }
.controls { margin-top: 8px; padding: 16px 18px 18px; border-top: 1px solid var(--night-line); }
.controls p { margin-bottom: 10px; font: 600 10px/1.5 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--night-text-2); }
.toggles { display: flex; flex-wrap: wrap; gap: 7px; }
.toggle { min-height: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: transparent; box-shadow: inset 0 0 0 1px rgba(222, 236, 224, 0.2); color: var(--night-text); font: 500 13px var(--body); cursor: pointer; transition: transform 0.5s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease); }
.toggle[aria-pressed='true'] { background: var(--signal); color: var(--ink); box-shadow: none; }
.toggle:active { transform: scale(0.96); }
.toggle--wide { margin-left: auto; box-shadow: inset 0 0 0 1px rgba(222, 236, 224, 0.2); }
.toggle--wide[aria-pressed='true'] { background: var(--night-text); }

/* ── Three gates ────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
.split > header { position: sticky; top: 128px; }
.split > header .lede { margin-top: 24px; }
.stack { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.gate .core { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 28px; padding: clamp(24px, 3vw, 44px); }
.gate-no { grid-row: span 3; font: 700 clamp(52px, 5.5vw, 88px)/0.85 var(--display); letter-spacing: -0.06em; }
.gate p { color: var(--text-2); }
.gate .out { justify-self: start; margin-top: 12px; padding: 4px 12px; border-radius: 8px; background: var(--ink); color: var(--signal); font: 500 12px/1.7 var(--mono); }
.note { margin-top: 30px; padding-left: 20px; border-left: 3px solid var(--ink); max-width: 36em; }

/* ── Night band: judgement ──────────────────────────────────────────── */
.dark { background: var(--night); color: var(--night-text); }
.dark .lede, .dark p { color: var(--night-text-2); }
.rules-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: end; margin-bottom: 72px; }
.cascade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cascade > :nth-child(2) { margin-top: 56px; }
.cascade > :nth-child(3) { margin-top: 112px; }
.rule { padding: 30px 28px 34px; }
.rule h3 { margin: 28px 0 12px; color: var(--night-text); }
.rule p { font-size: 15px; }
.ticks { display: flex; gap: 6px; height: 40px; align-items: stretch; }
.ticks i { flex: 1; border-radius: 6px; background: var(--ok); }
.ticks i.miss { background: transparent; box-shadow: inset 0 0 0 1.5px var(--wait); }
.ticks i.hidden-part { background: repeating-linear-gradient(135deg, #2a322d 0 5px, transparent 5px 10px); box-shadow: inset 0 0 0 1px var(--night-line); }
.states { display: flex; gap: 6px; height: 40px; align-items: center; flex-wrap: nowrap; }
.states span { padding: 6px 11px; border-radius: 8px; color: var(--ink); font: 600 12px var(--mono); }

/* ── Bento ──────────────────────────────────────────────────────────── */
.head { max-width: 900px; margin-bottom: 72px; }
.head .lede { margin-top: 24px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.tile .core { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 2.6vw, 38px); overflow: hidden; }
.tile p { color: var(--text-2); font-size: 15.5px; }
.tile figure { margin: auto 0 0; padding-top: 18px; }
.tile figure svg { display: block; width: 100%; height: auto; }
.w7 { grid-column: span 7; }
.w5 { grid-column: span 5; }
.w4 { grid-column: span 4; }
.w8 { grid-column: span 8; }
.w12 { grid-column: span 12; }
.tall { grid-row: span 2; }
.tile--signal .core { background: var(--signal); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6); }
.tile--signal p { color: #2c3510; }
.tile--ink .core { background: var(--night-plate); color: var(--night-text); }
.tile--ink p { color: var(--night-text-2); }
.feed { margin: 0; padding: 0; list-style: none; font: 500 12.5px/1.5 var(--mono); }
.feed li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--night-line); }
.feed em { font-style: normal; color: var(--night-text-2); text-align: right; }
.tile--wide .core { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px 32px; align-items: center; }

/* ── On-premises ────────────────────────────────────────────────────── */
.ledger { margin: 0; }
.ledger > div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 8px 32px; padding: 26px 0; border-top: 1px solid var(--line); }
.ledger > div:last-child { border-bottom: 1px solid var(--line); }
.ledger dt { font: 650 21px/1.25 var(--display); letter-spacing: -0.015em; }
.ledger dd { margin: 0; color: var(--text-2); }
.stackline { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.stackline li { padding: 6px 13px; border-radius: 99px; box-shadow: 0 0 0 1px var(--line); font: 500 12px var(--mono); }

/* ── Portal ─────────────────────────────────────────────────────────── */
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.portal .lede { margin-top: 24px; }
.door { padding: clamp(24px, 3vw, 40px); }
.door fieldset { margin: 0 0 24px; padding: 0; border: 0; display: grid; gap: 10px; }
.door legend, .door label.field { margin-bottom: 12px; font: 600 10px/1.5 var(--body); letter-spacing: 0.18em; text-transform: uppercase; color: var(--night-text-2); }
.role { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; align-items: center; padding: 14px 18px; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--night-line); cursor: pointer; transition: transform 0.5s var(--ease), background-color 0.4s var(--ease); }
.role:active { transform: scale(0.99); }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role .icon { grid-row: span 2; }
.role strong { font-weight: 600; font-size: 15px; }
.role small { color: var(--night-text-2); font-size: 13px; line-height: 1.45; }
.role:has(input:checked) { background: var(--signal); color: var(--ink); box-shadow: none; }
.role:has(input:checked) small { color: #2c3510; }
.role:has(input:focus-visible) { outline: 2px solid var(--night-text); outline-offset: 2px; }
.door label.field { display: block; }
.address { display: flex; flex-wrap: wrap; gap: 10px; }
.address input { flex: 1 1 220px; min-width: 0; min-height: 54px; padding: 0 22px; border: 0; border-radius: 99px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(222, 236, 224, 0.18); color: var(--night-text); font: 500 14px var(--mono); }
.address input::placeholder { color: #6d776f; }
.address input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.address input[aria-invalid='true'] { box-shadow: inset 0 0 0 1.5px var(--deny); }
.hint { min-height: 1.6em; margin-top: 12px; font-size: 13px; }
.hint.error { color: var(--deny) !important; }

/* ── FAQ + footer ───────────────────────────────────────────────────── */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 26px 0; list-style: none; cursor: pointer; font: 650 21px/1.3 var(--display); letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 22px; height: 22px; transition: transform 0.5s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { max-width: 40em; padding-bottom: 28px; color: var(--text-2); }
footer { padding: 88px 0 40px; }
.closing { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: end; padding-bottom: 72px; border-bottom: 1px solid var(--night-line); }
.closing h2 { max-width: 11em; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: 13px; color: var(--night-text-2); }
footer .brand { color: var(--night-text); }

/* ── Entry motion (only once JS has opted in) ───────────────────────── */
.js .reveal { opacity: 0; transform: translateY(56px); filter: blur(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid, .split, .portal-grid, .rules-head { grid-template-columns: minmax(0, 1fr); }
  .split > header { position: static; }
  .cascade { grid-template-columns: minmax(0, 1fr); }
  .cascade > :nth-child(n) { margin-top: 0; }
  .w4, .w5, .w7, .w8 { grid-column: span 6; }
  .tall { grid-row: auto; }
  .tile--wide .core { display: flex; align-items: flex-start; }
}
@media (max-width: 920px) {
  .nav { width: calc(100% - 24px); justify-content: space-between; gap: 8px; }
  .nav-links, .nav .btn { display: none; }
  .burger { display: block; }
}
@media (min-width: 921px) { .menu { display: none; } }
@media (max-width: 767px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 96px 0; }
  .hero { padding-top: 112px; }
  .w4, .w5, .w7, .w8, .w12 { grid-column: span 12; }
  .bento { gap: 24px; }
  .bezel { padding: 5px; border-radius: 28px; }
  .core { border-radius: 23px; }
  .gate .core { grid-template-columns: minmax(0, 1fr); }
  .gate-no { grid-row: auto; margin-bottom: 12px; }
  .ledger > div { grid-template-columns: minmax(0, 1fr); }
  .verdict { flex-wrap: wrap; }
  .verdict small { width: 100%; margin: 0; text-align: left; }
  .roster li { grid-template-columns: 10px minmax(0, 1fr); row-gap: 0; }
  .roster li span { grid-column: 2; }
  .toggle--wide { margin-left: 0; }
  .sim-view .chip text { font-size: 17px; }
  .btn { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
