/* Naisho homepage composition. Shared tokens and chrome live in site.css. */

.theme-dark,
.theme-light {
  --home-accent-ink: var(--accent-ink);
  --home-gold-ink: var(--gold-ink);
  --home-page-width: 1184px;
  --home-section-width: 1120px;
  --home-radius: 24px;
  --window-panel: var(--surface);
  --window-line: var(--line-strong);
  --field-label: var(--surface);
  --field-label-line: var(--line-strong);
}

.theme-dark {
  --story-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  --window-shadow: 0 28px 74px rgba(0, 0, 0, 0.25);
  --window-node-fill: rgba(16, 23, 36, 0.96);
  --window-blue-ring: rgba(64, 156, 255, 0.18);
  --window-partner-ring: rgba(255, 55, 95, 0.16);
  --field-center-glow: rgba(64, 156, 255, 0.17);
}

.theme-light {
  --story-shadow: 0 28px 76px rgba(42, 60, 88, 0.10);
  --window-shadow: 0 26px 68px rgba(42, 60, 88, 0.12);
  --window-node-fill: rgba(255, 255, 255, 0.98);
  --window-blue-ring: rgba(10, 132, 255, 0.14);
  --window-partner-ring: rgba(224, 34, 75, 0.12);
  --field-center-glow: rgba(10, 132, 255, 0.13);
}

.home-main { overflow: hidden; }
.nav.nav-overlay { max-width: var(--home-page-width); }

.visual-equivalent {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
}

.home-hero-inner {
  width: 100%;
  max-width: var(--home-page-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 96px 48px 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  grid-template-areas: "copy visual";
  align-items: center;
  gap: clamp(36px, 4vw, 52px);
}

.hero-copy {
  grid-area: copy;
  max-width: 720px;
}

.hero-visual {
  grid-area: visual;
  position: relative;
  width: 370px;
  margin: 0;
  justify-self: end;
}

.window-stage {
  position: relative;
  width: 100%;
  padding: 36px 30px 30px;
  border: 0.5px solid var(--window-line);
  border-radius: var(--home-radius);
  background: var(--window-panel);
  box-shadow: var(--window-shadow);
}

.window-overline {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
}

.window-relation {
  display: flex;
  align-items: center;
  justify-content: center;
}

.window-node {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 0.5px solid var(--window-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--window-node-fill);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  text-align: center;
}

.window-node span { max-width: 50px; }
.window-you { color: var(--home-accent-ink); box-shadow: 0 0 0 5px var(--window-blue-ring); }
.window-person { color: var(--partner-deep); box-shadow: 0 0 0 5px var(--window-partner-ring); }

.window-thread {
  position: relative;
  width: 150px;
  height: 72px;
  flex: 0 1 150px;
}

.window-thread::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -1px;
  right: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--line-strong) 38%, var(--line-strong) 62%, var(--partner-deep));
}

.window-interval {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 38px;
  margin: -19px 0 0 -42px;
  border: 0.5px solid color-mix(in srgb, var(--gold) 58%, transparent);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--home-gold-ink);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  transform-origin: center;
}

.window-terms {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
}

.window-record { display: inline-flex; align-items: center; gap: 7px; }

.record-marker {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: block;
  background: var(--home-gold-ink);
}

.hero-title {
  margin: 0;
  max-width: 720px;
  font-family: var(--font-display);
  font-size: clamp(42px, 3.1vw, 44px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.01;
}

.hero-title > span { display: block; }
.hero-title .relational { color: var(--partner-deep); }
.relational { color: var(--partner-deep); }

.hero-lede {
  max-width: 500px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.012em;
}

.waitlist-shell {
  width: 100%;
  max-width: 480px;
  margin-top: 36px;
}

.wl-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.wl-field {
  display: flex;
  align-items: center;
  width: 100%;
  border-bottom: 0.5px solid var(--line-strong);
  padding: 0 0 10px;
  transition: border-color 200ms var(--ease-standard);
}

.wl-field:focus-within { border-color: var(--home-accent-ink); }

.wl-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--home-accent-ink);
  font: 500 16px/1.3 var(--font-body);
  letter-spacing: -0.01em;
}

.wl-input::placeholder { color: var(--ink-soft); opacity: 1; }
.wl-input:focus,
.wl-input:focus-visible { outline: none; }

