/* Himo landing page — plain static, Gumroad-inspired.
   Deck layout: each section is a deck with a pinned header (top third)
   and full-viewport panels that slide up from below the screen and
   disappear behind the header. Pure CSS — no JS. */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --hairline: #e8e8e8;
  --accent: #6e56cf;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Japanese pages get a Mincho (serif) heading stack + a system-friendly
   body stack. Token overrides cascade to everything that uses them. */
:lang(ja) {
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "MS PMincho", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

section[id] {
  scroll-margin-top: 84px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #f4f4f4;
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.12);
}

.btn-dark:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17, 17, 17, 0.22);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn-ghost:hover {
  border-color: #c8c8c8;
  background: #fafafa;
}

.btn-light {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(17, 17, 17, 0.08);
}

.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-lang {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  white-space: nowrap;
}

.nav-lang:hover {
  color: var(--ink);
  border-color: #c8c8c8;
}

.nav-cta {
  padding: 10px 18px;
  font-size: 14px;
}

/* ---------- Hero ---------- */

.hero {
  /* Full-bleed; children self-center. White like the rest of the page —
     the ending purple lives in the pilot deck, not the hero. */
  padding: 108px 24px 64px;
  text-align: center;
}

/* The hero used to be a 720px box; keep the headline at the designed measure. */
.hero h1 {
  max-width: 720px;
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 28px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-decoration-color: rgba(110, 86, 207, 0.45);
  text-underline-offset: 8px;
}

