/* ==========================================================================
   OPEN GROUND — landing styles (terminal-only era)
   The app's "paper / cartographic" identity: cream paper ground, ink-brown
   text, terracotta accent, Fraunces serif display, Instrument Sans body,
   JetBrains Mono for everything terminal. The one deliberate contrast:
   real terminals render as deep-ink panels — dark glass set into the paper.
   Tokens mirror tailwind.config.ts.
   ========================================================================== */

:root {
  --paper:        #F2EDDE;
  --paper-elev:   #EDE6D2;
  --card:         #F8F4E8;
  --inset:        #E6DEC6;
  --deep:         #2A1F1A;
  --deep-elev:    #382A22;

  --ink:          #2A1F1A;
  --ink-muted:    #6B5847;
  --ink-subtle:   #9A8B76;
  --ink-faint:    #C2B6A0;
  --ink-inverse:  #F8F4E8;

  --line:         #D6C9AC;
  --line-soft:    #E2D8BE;
  --line-strong:  #B8A988;

  --accent:       #B23A2C;
  --accent-hover: #9A2F22;
  --accent-soft:  #E8D5CE;
  --accent-deep:  #7A2519;

  --moss:         #5C6B3D;
  --moss-bright:  #8FA862;
  --moss-soft:    #DCE0CC;
  --azure:        #3A6B8C;
  --azure-soft:   #D2DEE6;
  --ochre:        #9A6E20;
  --ochre-soft:   #E9DFC4;

  --term-bg:      #211813;
  --term-line:    rgba(248, 244, 232, 0.12);
  --term-text:    #EDE3CF;
  --term-dim:     #9A8B76;
  --term-green:   #8FA862;

  --serif: 'Fraunces', 'Hiragino Mincho ProN', Georgia, 'Times New Roman', serif;
  --sans:  'Instrument Sans', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --shadow-card:   0 1px 0 rgba(42,31,26,0.04), 0 1px 2px rgba(42,31,26,0.06);
  --shadow-hover:  0 1px 0 rgba(42,31,26,0.06), 0 8px 20px rgba(42,31,26,0.10);
  --shadow-pop:    0 1px 0 rgba(42,31,26,0.06), 0 18px 44px rgba(42,31,26,0.14);
  --shadow-term:   0 2px 0 rgba(42,31,26,0.10), 0 24px 60px rgba(42,31,26,0.28);

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.08em 0.38em;
  white-space: nowrap;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.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;
}

/* ---------- i18n visibility ---------- */
[data-lang="en"] { display: none; }
[data-lang="ja"] { display: none; }
html[lang="en"] [data-lang="en"] { display: block; }
html[lang="ja"] [data-lang="ja"] { display: block; }
html[lang="en"] span[data-lang="en"],
html[lang="en"] a[data-lang="en"] { display: inline; }
html[lang="ja"] span[data-lang="ja"],
html[lang="ja"] a[data-lang="ja"] { display: inline; }
html[lang="ja"] { word-break: normal; overflow-wrap: anywhere; line-break: strict; }
/* JA headings: never break mid-word, and give the display sizes more room */
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3 {
  word-break: keep-all; overflow-wrap: normal;
}
html[lang="ja"] .hero-title {
  font-size: clamp(34px, 5.4vw, 62px);
  max-width: 24ch;
  line-height: 1.22;
}
html[lang="ja"] .section-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.3; }
html[lang="ja"] .cta-title { font-size: clamp(26px, 3.8vw, 40px); line-height: 1.3; }

/* ==========================================================================
   Ambient backdrop — fine cartographic grid + warm paper glows
   ========================================================================== */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.45;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, black 30%, transparent 78%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  border-radius: 50%; filter: blur(90px); opacity: 0.5;
}
.bg-glow--1 { top: -180px; right: -120px; width: 560px; height: 560px; background: var(--ochre-soft); }
.bg-glow--2 { top: 480px; left: -200px; width: 520px; height: 520px; background: var(--accent-soft); opacity: 0.35; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink);
  border-radius: 8px;
}
.brand { opacity: 1; transition: opacity 0.15s ease; }
.brand:hover { opacity: 0.7; }
.brand:active { opacity: 0.55; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand-mark { flex: none; display: block; }
.brand-word { display: block; }

.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--ink-muted);
  padding: 7px 12px; border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: rgba(42,31,26,0.06); color: var(--ink); }