.wl-submit {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-deep);
  color: var(--accent-contrast);
  cursor: pointer;
  opacity: 0.56;
  transform: scale(0.94);
  transition: opacity 180ms var(--ease-standard), transform 180ms var(--ease-standard);
}

.wl-field:focus-within .wl-submit,
.wl-field.is-valid .wl-submit { opacity: 1; transform: scale(1); }
.wl-submit:active { transform: scale(0.96); }

.wl-done {
  min-height: 44px;
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}

.hero-meta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.home-section {
  width: 100%;
  max-width: var(--home-section-width);
  margin: 0 auto;
  padding: clamp(104px, 10vw, 156px) 48px 0;
}

.story-section { padding-top: 64px; }

.home-section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.7vw, 64px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.home-section p { margin: 0; }
.home-section p.soft { color: var(--ink-soft); }

.text-link {
  display: inline-block;
  color: var(--home-accent-ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: transform 180ms var(--ease-standard);
}

.text-link:hover { text-decoration: underline; }
.text-link:active { transform: translateY(1px); }

.story-frame {
  padding: clamp(24px, 4vw, 46px);
  border: 0.5px solid var(--line);
  border-radius: var(--home-radius);
  background: var(--surface);
  box-shadow: var(--story-shadow);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(34px, 6vw, 72px);
  align-items: center;
}

.founding-figure { margin: 0; }

.founding-figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 0.5px solid var(--line);
  border-radius: var(--home-radius);
  background: #05070B;
}

.story-copy h2 { font-size: clamp(34px, 3.8vw, 52px); }

.story-beats {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 16px;
  line-height: 1.5;
}

.story-beats li:nth-child(2),
.story-beats li:nth-child(3) { color: var(--ink-soft); }
.story-copy .text-link { margin-top: 22px; }

.secret-section { max-width: var(--home-page-width); }

.secret-inner {
  padding: clamp(44px, 6vw, 76px);
  border: 0.5px solid var(--line);
  border-radius: var(--home-radius);
  background: var(--surface);
}

.secret-inner h2 { max-width: 680px; }

.secret-inner .secret-lede {
  max-width: 580px;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.55;
}

.secret-beats {
  margin-top: clamp(48px, 6vw, 76px);
  display: grid;
  grid-template-columns: 1.03fr 0.92fr 1.15fr;
  gap: clamp(28px, 4.5vw, 56px);
  border-top: 0.5px solid var(--line);
}

.secret-beat { min-width: 0; padding-top: 26px; }

