@font-face {
  font-family: 'Tibyan';
  src: url('/static/fonts/Changa.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --surface: #171610;
  --surface-raised: #201f18;
  --text: #f4f0e7;
  --muted: #c1bcad;
  --gold: #e2c17e;
  --gold-deep: #a78447;
  --rule: rgb(226 193 126 / 25%);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 52% 43%, rgb(122 91 42 / 15%), transparent 43%),
    linear-gradient(145deg, #1e1c15 0%, var(--surface) 54%, #11110e 100%);
  font-family: 'Tibyan', sans-serif;
  line-height: 1.75;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 5px;
}

.launch-page {
  display: flex;
  flex-direction: column;
  width: min(100% - 56px, 1120px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
}

.launch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.wordmark { align-items: center; }

.wordmark-logo {
  display: block;
  height: 40px;
  width: auto;
}

.launch-nav {
  display: flex;
  align-items: center;
  gap: 6px 22px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.launch-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.launch-nav a:hover { color: var(--gold); }

.wordmark-en {
  color: var(--muted);
  font: 500 0.67rem/1 sans-serif;
  letter-spacing: 0.2em;
}

.language-link {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration-color: var(--rule);
  text-underline-offset: 5px;
  transition: color 180ms ease;
}

.language-link:hover { color: var(--gold); }

.hero {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  grid-template-areas: "copy emblem";
  align-content: center;
  align-items: center;
  column-gap: clamp(36px, 8vw, 120px);
  row-gap: clamp(28px, 5vh, 58px);
  padding-block: 44px;
}

.hero-copy {
  grid-area: copy;
  padding-block: 16px;
}

.coming-label {
  margin: 0 0 15px;
  color: var(--gold);
  font: 600 0.72rem/1.5 sans-serif;
  letter-spacing: 0.22em;
}

.hero h1 {
  max-width: 590px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.45rem);
  font-weight: 600;
  line-height: 1.28;
  text-wrap: balance;
}

.hero-description {
  max-width: 480px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.9;
}

.logo-stage {
  position: relative;
  display: grid;
  grid-area: emblem;
  min-height: 320px;
  place-items: center;
  perspective: 1100px;
}

.logo-stage::before {
  position: absolute;
  width: min(84%, 330px);
  aspect-ratio: 1;
  border: 1px solid rgb(226 193 126 / 12%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgb(226 193 126 / 12%), rgb(226 193 126 / 3%) 48%, transparent 70%);
  content: "";
}

.coming-logo {
  position: relative;
  display: block;
  width: min(100%, 390px);
  height: auto;
  filter: drop-shadow(0 18px 32px rgb(0 0 0 / 40%));
  transform-style: preserve-3d;
  backface-visibility: hidden;
  animation: emblem-arrive 1.25s cubic-bezier(0.18, 0.78, 0.25, 1) both;
}

.cta {
  display: inline-block;
  margin-top: 24px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.cta:hover { transform: translateY(-2px); filter: brightness(1.06); }

/* ---------- feature list ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.feature {
  padding: 18px 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgb(255 255 255 / 2%);
}

.feature svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature h2 {
  margin: 8px 0 2px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- notify me ---------- */
.notify-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 18px 32px;
  align-items: center;
  margin-bottom: 26px;
  padding: 24px 26px;
  border: 1px solid var(--gold-deep);
  border-radius: 14px;
  background: linear-gradient(110deg, rgb(226 193 126 / 8%), rgb(255 255 255 / 2%));
  scroll-margin-top: 20px;
}

.notify-card h2 { margin: 0; font-size: clamp(1.1rem, 2vw, 1.38rem); font-weight: 600; }
.notify-card p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }

.notify-row { display: flex; gap: 10px; }

.notify-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgb(0 0 0 / 18%);
  color: var(--text);
  font: inherit;
}

.notify-row input:focus-visible,
.beta-check input:focus-visible,
.notify-row button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.notify-row button {
  flex: 0 0 auto;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--surface);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.beta-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  cursor: pointer;
}

