/* Tideout v6 — Clear 4-Pillar Narrative + 1:1 Canvas 2D Physics Gachapon */
:root {
  color-scheme: light dark;
  --bg: #f3f4f0;
  --surface: #ffffff;
  --surface-soft: #f6f7f4;
  --ink: #1b1e1c;
  --muted: #6c736d;
  --muted-soft: #979e98;
  --line: #e4e7e2;
  --line-strong: #d2d7d0;
  --green: #58755f;
  --green-hover: #47624e;
  --soft: #ebf1ec;

  /* Harmonized ClearSpace Paper Tints */
  --tint-paper: #ffffff;
  --tint-paper-line: #eaece8;
  --tint-sage: #eff4f0;
  --tint-sage-line: #dde7df;
  --tint-parchment: #faf5ea;
  --tint-parchment-line: #ede3cf;
  --tint-twilight: #eff3f7;
  --tint-twilight-line: #dde5ee;
  --tint-rose: #f8f1f2;
  --tint-rose-line: #ecdfe1;

  --phone-frame: #272927;
  --phone-edge: #c9cbc6;
  --shadow-phone:
    -14px 32px 54px rgba(24, 29, 25, 0.14),
    0 6px 16px rgba(24, 29, 25, 0.08);
  --shadow-card:
    0 2px 10px rgba(24, 29, 25, 0.04),
    0 14px 32px rgba(24, 29, 25, 0.05);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  --ease: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111210;
    --surface: #171816;
    --surface-soft: #1d1f1c;
    --ink: #eceeeb;
    --muted: #8f9690;
    --muted-soft: #616862;
    --line: #272a26;
    --line-strong: #363a35;
    --green: #6e9478;
    --green-hover: #7ea688;
    --soft: #202b23;

    --tint-paper: #1b1d1b;
    --tint-paper-line: #292d29;
    --tint-sage: #1d2620;
    --tint-sage-line: #2b382f;
    --tint-parchment: #25211a;
    --tint-parchment-line: #363024;
    --tint-twilight: #1b2229;
    --tint-twilight-line: #2a343f;
    --tint-rose: #261f21;
    --tint-rose-line: #382d30;

    --phone-frame: #2c2f2d;
    --phone-edge: #4c504c;
    --shadow-phone:
      -12px 34px 66px rgba(0, 0, 0, 0.56),
      0 6px 16px rgba(0, 0, 0, 0.36);
    --shadow-card:
      0 2px 12px rgba(0, 0, 0, 0.28),
      0 14px 32px rgba(0, 0, 0, 0.32);
  }
}

:root[data-theme="dark"] {
  --bg: #111210;
  --surface: #171816;
  --surface-soft: #1d1f1c;
  --ink: #eceeeb;
  --muted: #8f9690;
  --muted-soft: #616862;
  --line: #272a26;
  --line-strong: #363a35;
  --green: #6e9478;
  --green-hover: #7ea688;
  --soft: #202b23;

  --tint-paper: #1b1d1b;
  --tint-paper-line: #292d29;
  --tint-sage: #1d2620;
  --tint-sage-line: #2b382f;
  --tint-parchment: #25211a;
  --tint-parchment-line: #363024;
  --tint-twilight: #1b2229;
  --tint-twilight-line: #2a343f;
  --tint-rose: #261f21;
  --tint-rose-line: #382d30;

  --phone-frame: #2c2f2d;
  --phone-edge: #4c504c;
  --shadow-phone:
    -12px 34px 66px rgba(0, 0, 0, 0.56),
    0 6px 16px rgba(0, 0, 0, 0.36);
  --shadow-card:
    0 2px 12px rgba(0, 0, 0, 0.28),
    0 14px 32px rgba(0, 0, 0, 0.32);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--ease), color var(--ease);
}

/* Ambient Interactive Tidal Wave Canvas */
.tide-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 36px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.text-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.text-toggle button,
.text-toggle a {
  border: none;
  background: transparent;
  padding: 2px 3px;
  cursor: pointer;
  color: var(--muted-soft);
  transition: color var(--ease);
}

.text-toggle .active {
  color: var(--ink);
  font-weight: 550;
}

.text-toggle button:hover,
.text-toggle a:hover {
  color: var(--ink);
}

