:root {
  --paper: #ffffff;
  --ink: #1b1b1f;
  --muted: #55525b;
  --line: #e4e2e7;
  --well: #f4f3f6;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 500 16px/1.6 var(--round);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

/* ---------- ghost words (background) ---------- */
.ghosts {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.ghost-row { overflow: hidden; overflow: clip visible; } /* cut off sideways only, never the tops of tall glyphs */
.ghost-track {
  display: flex;
  width: max-content;
  font: 900 clamp(80px, 17.5vh, 200px)/1.3 var(--round);
  letter-spacing: -.01em;
  white-space: nowrap;
  animation: drift 140s linear infinite;
  will-change: transform;
}
.ghost-row:nth-child(2) .ghost-track { animation-duration: 170s; animation-direction: reverse; }
.ghost-row:nth-child(3) .ghost-track { animation-duration: 125s; animation-delay: -40s; }
.ghost-row:nth-child(4) .ghost-track { animation-duration: 190s; animation-direction: reverse; animation-delay: -70s; }
.ghost-track span {
  padding-right: .45em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(27, 27, 31, .075);
  transition: -webkit-text-stroke-color 1.2s var(--ease), color 1.2s var(--ease);
}
:lang(ja) .ghost-track { letter-spacing: .02em; }
/* the word the dots are showing glows a little everywhere in the background */
.ghosts[data-on="0"] [data-w="0"], .ghosts[data-on="1"] [data-w="1"], .ghosts[data-on="2"] [data-w="2"], .ghosts[data-on="3"] [data-w="3"],
.ghosts[data-on="4"] [data-w="4"], .ghosts[data-on="5"] [data-w="5"], .ghosts[data-on="6"] [data-w="6"] {
  -webkit-text-stroke-color: rgba(27, 27, 31, .2);
  color: rgba(27, 27, 31, .025);
}
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- dot paper (left side, desktop) ----------
   An even grid of tiny dots behind the text column, fading out towards the middle.
   A second, darker copy of the grid shows only in a soft circle around the cursor. */
.paper { display: none; }

/* keep the words readable over the outlines: a soft white glow around the text */
.copy :is(h1, .lede, .small, .num, .lbl, .until, .note), .foot {
  text-shadow: 0 0 2px var(--paper), 0 0 8px var(--paper), 0 0 16px var(--paper), 0 0 24px var(--paper);
}

/* ---------- header ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.mark {
  font: 900 26px/1 var(--round);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: flex-start;
  min-height: 44px;
  padding-top: 9px;
}
.mark sup { font: 500 10px/1 var(--round); margin: 1px 0 0 3px; color: var(--muted); }
.bar-end { display: flex; align-items: center; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border: 0; border-radius: 999px;
  font: 700 14.5px/1 var(--round);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { transform: translateY(-1px); background: #000; box-shadow: 0 6px 16px -8px rgba(0,0,0,.5); }
.btn-solid:active { transform: scale(.97); box-shadow: none; }
.btn-solid:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 14px; }
.btn-ghost:hover { background: var(--well); }

/* ---------- stage ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 8px 32px;
}
.copy { width: 100%; max-width: 560px; }

/* ---------- dot showcase ---------- */
.showcase { width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; }
.show-stage {
  position: relative;
  width: 100%;
  height: clamp(220px, 34vh, 330px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#field {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
#field.is-on { opacity: 1; }

/* ---------- copy ---------- */
h1 {
  margin: 0;
  font: 900 clamp(34px, 9vw, 46px)/1.12 var(--round);
  letter-spacing: -.015em;
  text-wrap: balance;
}
:lang(ja) h1 { letter-spacing: .01em; line-height: 1.3; }
h1 .ph { display: inline-block; }
.lede {
  margin: 16px 0 0;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
}
:lang(ja) .lede { font-size: 15.5px; line-height: 1.9; word-break: auto-phrase; }

.small { margin: 0 0 10px; display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }

/* countdown */
.opens { margin-top: 28px; }
.units { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.unit { display: inline-flex; align-items: baseline; gap: 5px; }
.num {
  display: inline-flex;
  font: 700 clamp(28px, 7vw, 36px)/1.3 var(--round);
  font-variant-numeric: tabular-nums;
  overflow: hidden; /* hides digits while they flip in */
  padding: .05em 0;
}
.num .d { display: inline-block; width: .62em; text-align: center; }
.lbl { font-size: 13.5px; color: var(--muted); }
.until { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* sign-up */
.notify { margin-top: 28px; }
.field {
  display: flex; align-items: center; gap: 6px;
  max-width: 460px;
  padding: 5px;
  background: var(--well);
  border: 1.5px solid transparent; border-radius: 999px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field:focus-within { border-color: var(--ink); background: var(--paper); }
.field[data-invalid] { border-color: #b42318; background: var(--paper); }
.field input {
  flex: 1; min-width: 0; min-height: 44px;
  border: 0; background: transparent; outline: none;
  padding: 0 8px 0 16px;
  font: 500 16px/1 var(--round); color: var(--ink);
}
.field input::placeholder { color: #9a97a0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* spam-bot trap, never shown */
.note { margin: 10px 0 0; min-height: 1.6em; font-size: 13px; color: var(--muted); }
.note[data-state="error"] { color: #b42318; }
.note[data-state="ok"] { color: var(--ink); font-weight: 700; }

/* ---------- footer ---------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px;
  font-size: 13px; color: var(--muted);
}

/* ---------- entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.js [data-enter] { opacity: 0; transform: translateY(12px); }
.js.is-in [data-enter] {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .bar { min-height: 64px; }
  .mark { font-size: 23px; }
  .nav-cta { padding: 0 16px; }
  .field { flex-direction: column; align-items: stretch; border-radius: 22px; padding: 6px; }
  .field input { padding: 0 12px; }
  .field .btn { width: 100%; }
  .foot { flex-direction: column; justify-content: center; text-align: center; gap: 4px; padding-block: 16px 20px; }
  .foot .domain { display: none; }
}

/* ---------- desktop: words left, dots right ---------- */
@media (min-width: 900px) {
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 88px);
  }
  .showcase { order: 2; margin: 0; }
  .show-stage { height: auto; aspect-ratio: 1; max-height: min(66vh, 580px); }
  h1 { font-size: clamp(38px, min(4.4vw, 8vh), 62px); }
  :lang(ja) h1 { font-size: clamp(30px, min(3.4vw, 6.4vh), 48px); }
  .lede { font-size: 18px; }
  .paper {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(27, 27, 31, .17) 1.1px, transparent 1.6px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 36%, transparent 56%);
            mask-image: linear-gradient(90deg, #000 0%, #000 36%, transparent 56%);
  }
  .paper-glow {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(27, 27, 31, .55) 1.4px, transparent 2px);
    background-size: 18px 18px;
    -webkit-mask-image: radial-gradient(170px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
            mask-image: radial-gradient(170px circle at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
    opacity: 0;
    transition: opacity .5s var(--ease);
  }
  .paper.is-lit .paper-glow { opacity: 1; }
  /* behind the text column the background words fade to a whisper; full strength around the dots */
  .ghosts {
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.18) 40%, #000 60%);
            mask-image: linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.18) 40%, #000 60%);
  }
}
@media (min-width: 900px) and (max-height: 800px) {
  .bar { min-height: 64px; }
  .lede { margin-top: 12px; }
  .opens, .notify { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-enter] { opacity: 1; transform: none; }
}
