:root {
  --bg: #050505;
  --fg: #fafafa;
  --muted: rgba(255,255,255,.60);
  --line: rgba(255,255,255,.16);
  --line-strong: rgba(255,255,255,.28);
  --duration: 1.15s;
  --ease: cubic-bezier(.22,.61,.36,1);
  --home-dot-size: clamp(54px, 14vw, 66px);
  --major-dot-size: clamp(94px, 25vw, 112px);
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
a, button, input { -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
input { border: 0; outline: none; }

.shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 24px 32px;
  position: relative;
  overflow: hidden;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  position: relative;
  z-index: 10;
}
.wordmark {
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255,255,255,.84);
}
.brandmark, .brandmark-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brandmark { flex-direction: column; gap: 5px; width: 26px; }
.brandmark i, .brandmark-large i, .choice-dot, .result-dot {
  display: block;
  border-radius: 50%;
  background: var(--fg);
}
.brandmark i { width: 7px; height: 7px; }

.fade-seq {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(7px);
  animation: reveal var(--duration) var(--ease) forwards;
}
.d1 { animation-delay: .15s; }
.d2 { animation-delay: .45s; }
.d3 { animation-delay: .8s; }
.d4 { animation-delay: 1.1s; }
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.home-main { position: relative; min-height: calc(100vh - 110px); }
.hero {
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  padding-top: 3vh;
  transition: opacity .9s var(--ease), filter .9s var(--ease);
}
.hero.leaving { opacity: 0; filter: blur(7px); pointer-events: none; }
.brandmark-large {
  flex-direction: column;
  gap: 18px;
  min-height: calc(var(--home-dot-size) * 2 + 18px);
}
.brandmark-large i {
  width: var(--home-dot-size);
  height: var(--home-dot-size);
  box-shadow: 0 0 48px rgba(255,255,255,.06);
  flex: 0 0 auto;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}
.hero .actions { margin-top: 38px; }
.eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}
.title {
  margin: 0;
  font-size: clamp(28px, 7.5vw, 42px);
  line-height: 1.00;
  letter-spacing: -.04em;
  font-weight: 620;
}
.subtitle {
  margin: 8px 0 0;
  max-width: 350px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--muted);
  word-break: keep-all;
}
.actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero .actions .btn { min-width: 148px; }
.btn {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
  transition: opacity .55s var(--ease), transform .55s var(--ease), background .55s var(--ease), color .55s var(--ease), border-color .55s var(--ease);
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn:hover { opacity: .92; transform: translateY(-1px); }
.footer-note {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Seamless inline transition */
.inline-dot-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 1;
  pointer-events: none;
}
.inline-dot-stage.active {
  visibility: visible;
  pointer-events: auto;
}
.inline-dot-stage .dot-card {
  animation: none;
  opacity: 1;
}
/* During the logo move, the real destination dots stay hidden under the moving clones.
   They appear in the same frame the clones are removed, so there is no flash. */
.inline-dot-stage.transitioning .choice-dot {
  visibility: hidden;
  opacity: 1;
  transition: none;
}
.inline-dot-stage .step-title,
.inline-dot-stage .dot-field,
.inline-dot-stage .choose-copy {
  /* Prevent the generic DOT-page keyframes from firing underneath the logo transition. */
  animation: none !important;
  opacity: 0 !important;
  transform: translateY(12px);
  filter: blur(8px);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease), filter 1.05s var(--ease);
}
.inline-dot-stage.copy-visible .step-title,
.inline-dot-stage.copy-visible .dot-field {
  opacity: 1 !important;
  transform: translateY(0);
  filter: blur(0);
}
.inline-dot-stage.copy-visible .choose-copy.ready {
  opacity: 1 !important;
  transform: translateY(0) !important;
  filter: blur(0) !important;
}
.inline-dot-stage:not(.copy-visible) .choose-copy {
  opacity: 0 !important;
  transform: translateY(10px) !important;
  filter: blur(8px) !important;
}
/* Dots themselves do not fade on page 2; only the copy/fields do. */
.inline-dot-stage.settled .choice-dot {
  visibility: visible;
  opacity: 1;
}
.transition-clone {
  position: fixed;
  z-index: 100;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
  margin: 0;
}