.v-sep {
  width: 1px;
  height: 13px;
  background: var(--line-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color var(--ease), transform 0.16s ease, opacity var(--ease);
}

.btn:hover {
  background: var(--green-hover);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.68;
  cursor: default;
}

.btn.lg {
  padding: 13px 38px;
  font-size: 15px;
}

.btn.full {
  width: 100%;
  padding: 13px 24px;
  font-size: 15px;
}

/* Shared Section Header (Clear 4-Pillar Hierarchy) */
.pillar-head {
  margin-bottom: 44px;
}

.pillar-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--green);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.pillar-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.3vw, 36px);
  font-weight: 550;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.pillar-sub {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 560px;
}

/* 1. Hero */
.hero-band {
  background: color-mix(in srgb, var(--bg) 64%, transparent);
  padding: 56px 0 88px;
  overflow: hidden;
  transition: background-color var(--ease);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 550;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.hero-tagline {
  margin: 0 0 32px;
  font-size: 15.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero-phone-wrap {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.iphone-hero {
  position: relative;
  width: 288px;
  padding: 9px;
  border-radius: 48px;
  background: var(--phone-frame);
  box-shadow:
    inset 0 0 0 1.5px var(--phone-edge),
    var(--shadow-phone);
  transform: rotateY(-8deg) rotateZ(1.5deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow var(--ease);
}

.iphone-hero:hover {
  transform: rotateY(-3deg) rotateZ(0.4deg) translateY(-4px);
}

.iphone-screen {
  position: relative;
  width: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 1206 / 2622;
}

.iphone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--ease);
}

.iphone-screen .screen-light {
  opacity: 1;
}

.iphone-screen .screen-dark {
  opacity: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .iphone-screen .screen-dark {
    opacity: 1;
  }
}

:root[data-theme="dark"] .iphone-screen .screen-dark {
  opacity: 1;
}

/* 2. Pillar 1: Offline Voice (Passive auto-looping demo, ZERO misleading button) */
.voice-band {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  padding: 88px 0 96px;
  transition: background-color var(--ease);
}

.voice-stage {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 48px;
  align-items: center;
}

.voice-meter {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.voice-meter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.voice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

.voice-band.is-speaking .voice-dot {
  opacity: 1;
  animation: pulseDot 1.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.4; }
}

.waveform {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 64px;
}

.waveform span {
  width: 3px;
  border-radius: 999px;
  background: var(--green);
  opacity: 0.32;
  transform-origin: center;
  transition: opacity 0.3s ease;
}

.voice-band.is-speaking .waveform span {
  opacity: 0.9;
  animation: waveTalk 1.05s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.06s);
}

@keyframes waveTalk {
  0%, 100% { transform: scaleY(0.42); }
  50% { transform: scaleY(1.06); }
}

.voice-draft-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 30px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.voice-transcript {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.78;
  color: var(--ink);
  min-height: 64px;
  transition: opacity 0.3s ease;
}

.voice-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--green);
  vertical-align: -2px;
  margin-left: 2px;
  opacity: 0;
}

.voice-band.is-speaking .voice-cursor {
  opacity: 1;
  animation: blinkCursor 0.8s steps(2) infinite;
}

@keyframes blinkCursor {
  50% { opacity: 0; }
}

.voice-draft-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted-soft);
}

.voice-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
}

/* 3. Pillar 2: Privacy Blur (0px layout shift) */
.privacy-band {
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  padding: 88px 0 96px;
  transition: background-color var(--ease);
}

.privacy-surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px 44px;
  box-shadow: var(--shadow-card);
}

.giant-prose {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 31px);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.blur-word {
  display: inline;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
}

.blur-word-inner {
  display: inline;
  padding: 2px 6px;
  border-radius: 7px;
  background-color: transparent;
  filter: blur(8px);
  opacity: 0.78;
  transition: filter 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, background-color 0.28s ease;
  user-select: none;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.blur-word:hover .blur-word-inner,
.blur-word[aria-pressed="true"] .blur-word-inner {
  filter: blur(0px);
  opacity: 1;
  background-color: var(--soft);
}

.blur-word:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 6px;
}

/* 4. Pillar 3: 1:1 Ported App 2D-Physics Gachapon on Retina Canvas */
.gacha-band {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  padding: 88px 0 96px;
  transition: background-color var(--ease);
}

.gacha-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}