.site-nav a:active { background: rgba(42,31,26,0.10); color: var(--ink); }
.site-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  background: transparent; color: var(--ink-subtle);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lang-toggle:hover { background: rgba(42,31,26,0.05); border-color: var(--line-strong); color: var(--ink); }
.lang-toggle:active { background: rgba(42,31,26,0.09); }
.lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-toggle .divider { color: var(--ink-faint); }
.lang-toggle #lang-ja.active, .lang-toggle #lang-en.active { color: var(--accent); font-weight: 700; }

/* ==========================================================================
   Buttons — full interactive-state set
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 13px 26px;
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--primary {
  background: var(--accent); color: var(--ink-inverse);
  box-shadow: var(--shadow-card);
}
.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.btn--primary:active:not(:disabled) {
  background: var(--accent-deep);
  transform: translateY(0);
  box-shadow: var(--shadow-card);
}

.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover:not(:disabled) { background: rgba(42,31,26,0.05); border-color: var(--ink-subtle); }
.btn--ghost:active:not(:disabled) { background: rgba(42,31,26,0.09); }

.btn--sm { padding: 9px 18px; font-size: 14px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: 84px 0 40px; }

.hero-coords { position: absolute; inset: 0; pointer-events: none; }
.coord {
  position: absolute;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  color: var(--ink-faint); text-transform: uppercase;
}
.coord::before { content: '+ '; color: var(--line-strong); }
.coord--tl { top: 30px; left: 28px; }
.coord--tr { top: 30px; right: 28px; }
.coord--bl { bottom: 16px; left: 28px; }
.coord--br { bottom: 16px; right: 28px; }

.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--ink-muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 16px;
  box-shadow: var(--shadow-card);
  animation: rise 0.7s var(--ease) both;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--moss); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 22%, transparent);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(44px, 7.2vw, 84px);
  font-weight: 480;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 26px 0 0;
  max-width: 18ch;
  animation: rise 0.7s var(--ease) 0.08s both;
}
.hero-title em {
  font-family: var(--mono); font-size: 0.78em; font-weight: 500;
  font-style: normal; letter-spacing: -0.02em;
  background: var(--deep); color: var(--term-text);
  border-radius: 0.18em; padding: 0.02em 0.2em 0.06em;
  box-shadow: var(--shadow-card);
}
.hero-title .grad {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
}
.hero-title .grad::after {
  content: ''; display: block; height: 0.075em; margin-top: 0.02em;
  background: linear-gradient(90deg, var(--accent), var(--ochre));
  border-radius: 999px;
  transform-origin: left;
  animation: underline 0.9s var(--ease) 0.7s both;
}

.hero-sub {
  font-size: 18.5px; color: var(--ink-muted);
  max-width: 680px; margin: 26px 0 0;
  animation: rise 0.7s var(--ease) 0.16s both;
}
.hero-sub strong { color: var(--ink); }

.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; justify-content: center; animation: rise 0.7s var(--ease) 0.24s both; }

.hero-note {
  font-size: 13.5px; color: var(--ink-subtle);
  margin: 18px 0 0;
  animation: rise 0.7s var(--ease) 0.3s both;
}
.hero-note strong { color: var(--ink-muted); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes underline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ---------- Hero mock: canvas + live terminal ---------- */
.hero-mock {
  width: min(1060px, 100%);
  margin-top: 64px;
  perspective: 1400px;
  animation: rise 0.9s var(--ease) 0.4s both;
}
.mock-window {
  background: var(--paper-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  transform: rotateX(3.5deg);
  transform-origin: 50% 0%;
  transition: transform 0.6s var(--ease);
}
.hero-mock:hover .mock-window { transform: rotateX(0deg); }

.mock-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line-soft);
}
.mock-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--inset); border: 1px solid var(--line); }
.mock-bar-title {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--ink-subtle); margin-left: 10px;
}
.mock-bar-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: auto;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--moss);
  background: var(--moss-soft);
  border: 1px solid color-mix(in srgb, var(--moss) 30%, transparent);
  border-radius: 999px; padding: 4px 11px;
}