/* DOT flow */
.dot-stage {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  position: relative;
}
.stage { width: 100%; }
.stage.hidden { display: none; }
.step-title {
  margin: 0 0 30px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: reveal var(--duration) var(--ease) forwards .2s;
}
.dot-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.dot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 1;
}
.dot-card.right { animation-delay: 0s; }
.choice-dot {
  width: var(--major-dot-size);
  height: var(--major-dot-size);
  box-shadow: 0 0 48px rgba(255,255,255,.06);
  transition: opacity 1s var(--ease), transform 1s var(--ease), box-shadow 1s var(--ease);
  flex: 0 0 auto;
}
.dot-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  filter: blur(7px);
  animation: reveal var(--duration) var(--ease) forwards .45s;
}
.dot-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot-input {
  width: 100%;
  background: transparent;
  border-bottom: 1px solid var(--line-strong);
  color: var(--fg);
  padding: 12px 2px 14px;
  text-align: center;
  font-size: 16px;
  min-height: 52px;
}
.dot-input::placeholder { color: rgba(255,255,255,.22); }
.choose-copy {
  margin-top: 32px;
  text-align: center;
  opacity: 0;
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transform: translateY(10px);
  filter: blur(8px);
  color: var(--muted);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 11px;
}
.choose-copy.ready { opacity: 1; transform: translateY(0); filter: blur(0); }
.choose-mode .choice-dot {
  cursor: pointer;
  position: relative;
  overflow: visible;
  outline: none;
  animation: dotHum 1.55s ease-in-out infinite;
}
.choice-dot:focus,
.choice-dot:focus-visible,
.choice-dot:active {
  outline: none;
  box-shadow: none;
}
.choose-mode .choice-dot::before,
.choose-mode .choice-dot::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.52);
  opacity: 0;
  pointer-events: none;
  transform: scale(.96);
  animation: dotEcho 1.55s ease-out infinite;
}
.choose-mode .choice-dot::after {
  animation-delay: .48s;
  border-color: rgba(255,255,255,.34);
}
@keyframes dotHum {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(255,255,255,.07), 0 0 0 0 rgba(255,255,255,0); }
  50% { transform: scale(1.045); box-shadow: 0 0 72px rgba(255,255,255,.23), 0 0 24px rgba(255,255,255,.12); }
}
@keyframes dotEcho {
  0% { opacity: 0; transform: scale(.96); }
  18% { opacity: .62; }
  75%, 100% { opacity: 0; transform: scale(1.30); }
}
.choose-mode .dot-input { pointer-events: none; opacity: .85; }
.dot-card.faded { opacity: 0 !important; transition: opacity 1.05s var(--ease); }
.dot-card.faded .choice-dot { transform: scale(.82); opacity: .18; }

.to-center {
  position: fixed;
  z-index: 120;
  border-radius: 50%;
  background: var(--fg);
  pointer-events: none;
}
.result-stage {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  text-align: center;
}
.result-stage.preparing {
  position: absolute;
  inset: 0;
  visibility: hidden;
  display: grid !important;
  pointer-events: none;
}
.result-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  opacity: 1;
}
.result-dot { width: 22px; height: 22px; flex: 0 0 auto; }
.result-stage.preparing .result-dot { visibility: hidden; }
.result-kicker,
.result-title,
.result-copy,
.result-stage .actions {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(7px);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease), filter 1.05s var(--ease);
}
.result-stage.result-copy-visible .result-kicker,
.result-stage.result-copy-visible .result-title,
.result-stage.result-copy-visible .result-copy,
.result-stage.result-copy-visible .actions {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.result-stage.result-copy-visible .result-title { transition-delay: .08s; }
.result-stage.result-copy-visible .result-copy { transition-delay: .16s; }
.result-stage.result-copy-visible .actions { transition-delay: .24s; }
.result-kicker { margin: 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.result-title { margin: 0; font-size: clamp(34px, 9vw, 52px); line-height: .97; letter-spacing: -.045em; }
.result-copy { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }

/* Path */
.path-shell { min-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.path-head { padding-top: 26px; }
.path-title { margin: 10px 0 8px; font-size: clamp(34px, 10vw, 54px); letter-spacing: -.05em; line-height: .98; }
.path-meta { margin: 0; color: var(--muted); font-size: 13px; }
.path-canvas-wrap { flex: 1; display: grid; place-items: center; padding: 18px 0 24px; }
.path-canvas { width: 100%; aspect-ratio: 1/1; max-width: 400px; position: relative; }
.path-canvas svg { width: 100%; height: 100%; display: block; }
.path-footer { padding-bottom: 8px; text-align: center; }
.path-small { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 0 0 18px; }
.path-empty { height: 100%; display: grid; place-items: center; text-align: center; gap: 14px; color: var(--muted); }
.path-empty strong { color: var(--fg); font-size: 20px; font-weight: 600; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.68); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .9s var(--ease); padding: 24px; }
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal { width: min(100%, 360px); background: #0e0e0e; border: 1px solid rgba(255,255,255,.08); border-radius: 28px; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.4); transform: translateY(14px); transition: transform .9s var(--ease), opacity .9s var(--ease); opacity: 0; }
.modal-backdrop.show .modal { transform: translateY(0); opacity: 1; }
.modal-date, .modal-choice-label { color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: 10px; }
.modal-options { margin: 18px 0; display: grid; gap: 10px; }
.modal-option { background: rgba(255,255,255,.04); padding: 14px 16px; border-radius: 18px; line-height: 1.55; }
.modal-choice { margin-top: 12px; font-size: 21px; line-height: 1.35; font-weight: 600; }
.modal-close { margin-top: 18px; width: 100%; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(16px); background: var(--fg); color: var(--bg); border-radius: 999px; padding: 10px 16px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: 0; transition: .6s var(--ease); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* Direct /dot/ visit: show only the two dots first, then fade the copy in. */
.direct-dot-page .step-title,
.direct-dot-page .dot-field,
.direct-dot-page .choose-copy {
  animation: none !important;
  opacity: 0 !important;
  transform: translateY(12px);
  filter: blur(8px);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease), filter 1.05s var(--ease);
}
.direct-dot-page .stage.copy-visible .step-title,
.direct-dot-page .stage.copy-visible .dot-field {
  opacity: 1 !important;
  transform: translateY(0);
  filter: blur(0);
}
.direct-dot-page .stage.copy-visible .choose-copy.ready {
  opacity: 1 !important;
  transform: translateY(0);
  filter: blur(0);
}

@media (max-width: 420px) {
  .shell { padding-inline: 18px; }
  .dot-layout { gap: 10px; }
  .brandmark-large { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
