@import url('./tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; overflow-x: clip; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  display: grid;
  font-family: var(--font-body);
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
h1, p { margin: 0; }

/* Backdrop */
.backdrop { inset: 0; overflow: hidden; pointer-events: none; position: fixed; z-index: -1; }
.glow {
  background: radial-gradient(closest-side, oklch(61% 0.19 28 / .22), transparent);
  height: 90vmax; position: absolute; right: -25vmax; top: -20vmax; width: 90vmax;
  animation: breathe 9s ease-in-out infinite;
}
.grain {
  background-image: radial-gradient(oklch(97% 0.01 82 / .07) 1px, transparent 1px);
  background-size: 28px 28px; inset: 0; position: absolute;
  mask-image: linear-gradient(115deg, transparent 20%, #000 75%);
}

/* Top bar */
.topbar {
  align-items: center; display: flex; gap: 1.5rem; justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--gutter);
}
.logo { display: block; height: auto; width: clamp(150px, 15vw, 200px); }
.status {
  align-items: center; background: var(--color-surface); border: 1px solid var(--color-rule);
  border-radius: 999px; color: var(--color-muted); display: inline-flex; font-size: .78rem;
  font-weight: 500; gap: .6rem; padding: .55rem 1rem; white-space: nowrap;
  backdrop-filter: blur(8px);
}
.status-dot {
  background: var(--color-accent); border-radius: 50%; height: 8px; width: 8px;
  animation: ping 2.4s ease-out infinite;
}

/* Stage */
.stage {
  align-items: center; display: grid; gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  margin: 0 auto; max-width: 1400px; padding: clamp(1rem, 3vw, 3rem) var(--gutter); width: 100%;
}
.copy > * { animation: rise .9s var(--ease-out) both; }
.copy > :nth-child(2) { animation-delay: .08s; }
.copy > :nth-child(3) { animation-delay: .16s; }
.copy > :nth-child(4) { animation-delay: .24s; }
.copy > :nth-child(n+5) { animation-delay: .32s; }

.eyebrow {
  color: var(--color-accent); font-size: .78rem; font-weight: 600; letter-spacing: .16em;
  margin-bottom: 1.5rem; text-transform: uppercase;
}
h1 {
  font-family: var(--font-display); font-size: clamp(2.9rem, 6.4vw, 6.25rem); font-weight: 700;
  letter-spacing: -.045em; line-height: .98; margin-bottom: 1.75rem;
}
h1 span {
  background: linear-gradient(90deg, var(--color-accent), oklch(78% 0.13 60));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--color-muted); font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.65; max-width: 34rem; }

.progress { align-items: center; display: flex; gap: 1rem; margin: 2.25rem 0; max-width: 34rem; }
.progress-label {
  color: var(--color-faint); font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap;
}
.progress-track { background: var(--color-rule); border-radius: 99px; flex: 1; height: 3px; overflow: hidden; position: relative; }
.progress-bar {
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  border-radius: inherit; inset: 0 auto 0 0; position: absolute; width: 40%;
  animation: sweep 2.6s ease-in-out infinite;
}

.socials { display: flex; flex-wrap: wrap; gap: .75rem; }
.socials a {
  align-items: center; background: var(--color-surface); border: 1px solid var(--color-rule);
  border-radius: 999px; display: inline-flex; font-size: .9rem; font-weight: 500; gap: .6rem;
  padding: .7rem 1.15rem .7rem .9rem;
  transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), transform .25s var(--ease-out);
}
.socials a:hover { background: var(--color-accent); border-color: var(--color-accent); transform: translateY(-2px); }
.socials svg { fill: none; height: 18px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }
.socials svg .fill { fill: currentColor; stroke: none; }
.handle { color: var(--color-faint); font-size: .82rem; margin-top: 1rem; }

/* Bulb illustration */
.bulb { justify-self: center; position: relative; width: min(100%, 460px); }
.bulb svg { display: block; overflow: visible; width: 100%; }
.halo { animation: breathe 4.5s ease-in-out infinite; transform-origin: 200px 190px; }
.ring { fill: none; stroke: var(--color-ring); stroke-width: 1; }
.ring-outer { stroke-dasharray: 2 10; animation: spin 60s linear infinite; transform-origin: 200px 190px; }
.arc {
  fill: none; stroke: var(--color-accent); stroke-linecap: round; stroke-width: 18;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  filter: drop-shadow(0 0 14px oklch(61% 0.19 28 / .55));
  animation: draw 1.6s .3s var(--ease-out) forwards;
}
.bolt {
  fill: none; stroke: var(--color-text); stroke-linecap: round; stroke-linejoin: round; stroke-width: 16;
  opacity: 0; animation: flicker 1.4s 1.5s forwards;
}
.base line { stroke: var(--color-text); stroke-linecap: round; stroke-width: 18; }
.bulb-caption {
  bottom: -2rem; color: var(--color-faint); font-size: .72rem; font-weight: 600; left: 0;
  letter-spacing: .16em; position: absolute; right: 0; text-align: center; text-transform: uppercase;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-rule); color: var(--color-faint); display: flex; flex-wrap: wrap;
  font-size: .8rem; gap: .75rem 2rem; justify-content: space-between;
  margin: 0 var(--gutter); padding: 1.5rem 0 1.75rem;
}
.motto { color: var(--color-muted); }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flicker { 0%, 18%, 34% { opacity: 0; } 10%, 26%, 45%, 100% { opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--color-accent-soft); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }

/* Responsive */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .bulb { grid-row: 1; margin-bottom: 2.5rem; width: min(62vw, 300px); }
}
@media (max-width: 520px) {
  .status { font-size: .7rem; padding: .45rem .8rem; }
  .logo { width: 130px; }
  .bulb { width: min(56vw, 220px); }
  .socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .socials a { justify-content: center; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .arc { stroke-dashoffset: 0; }
  .bolt { opacity: 1; }
}