.live-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--moss);
  animation: pulse 1.8s ease-in-out infinite;
}
.live-dot--green { background: var(--term-green); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--moss) 45%, transparent); }
  55%      { box-shadow: 0 0 0 5px transparent; }
}

.mock-canvas {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
  padding: 26px;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center;
}

/* project cards, scattered like pinned notes */
.mock-cards {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-content: center;
}
.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.pcard:hover { transform: translateY(-3px) rotate(0deg) !important; box-shadow: var(--shadow-hover); }
.pcard--r1 { transform: rotate(-1.2deg); }
.pcard--r2 { transform: rotate(0.8deg) translateY(10px); }
.pcard--r3 { transform: rotate(1.1deg); }
.pcard--r4 { transform: rotate(-0.7deg) translateY(8px); }
.pcard--live { border-color: color-mix(in srgb, var(--moss) 45%, var(--line)); }

.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-name {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.02em; color: var(--ink);
}
.beacon {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--moss);
  background: var(--moss-soft);
  border-radius: 999px; padding: 3px 8px;
}
.pcard-desc {
  font-size: 12px; line-height: 1.5; color: var(--ink-muted);
  margin: 8px 0 0;
}

/* the dark terminal pane — the one deliberate contrast on the paper */
.mock-term {
  background: var(--term-bg);
  border: 1px solid rgba(42,31,26,0.5);
  border-radius: 14px;
  box-shadow: var(--shadow-term);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.term-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--term-line);
}
.term-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--term-dim); }
.term-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: var(--term-green);
  border: 1px solid color-mix(in srgb, var(--term-green) 40%, transparent);
  border-radius: 999px; padding: 2.5px 9px;
}
.term-body { padding: 14px 16px 16px; flex: 1; }
.tline {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.85;
  color: var(--term-text); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tline--dim { color: var(--term-dim); }
.tline--claude { color: var(--ochre-soft); }
.tprompt { color: var(--term-green); margin-right: 8px; }
.tok { color: var(--term-green); }
.tline--type {
  display: inline-block;
  max-width: 100%;
  border-right: 2px solid var(--term-green);
  animation: typing 2.6s steps(46, end) 1.2s both;
}
@keyframes typing {
  from { max-width: 0; }
  to   { max-width: 100%; }
}
.tcursor {
  display: inline-block; width: 8px; height: 15px;
  background: var(--term-green); vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Ritual marquee — the launch ritual, crossed out forever
   ========================================================================== */
.ritual {
  position: relative;
  margin: 72px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-elev);
  overflow: hidden;
}
.ritual-track {
  display: flex; gap: 48px; width: max-content;
  animation: marquee 36s linear infinite;
}
.ritual-item {
  font-family: var(--mono); font-size: 13px; white-space: nowrap;
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ritual-stamp {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-4deg);
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 17px; color: var(--accent);
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 999px; padding: 5px 20px;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

/* ==========================================================================
   Sections — shared scaffolding
   ========================================================================== */
.section { padding: 104px 0 0; }
.section--cta { padding-bottom: 104px; }

.kicker {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.kicker::before { content: '— '; color: var(--line-strong); }
.kicker--light { color: var(--ochre-soft); }
.kicker [data-lang] { display: inline; }
html[lang="en"] .kicker [data-lang="ja"] { display: none; }
html[lang="ja"] .kicker [data-lang="en"] { display: none; }

.section-head { max-width: 760px; }
.section-head--center { margin: 0 auto; text-align: center; }

.section-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500; line-height: 1.16; letter-spacing: -0.01em;
  margin: 0;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-title--light { color: var(--ink-inverse); }

.section-lead { font-size: 17.5px; color: var(--ink-muted); margin: 18px 0 0; }
.section-lead--center { max-width: 620px; margin-left: auto; margin-right: auto; }
.section-lead--light { color: color-mix(in srgb, var(--ink-inverse) 72%, transparent); }
.section-lead--light strong { color: var(--ink-inverse); }
.section-lead--light code { background: rgba(248,244,232,0.1); border-color: rgba(248,244,232,0.18); color: var(--ink-inverse); }

/* ---------- Pain grid ---------- */
.pain-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 44px;
}
.pain-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.pain-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.pain-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 17px; color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  margin-bottom: 14px;
}
.pain-card h3 { font-size: 16.5px; font-weight: 600; margin: 0 0 8px; }
.pain-card p { font-size: 14px; color: var(--ink-muted); margin: 0; }

/* ==========================================================================
   The Terminal — full-bleed deep-ink band
   ========================================================================== */
.section--terminal {
  margin-top: 104px; padding: 96px 0;
  background: var(--deep);
  position: relative;
}
.section--terminal::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(248,244,232,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248,244,232,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
}
.term-layout {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 64px; align-items: center;
}
.term-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.term-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15.5px; color: color-mix(in srgb, var(--ink-inverse) 80%, transparent);
}
.term-list li strong { color: var(--ink-inverse); }
.term-list li code { background: rgba(248,244,232,0.1); border-color: rgba(248,244,232,0.18); color: var(--ink-inverse); }
.term-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--moss-bright); }

