:root {
  --ink: #f3f0e8;
  --mute: rgba(243, 240, 232, 0.62);
  --faint: rgba(243, 240, 232, 0.38);
  --line: rgba(243, 240, 232, 0.14);
  --glow: #5ec4b0;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body { height: 100%; margin: 0; }

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background: #0a1218;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  position: relative;
}

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

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  filter: saturate(0.9) contrast(1.05);
}

.bg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.55) 0%, rgba(8, 12, 18, 0.72) 45%, rgba(8, 12, 18, 0.88) 100%),
    radial-gradient(900px 500px at 50% 30%, transparent 0%, rgba(8, 12, 18, 0.35) 70%);
}

.top, .app, .foot { position: relative; z-index: 1; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(1rem + var(--safe-t)) 1.5rem 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(94, 196, 176, 0.25));
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.045em;
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  line-height: 1;
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav a { color: var(--faint); }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.app {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.panel {
  width: min(36rem, 100%);
  text-align: left;
}

.home { text-align: center; }
.panel.home { width: min(36rem, 100%); margin-inline: auto; }

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 650;
}

.sub {
  margin: 1rem 0 0;
  color: var(--mute);
  font-size: 1.05rem;
  line-height: 1.45;
}

.go { margin: 1.75rem 0 0; }

.link {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.12rem;
}
.link:hover { border-color: var(--ink); }

.lanes {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.lane {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.lane:last-child { border-bottom: 1px solid var(--line); }

.lane-stage {
  height: 2.6rem;
  display: grid;
  place-items: center;
  justify-items: start;
}

.anim-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  min-height: 2.4rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.anim-slot.is-scramble {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.anim-slot.is-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.anim-slot.is-leaf {
  font-size: 1.85rem;
  line-height: 1;
  transition: transform 0.28s ease;
}

.anim-slot.is-leaf.flip {
  transform: scaleX(-1);
}

.anim-slot.is-settled {
  color: var(--ink);
  text-shadow: 0 0 18px rgba(94, 196, 176, 0.85), 0 0 4px rgba(243, 240, 232, 0.45);
  animation: settle-glow 1.1s ease forwards;
}

.lane-copy {
  display: grid;
  gap: 0.2rem;
}

.lane-label {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.lane-label.show {
  opacity: 1;
  transform: none;
}

.lane-desc {
  color: var(--mute);
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.5s ease 0.1s;
}

.lane-label.show + .lane-desc,
.lane.is-done .lane-desc {
  opacity: 1;
}

@keyframes settle-glow {
  0% {
    text-shadow: 0 0 0 transparent;
    filter: brightness(1);
  }
  35% {
    text-shadow: 0 0 22px rgba(94, 196, 176, 1), 0 0 6px rgba(243, 240, 232, 0.7);
    filter: brightness(1.15);
  }
  100% {
    text-shadow: 0 0 10px rgba(94, 196, 176, 0.55);
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim-slot.is-settled { animation: none; text-shadow: none; }
  .anim-slot.is-leaf { transition: none; }
  .lane-label { opacity: 1; transform: none; transition: none; }
  .lane-desc { opacity: 1; transition: none; }
}

.mails {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.mails a {
  color: var(--ink);
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
}
.mails a:hover { border-color: var(--ink); }

.place {
  margin: 1.75rem 0 0;
  color: var(--faint);
  font-size: 0.9rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem calc(1.25rem + var(--safe-b));
  color: var(--faint);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 520px) {
  .brand-mark { width: 2.75rem; height: 2.75rem; }
  .brand-name { font-size: 1.35rem; }
  .lane {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .lane-stage { height: 2.2rem; }
}