.secret-beat h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(21px, 2.2vw, 29px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.secret-beat p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.spectrum-section {
  max-width: var(--home-page-width);
  padding-top: clamp(128px, 12vw, 184px);
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(480px, 1.22fr);
  gap: clamp(44px, 7vw, 96px);
  align-items: center;
}

.spectrum-copy h2 { max-width: 510px; font-size: clamp(42px, 4.9vw, 66px); }

.spectrum-copy p {
  max-width: 490px;
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.visibility-figure {
  position: relative;
  width: 100%;
  max-width: 550px;
  margin: 0;
  justify-self: end;
}

.visibility-field {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.visibility-field svg { width: 100%; height: 100%; display: block; overflow: visible; }

.field-ring {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.2;
}

.field-world { opacity: 0.56; }
.field-connections { opacity: 0.68; }
.field-groups { opacity: 0.8; }
.field-people { stroke: color-mix(in srgb, var(--partner-deep) 34%, var(--line-strong)); }

.field-ray {
  stroke-width: 2.7;
  stroke-linecap: round;
  opacity: 0.82;
}

.ray-memory { stroke: var(--ink); }
.ray-person { stroke: var(--partner-deep); }
.ray-group { stroke: color-mix(in srgb, var(--accent) 70%, var(--ink-soft)); }
.ray-connection { stroke: var(--accent); }
.ray-world { stroke: var(--home-accent-ink); }

.field-endpoint { stroke: var(--bg); stroke-width: 5; }
.endpoint-memory { fill: var(--ink); }
.endpoint-person { fill: var(--partner-deep); }
.endpoint-group,
.endpoint-connection,
.endpoint-world { fill: var(--accent); }
.field-center-glow { fill: var(--field-center-glow); }
.field-center { fill: var(--accent); }

.field-layer-label,
.field-data-label {
  position: absolute;
  z-index: 2;
  border: 0.5px solid var(--field-label-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-label) 94%, transparent);
  white-space: nowrap;
}

.field-layer-label {
  padding: 4px 9px;
  color: var(--ink-soft);
  font-size: clamp(9.5px, 1vw, 11.5px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.015em;
}

.field-data-label {
  padding: 4px 8px;
  color: var(--ink);
  font-size: clamp(9.5px, 0.9vw, 11px);
  font-weight: 600;
  line-height: 1.2;
}

.layer-world { top: 1%; left: 50%; transform: translateX(-50%); }
.layer-connections { top: 13%; right: 11%; }
.layer-groups { top: 28%; right: 7%; }
.layer-people { top: 41%; right: 18%; }
.layer-you {
  top: 50%;
  left: 50%;
  border: 0;
  background: transparent;
  color: var(--accent-contrast);
  transform: translate(-50%, -50%);
  font-size: clamp(9px, 0.9vw, 11px);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.theme-dark .layer-you { color: var(--bg); }
.theme-light .layer-you { color: var(--ink); }

.data-profile { top: 14%; left: 6%; }
.data-cities { right: 6%; bottom: 18%; }
.data-trip { top: 22%; right: 13%; }
.data-exact { top: 31%; left: 4%; }
.data-memory { top: 39%; left: 53%; }

.field-controls {
  width: max-content;
  max-width: 100%;
  margin: -10px auto 0;
  padding: 10px 16px;
  border: 0.5px solid var(--line-strong);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.field-controls span + span {
  margin-left: 11px;
  padding-left: 11px;
  border-left: 0.5px solid var(--line-strong);
}

.field-controls:hover { color: var(--ink); border-color: var(--home-accent-ink); }

.life-section { max-width: var(--home-page-width); }

.life-bridge {
  max-width: 890px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.7vw, 62px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.life-layout {
  margin-top: clamp(84px, 10vw, 136px);
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(52px, 8vw, 112px);
  align-items: start;
}

.life-copy { position: sticky; top: 120px; }
.life-copy h2 { font-size: clamp(38px, 4.3vw, 58px); }

.life-copy p {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

.life-words {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.life-words li {
  padding: 22px 0;
  border-bottom: 0.5px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.life-words li:first-child { padding-top: 0; }
.life-words li:nth-child(even) { padding-left: 12%; }

.mission-section {
  max-width: 1000px;
  padding-top: clamp(132px, 14vw, 210px);
  padding-bottom: clamp(112px, 12vw, 176px);
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.mission-mark {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.mission-mark img {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  display: block;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.18));
}

.theme-dark .tile-light,
.theme-light .tile-dark { display: none; }

.mission-orbit {
  position: absolute;
  border: 0.5px solid var(--line-strong);
  border-radius: 50%;
}

.mission-orbit-one { inset: 11px; }
.mission-orbit-two { inset: 22px 5px; transform: rotate(38deg); }

.mission-satellite {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mission-satellite-you { left: 8px; top: 62px; background: var(--accent); }
.mission-satellite-person { right: 20px; top: 22px; background: var(--partner-deep); }

.mission-copy h2 { max-width: 780px; }

.mission-copy p {
  max-width: 620px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.6;
}

.return-link { margin-top: 26px; }

@media (prefers-reduced-motion: no-preference) {
  .window-interval { animation: window-open-close 5.6s var(--ease-standard) 1.1s both; }
  .record-marker { animation: record-settle 620ms var(--ease-emphasized) 2.5s both; }
}

@keyframes window-open-close {
  0%, 18%, 58%, 100% { opacity: 1; transform: scaleX(1); }
  34% { opacity: 0.72; transform: scaleX(0.58); }
  76% { opacity: 0.76; transform: scaleX(0.7); }
}

@keyframes record-settle {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1020px) {
  .home-hero-inner { grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; }
  .hero-visual { width: 340px; }
  .spectrum-section { grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr); gap: 36px; }
}

@media (max-width: 767px) {
  .nav.nav-overlay { padding: 18px 22px; }

  .home-hero-inner {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 82px 24px 28px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "visual" "copy";
    align-content: center;
    justify-items: stretch;
    gap: 20px;
  }

  .hero-visual { width: min(100%, 342px); justify-self: center; }
  .window-stage { padding: 22px 18px 20px; }
  .window-overline { margin-bottom: 18px; font-size: 11px; }
  .window-node { width: 60px; height: 60px; flex-basis: 60px; font-size: 10px; }
  .window-node span { max-width: 44px; }
  .window-thread { height: 60px; }
  .window-interval { width: 74px; height: 34px; margin: -17px 0 0 -37px; font-size: 11px; }
  .window-terms { margin-top: 18px; gap: 7px 14px; font-size: 9.5px; }

  .hero-title {
    max-width: none;
    font-size: clamp(36px, 10.3vw, 43px);
    line-height: 1.01;
  }

  .hero-title > span { display: inline; }
  .hero-title > span + span::before { content: " "; }
  .hero-lede { margin-top: 16px; font-size: 16px; }
  .waitlist-shell { margin-top: 22px; }

  .hero-meta {
    margin-top: 16px;
    display: grid;
    gap: 2px;
    font-size: 12.5px;
  }

  .home-section { padding: 96px 24px 0; }
  .story-section { padding-top: 64px; }
  .home-section h2 { font-size: clamp(34px, 10.2vw, 44px); }

  .story-frame,
  .secret-beats,
  .spectrum-section,
  .life-layout,
  .mission-section { grid-template-columns: minmax(0, 1fr); }

  .story-frame { padding: 20px; gap: 34px; }
  .founding-figure img { border-radius: 18px; }
  .story-copy h2 { font-size: 36px; }

  .secret-section { padding-left: 16px; padding-right: 16px; }
  .secret-inner { padding: 34px 24px; }
  .secret-beats { margin-top: 40px; gap: 0; }

  .secret-beat {
    padding: 24px 0;
    border-bottom: 0.5px solid var(--line);
  }

  .secret-beat:first-child { padding-top: 22px; }
  .secret-beat:last-child { padding-bottom: 0; border-bottom: 0; }

  .spectrum-section { gap: 44px; }
  .spectrum-copy h2 { font-size: clamp(40px, 11.4vw, 48px); }
  .spectrum-copy p { margin-top: 22px; font-size: 16px; }
  .visibility-figure { width: min(100%, 520px); justify-self: center; }
  .field-layer-label { padding: 3px 7px; }
  .field-data-label { padding: 3px 6px; }
  .layer-groups { top: 34%; right: 5%; }
  .layer-people { top: 45%; right: 4%; }
  .field-controls { margin-top: -4px; }

  .life-bridge { font-size: clamp(36px, 9.8vw, 44px); }
  .life-layout { margin-top: 76px; gap: 48px; }
  .life-copy { position: static; }
  .life-words li { padding: 18px 0; font-size: clamp(42px, 14vw, 58px); }

  .mission-section { gap: 24px; padding-bottom: 112px; }
  .mission-mark { width: 112px; height: 112px; }
  .mission-mark img { width: 64px; height: 64px; }
  .mission-satellite-you { left: 6px; top: 52px; }
  .mission-satellite-person { right: 16px; top: 18px; }
  .mission-copy p { font-size: 16.5px; }
}

@media (max-width: 420px) and (max-height: 820px) {
  .home-hero-inner { padding-top: 76px; gap: 14px; }
  .hero-visual { width: min(100%, 310px); }
  .window-stage { padding-top: 17px; padding-bottom: 16px; }
  .window-overline { margin-bottom: 13px; }
  .window-node { width: 54px; height: 54px; flex-basis: 54px; }
  .window-thread { height: 54px; }
  .window-terms { margin-top: 13px; }
  .hero-title { font-size: 36px; }
  .hero-lede { margin-top: 12px; }
  .waitlist-shell { margin-top: 16px; }
  .hero-meta { margin-top: 12px; }
}

@media (max-width: 340px) {
  .home-hero-inner,
  .home-section { padding-left: 20px; padding-right: 20px; }
  .secret-section { padding-left: 12px; padding-right: 12px; }
  .window-stage { padding-left: 12px; padding-right: 12px; }
  .field-layer-label,
  .field-data-label { font-size: 9px; }
  .field-controls { padding-left: 13px; padding-right: 13px; font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .window-interval,
  .record-marker { animation: none; }
  .window-interval { opacity: 1; transform: none; }
  .record-marker { opacity: 1; transform: none; }
  .wl-submit,
  .text-link { transition: none; }
}