.term-visual { position: relative; min-height: 360px; }
.tv-pane {
  position: absolute;
  width: 72%;
  background: var(--term-bg);
  border: 1px solid rgba(248,244,232,0.14);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  padding: 0 14px 12px;
  transition: transform 0.3s var(--ease);
}
.tv-pane:hover { transform: translateY(-4px) rotate(0deg) !important; z-index: 4; }
.tv-pane--1 { top: 0; left: 0; transform: rotate(-1.6deg); z-index: 3; }
.tv-pane--2 { top: 110px; right: 0; transform: rotate(1.2deg); z-index: 2; }
.tv-pane--3 { top: 224px; left: 26px; transform: rotate(-0.6deg); z-index: 1; }
.tv-bar {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  color: var(--term-dim);
  padding: 9px 0;
  border-bottom: 1px solid var(--term-line);
  margin-bottom: 8px;
}
.tv-pane .tline { font-size: 12px; }

/* ==========================================================================
   Features (per-project spaces)
   ========================================================================== */
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-top: 48px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.feature--wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.feature--flip .feature-visual { order: 2; }
.feature--flip .feature-body { order: 1; }

.feature-body { padding: 30px 30px 32px; }
.feature-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--accent);
}
.feature-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin: 16px 0 0;
}
.feature-icon svg { width: 21px; height: 21px; color: var(--ink-muted); }
.feature h3 {
  font-family: var(--serif);
  font-size: 21px; font-weight: 550; line-height: 1.3;
  margin: 14px 0 10px;
}
.feature p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }

/* feature visual: mini canvas with beacons */
.feature-visual {
  align-self: stretch;
  background: var(--paper-elev);
  border-right: 1px solid var(--line-soft);
  position: relative;
  min-height: 230px;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 36px 36px;
}
.feature--flip .feature-visual { border-right: 0; border-left: 1px solid var(--line-soft); }

.feature-visual--canvas { padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: center; }
.mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 7px;
}
.mini-card--live { border-color: color-mix(in srgb, var(--moss) 45%, var(--line)); }
.mini-name { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink); }
.mini-beacon {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-family: var(--mono); font-size: 8.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--moss); background: var(--moss-soft);
  border-radius: 999px; padding: 2px 7px;
}
.mini-sum { height: 7px; border-radius: 999px; background: var(--inset); }
.mini-sum--short { width: 60%; }