.beta-check input { margin-top: 4px; accent-color: var(--gold-deep); }

.notify-status { margin: 0; font-weight: 600; }
.notify-status.ok { color: var(--gold); }
.notify-status.error { color: #f0a58f; margin-bottom: 10px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.launch-footer a { color: inherit; text-decoration: none; }

.training-note {
  display: flex;
  margin-bottom: 36px;
  grid-area: training;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: linear-gradient(110deg, rgb(255 255 255 / 2%), rgb(226 193 126 / 5%));
  animation: note-arrive 700ms 350ms ease both;
}

.training-note h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.38rem);
  font-weight: 600;
}

.training-note p {
  max-width: 660px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.training-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.training-link:hover {
  transform: translateY(-2px);
  color: var(--surface);
  background: var(--gold);
}

.training-link:active { transform: translateY(0) scale(0.98); }

.training-link span {
  font-family: sans-serif;
  font-size: 1rem;
}

.launch-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

@keyframes emblem-arrive {
  from {
    opacity: 0;
    transform: rotateY(-92deg) rotateX(14deg) translateZ(-90px) scale(0.76);
  }
  to {
    opacity: 1;
    transform: rotateY(0) rotateX(0) translateZ(0) scale(1);
  }
}

@keyframes note-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --surface: #f1eee6;
    --surface-raised: #eae5d9;
    --text: #27251e;
    --muted: #58564e;
    --gold: #765a25;
    --gold-deep: #947539;
    --rule: rgb(118 90 37 / 27%);
  }

  body {
    background:
      radial-gradient(ellipse at 52% 43%, rgb(226 193 126 / 18%), transparent 43%),
      linear-gradient(145deg, #f7f4ed 0%, var(--surface) 54%, #e9e4d9 100%);
  }

  .logo-stage::before {
    border-color: rgb(118 90 37 / 16%);
    background: radial-gradient(circle, rgb(226 193 126 / 25%), transparent 70%);
  }

  .coming-logo { filter: drop-shadow(0 16px 26px rgb(50 42 25 / 20%)); }

  .training-note {
    background: linear-gradient(110deg, rgb(255 255 255 / 34%), rgb(226 193 126 / 11%));
  }

  .notify-row input { background: rgb(255 255 255 / 60%); }
  .notify-status.error { color: #9f2b1d; }
  .feature { background: rgb(255 255 255 / 30%); }

  .training-link:hover { color: #fffdf8; }
}

@media (max-width: 980px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .launch-page { width: min(100% - 32px, 560px); }
  .launch-header { min-height: 64px; gap: 12px; }
  .wordmark-logo { height: 34px; }
  .launch-nav { gap: 4px 14px; }
  .launch-nav a { font-size: 0.85rem; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "emblem"
      "copy";
    row-gap: 4px;
    padding-block: 18px 26px;
    text-align: center;
  }

  /* Bigger, clearer logo without the tall empty stage around it. */
  .logo-stage { min-height: 0; padding-top: 6px; }
  .logo-stage::before { width: min(78%, 280px); }
  .coming-logo { width: min(88%, 340px); }
  .hero-copy { padding-block: 0; }
  .coming-label { margin: 14px 0 8px; }
  .hero h1 { max-width: none; font-size: clamp(2rem, 9vw, 3rem); }
  .hero-description { max-width: none; margin-top: 10px; }
  .cta { margin-top: 18px; }

  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .feature { padding: 14px 12px; }
  .feature:last-child { grid-column: 1 / -1; }
  .notify-card { grid-template-columns: minmax(0, 1fr); padding: 20px; margin-bottom: 18px; }
  .training-note { align-items: flex-start; flex-direction: column; padding: 20px; margin-bottom: 24px; }
  .training-link { align-self: flex-start; }
}

@media (max-width: 420px) {
  .launch-footer { font-size: 0.76rem; }
  .wordmark-en { display: none; }
  .launch-nav a[href="#notify"] { display: none; }
  .notify-row { flex-direction: column; }
}

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

  .coming-logo,
  .training-note { opacity: 1; }
}