.gacha-canvas-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gacha-canvas {
  width: 240px;
  height: 316px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.gacha-reveal-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gacha-dream-card {
  border-radius: 22px;
  padding: 28px 30px;
  background: var(--tint-parchment);
  border: 1px solid var(--tint-parchment-line);
  box-shadow: var(--shadow-card);
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.gacha-dream-card.is-swapping {
  opacity: 0.12;
  transform: translateY(12px) scale(0.97);
}

.dream-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.dream-card-date {
  font-size: 13px;
  color: var(--muted);
}

.dream-card-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green);
  font-weight: 550;
}

.dream-card-body {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

.dream-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dream-card-tag {
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  color: var(--muted);
}

/* 5. Pillar 4: Zero-Server Architecture (Clear 3-column proof) */
.trust-band {
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  padding: 88px 0 92px;
  transition: background-color var(--ease);
}

.trust-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.trust-col {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}

.trust-col h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.trust-col p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.72;
}

/* 6. Finale Reservation */
.finale-band {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  padding: 76px 0 56px;
  text-align: center;
  transition: background-color var(--ease);
}

.finale-title {
  margin: 0 0 24px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 550;
  letter-spacing: -0.02em;
}

.unified-pill-form {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 5px 5px 5px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.unified-pill-form:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 14%, transparent);
}

.unified-pill-form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14.5px;
  color: var(--ink);
  padding: 8px 10px 8px 0;
}

.unified-pill-form input::placeholder {
  color: var(--muted-soft);
}

.unified-pill-form .btn {
  padding: 10px 26px;
  flex-shrink: 0;
}

.waitlist-feedback {
  max-width: 480px;
  margin: 14px auto 0;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 12px;
  display: none;
}

.waitlist-feedback.show {
  display: block;
}

.waitlist-feedback.ok {
  background: var(--soft);
  color: var(--green);
}

.waitlist-feedback.err {
  background: color-mix(in srgb, #a33e36 10%, var(--surface));
  color: #a33e36;
}

:root[data-theme="dark"] .waitlist-feedback.err {
  color: #e0736c;
}

/* Footer */
.site-footer {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  padding: 12px 0 56px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-soft);
  transition: background-color var(--ease);
}

.footer-divider-row {
  max-width: 680px;
  margin: 0 auto 14px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-divider-row::before,
.footer-divider-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
}

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

/* Dedicated Waitlist Page */
.waitlist-main {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  padding: 40px 0 72px;
}

.waitlist-grid {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 68px;
  align-items: center;
}

.paper-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 42px 38px;
  box-shadow: var(--shadow-card);
}

.paper-sheet h1 {
  margin: 0 0 26px;
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 550;
  letter-spacing: -0.02em;
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color var(--ease), background-color var(--ease);
}

.field-input:focus {
  border-color: var(--green);
  background: var(--surface);
}

.radio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.radio-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill:has(input:checked) {
  background: var(--green);
  color: #ffffff;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: border-color var(--ease), background-color var(--ease), color var(--ease);
}

.chip-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-pill:has(input:checked) {
  background: var(--soft);
  border-color: var(--green);
  color: var(--green);
  font-weight: 550;
}

.waitlist-receipt {
  display: none;
  text-align: center;
  padding: 12px 0;
}

.waitlist-receipt.show {
  display: block;
}

.receipt-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green);
  font-size: 13.5px;
  font-weight: 600;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Privacy Policy Page */
.policy-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 38px 36px;
  box-shadow: var(--shadow-card);
}

.policy-card h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}

.policy-card h2 {
  font-size: 15.5px;
  margin: 26px 0 10px;
  color: var(--green);
}

.policy-card p,
.policy-card li {
  font-size: 14.5px;
  margin: 0 0 10px;
}

.policy-card ul {
  padding-left: 20px;
  margin: 0 0 12px;
}

.policy-summary {
  background: var(--soft);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  margin: 18px 0 24px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid,
  .voice-stage,
  .gacha-grid,
  .trust-cols,
  .waitlist-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-grid {
    text-align: center;
  }

  .iphone-hero {
    transform: none;
  }

  .privacy-surface {
    padding: 28px 24px;
  }

  .waitlist-grid {
    justify-items: center;
  }

  .paper-sheet {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .wrap,
  .waitlist-grid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .unified-pill-form {
    padding: 5px 5px 5px 16px;
  }

  .unified-pill-form .btn {
    padding: 10px 18px;
  }
}