/* feature visual: canvas-board (stickies + frame + live mock) */
.feature-visual--canvasboard { overflow: hidden; }
.cb-sticky {
  position: absolute; width: 64px; height: 64px;
  border-radius: 6px; box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease);
}
.cb-sticky--1 { top: 30px; left: 30px; background: var(--ochre-soft); transform: rotate(-4deg); }
.cb-sticky--2 { top: 48px; left: 108px; background: var(--moss-soft); transform: rotate(3deg); }
.feature-visual--canvasboard:hover .cb-sticky--1 { transform: rotate(-7deg) translateY(-3px); }
.feature-visual--canvasboard:hover .cb-sticky--2 { transform: rotate(6deg) translateY(-2px); }
.cb-frame {
  position: absolute; right: 26px; top: 24px;
  width: 150px; height: 92px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
}
.cb-frame-label {
  position: absolute; top: -10px; left: 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-subtle); background: var(--paper-elev); padding: 0 6px;
}
.cb-mock {
  position: absolute; left: 42px; bottom: 26px;
  width: 200px; height: 84px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.cb-mock-bar { height: 16px; background: var(--inset); border-bottom: 1px solid var(--line-soft); }
.cb-mock-body {
  flex: 1; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--azure);
}

/* ==========================================================================
   Clean repos + git sharing — the two modes, side by side
   ========================================================================== */
.mode-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-top: 48px; align-items: start;
}
.mode-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 30px 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.mode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.mode-card--share { border-color: color-mix(in srgb, var(--azure) 40%, var(--line)); }
.mode-tag {
  display: inline-block;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--inset);
  border-radius: 999px; padding: 4px 12px;
}
.mode-tag--share { color: var(--azure); background: var(--azure-soft); }
.mode-card h3 {
  font-family: var(--serif);
  font-size: 21px; font-weight: 550; line-height: 1.3;
  margin: 16px 0 10px;
}
.mode-card > p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }
.mode-points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 11px; }
.mode-points li {
  position: relative;
  font-size: 13.5px; line-height: 1.6; color: var(--ink-muted);
  padding-left: 22px;
}
.mode-points li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  font-weight: 700; color: var(--moss);
}
.mode-card--share .mode-points li::before { color: var(--azure); }
.mode-points strong { color: var(--ink); }
.file-tree {
  font-family: var(--mono); font-size: 12px; line-height: 1.8;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0 0;
  overflow-x: auto;
}

/* ==========================================================================
   How it works
   ========================================================================== */
.section--how .steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin: 48px 0 0; padding: 0;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  font-family: var(--serif); font-style: italic; font-size: 19px; font-weight: 600;
  color: var(--ink-inverse); background: var(--accent);
  border-radius: 50%;
  margin-bottom: 16px;
}
.step h3 { font-size: 17.5px; font-weight: 600; margin: 0 0 8px; }
.step p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }

/* ==========================================================================
   Who it's for
   ========================================================================== */
.who-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 48px;
}
.who-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.who-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.who-emoji { font-size: 26px; margin-bottom: 14px; }
.who-card h3 { font-size: 17.5px; font-weight: 600; margin: 0 0 8px; }
.who-card p { font-size: 14.5px; color: var(--ink-muted); margin: 0; }

/* ==========================================================================
   CTA / waitlist
   ========================================================================== */