.hero-sub {
  max-width: 600px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

/* ---------- Terminal mock (Windows-style) ---------- */

.terminal {
  max-width: 620px;
  margin: 64px auto 0;
  background: #0f0f0f;
  border-radius: 8px;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(17, 17, 17, 0.28);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  background: #1a1a1a;
  border-bottom: 1px solid #262626;
}

.terminal-title {
  padding-left: 14px;
  font-family: var(--sans);
  font-size: 12px;
  color: #bdbdbd;
  user-select: none;
}

.win-controls {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.win-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 100%;
  color: #d0d0d0;
  font-size: 12px;
  line-height: 1;
  user-select: none;
  cursor: default;
}

.win-btn:hover {
  background: #333333;
}

.win-close:hover {
  background: #e81123;
  color: #ffffff;
}

.terminal pre {
  padding: 20px 22px 24px;
  overflow-x: auto;
}

.terminal code {
  background: none;
  padding: 0;
  color: #d6d6d6;
  font-size: 13.5px;
  line-height: 1.75;
}

.terminal .ok  { color: #3fb950; }
.terminal .no  { color: #f85149; }
.terminal .dim { color: #7d7d7d; }

/* ---------- Decks: pinned headers + page panels ---------- */

.deck {
  /* Panels inside each deck are full-viewport pages; the header pins on top.
     Backgrounds are white everywhere except the bottom of the pilot panel
     (see #pilot .panel). */
  background: var(--deck-grad, var(--bg));
}

/* White end to end (footer included), with one exception: the bottom of the
   pilot/CTA panel fades to a muted pastel purple right above the footer — a
   soft bookend for the page's purple accents (hero underline, eyebrow dot,
   fruit icons). The heading stays plain white; the accent #6e56cf itself is
   reserved for accents. */

.deck-head {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 33vh;
  min-height: 230px;
  margin-bottom: -33vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 76px 24px 34px;
  text-align: center;
  background: var(--deck-grad, var(--bg));
  border-bottom: 1px solid var(--deck-line, var(--hairline));
}

.deck-head h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.deck-intro {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  scroll-snap-align: start;
}

/* Branch panels get extra height so the visual can pin
   while the fruits scroll past, then hand off to the next panel. */
.panel.branch {
  min-height: 125vh;
  place-items: start center;
}

/* ---------- Why Himo: symbol left, explanation right (alternating) ---------- */

.branch {
  width: min(100%, 1080px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  align-items: start;
  height: 95vh;
}

.branch:nth-child(even) .branch-visual { order: 2; }
.branch:nth-child(even) .branch-fruits { order: 1; }

.branch-visual {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: sticky;
  top: 42vh;
}

.branch-num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.branch-glyph {
  width: 52px;
  height: 52px;
  margin: 18px 0;
  color: var(--ink);
}

.branch-tagline {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  max-width: 320px;
}

.branch-fruits h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 18px;
}

/* The fruits pin alongside the visual (same top), but release earlier:
   the visual's containing block (.branch) is taller than the fruits' own
   height, so the fruits scroll out first while the symbol stays. */
.branch-fruits {
  position: sticky;
  top: 42vh;
}

.fruits {
  list-style: none;
}

.fruit {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.fruit strong {
  color: var(--ink);
  font-weight: 600;
}

.fruit code {
  background: #f1f1f1;
}

.fruit-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

/* ---------- Scroll reveal + parallax (JS-enhanced; no-op without JS) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.in-view {
  opacity: 1;
  transform: none;
}

.js .branch-fruits.reveal {
  transition-delay: 0.1s;
}

.js .branch-visual.reveal {
  transform: translateY(28px) translateY(var(--parallax, 0px));
}

.js .branch-visual.reveal.in-view {
  transform: translateY(var(--parallax, 0px));
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- Fishing + step icons ---------- */

.fishing-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  color: var(--ink);
}

.step-icon {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  color: var(--ink);
}

/* ---------- Sound familiar? panels ---------- */

.fishing-card {
  max-width: 640px;
  text-align: center;
}

.fishing-card h3 {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.fishing-card p {
  font-size: 20px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  width: min(100%, 1080px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  counter-reset: step;
}

.steps li {
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.step-num {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 14px;
}

.steps h3 {
  font-size: 20px;
  font-weight: 650;
  margin-bottom: 10px;
}

.steps p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Roadmap ---------- */

.roadmap-line {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
}

.roadmap-line li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}

.roadmap-line li.live {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.roadmap-line li.arrow {
  border: none;
  padding: 0;
  color: var(--faint);
  font-weight: 400;
}

.roadmap-line li.muted {
  border: none;
  padding: 9px 4px;
  color: var(--faint);
  font-weight: 500;
}

.roadmap-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: 1px;
}

.eco-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* ---------- Pilot ---------- */

/* Keep the card clear of the pinned deck header so its rounded
   top edge stays visible (was being clipped into a sharp corner).
   The white -> muted pastel purple fade lives here, so the heading
   above stays plain white and only the strip above the footer tints. */
#pilot .panel {
  padding-top: 36vh;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 72%, #dcd4f4 100%);
}

.pilot-card {
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: stretch;
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 48px 56px;
}

.pilot-card-copy {
  align-self: center;
}

/* The Tally form uses transparentBackground=1, so it needs a light
   surface of its own inside the dark card. The card grows with its
   content (like the pre-form card did); only this panel has a fixed
   height, so the iframe scrolls within it instead of growing. */
.pilot-form {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  height: 520px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.pilot-form iframe {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
}

.eyebrow-light {
  color: #b9b9b9;
  border-color: #3a3a3a;
  margin-bottom: 20px;
}

.eyebrow-light::before {
  background: #fff;
}

.pilot-copy {
  max-width: 480px;
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #c6c6c6;
}

.pilot-perks {
  list-style: none;
  max-width: 380px;
  margin: 36px 0 40px;
  text-align: left;
}

.pilot-perks li {
  font-size: 16px;
  color: #e3e3e3;
  padding: 10px 0 10px 30px;
  border-top: 1px solid #2c2c2c;
  position: relative;
}

.pilot-perks li:last-child {
  border-bottom: 1px solid #2c2c2c;
}

.pilot-perks li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: #3fb950;
  font-weight: 700;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px;
  border-top: 1px solid var(--hairline);
}

.wordmark-small {
  font-size: 18px;
}

.footer-note {
  font-size: 13px;
  color: var(--faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .deck-head {
    min-height: 230px;
  }

  .branch {
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
    height: auto;
  }

  .branch-fruits {
    position: static;
  }

  .branch:nth-child(even) .branch-visual,
  .branch:nth-child(even) .branch-fruits {
    order: 0;
  }

  .panel.branch {
    min-height: 0;
  }

  .branch-visual {
    align-items: flex-start;
    position: static;
    transform: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pilot-card {
    grid-template-columns: 1fr;
  }

  .pilot-form {
    height: 520px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 80px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .pilot-card {
    padding: 48px 28px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}