.cta-card {
  position: relative; overflow: hidden;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 72px 32px 64px;
  box-shadow: var(--shadow-pop);
}
.cta-glow {
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 640px; height: 360px; border-radius: 50%;
  background: var(--ochre-soft); filter: blur(80px); opacity: 0.7;
  pointer-events: none;
}
.cta-title {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 500; line-height: 1.14; letter-spacing: -0.01em;
  margin: 0;
}
.cta-sub {
  position: relative;
  font-size: 16.5px; color: var(--ink-muted);
  max-width: 540px; margin: 16px auto 0;
}
.waitlist-form {
  position: relative;
  display: flex; gap: 10px; justify-content: center;
  max-width: 480px; margin: 30px auto 0;
}
.waitlist-form input[type="email"] {
  flex: 1; min-width: 0;
  font-family: var(--sans); font-size: 15.5px;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 13px 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.waitlist-form input[type="email"]::placeholder { color: var(--ink-subtle); }
.waitlist-form input[type="email"]:hover { border-color: var(--ink-subtle); }
.waitlist-form input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: var(--card);
}
.waitlist-ok { position: relative; color: var(--moss); font-weight: 600; margin: 18px 0 0; }
.waitlist-err { position: relative; color: var(--accent); font-weight: 600; margin: 18px 0 0; }
.cta-fineprint { position: relative; font-size: 12.5px; color: var(--ink-subtle); margin: 20px 0 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--paper-elev);
}
.footer-inner {
  display: flex; justify-content: space-between; gap: 48px;
  padding-top: 56px; padding-bottom: 40px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 340px; }
.footer-tag { font-size: 14px; color: var(--ink-muted); margin: 14px 0 0; }

.footer-nav { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-col h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-subtle); margin: 0 0 6px;
}
.footer-col a {
  font-size: 14px; color: var(--ink-muted); text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-col a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.footer-copy { font-size: 12.5px; color: var(--ink-subtle); }
.coffee-wink {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-subtle); text-decoration: none;
  border-radius: 999px; padding: 5px 12px;
  border: 1px dashed var(--line);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.coffee-wink:hover { color: var(--ink); border-color: var(--line-strong); background: var(--card); }
.coffee-wink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.coffee-cup { font-size: 14px; }

/* ==========================================================================
   Reveal-on-scroll (opt-in via .js-reveal on <html>)
   ========================================================================== */
html.js-reveal .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js-reveal .reveal.in { opacity: 1; transform: none; }
html.js-reveal .pain-card.reveal:nth-child(2),
html.js-reveal .who-card.reveal:nth-child(2),
html.js-reveal .step.reveal:nth-child(2) { transition-delay: 0.08s; }
html.js-reveal .pain-card.reveal:nth-child(3),
html.js-reveal .who-card.reveal:nth-child(3),
html.js-reveal .step.reveal:nth-child(3) { transition-delay: 0.16s; }
html.js-reveal .pain-card.reveal:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .ritual-track { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .pain-grid { grid-template-columns: 1fr 1fr; }
  .term-layout { grid-template-columns: 1fr; gap: 44px; }
  .term-visual { min-height: 340px; max-width: 520px; margin: 0 auto; width: 100%; }
  .mode-grid { grid-template-columns: 1fr; }
  .mock-canvas { grid-template-columns: 1fr; }
  .mock-term { min-height: 220px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding-top: 56px; }
  .hero-title { font-size: clamp(36px, 10.5vw, 52px); }
  .hero-sub { font-size: 16.5px; }
  .coord--bl, .coord--br { display: none; }
  .mock-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pcard--r2, .pcard--r4 { transform: none; }
  .section { padding-top: 76px; }
  .section--terminal { padding: 64px 0; margin-top: 76px; }
  .pain-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature--wide { grid-column: span 1; grid-template-columns: 1fr; }
  .feature--wide .feature-visual { min-height: 200px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .feature--flip .feature-visual { order: 0; border-left: 0; }
  .feature--flip .feature-body { order: 1; }
  .section--how .steps { grid-template-columns: 1fr; }
  .who-grid { grid-template-columns: 1fr; }
  .waitlist-form { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 36px; }
  .footer-nav { gap: 40px; }
  .ritual-stamp { font-size: 14px; }
  .tv-pane { width: 84%; }
  .tv-pane--3 { display: none; }
  .term-visual { min-height: 240px; }
}
