@font-face {
  font-family: "Fredoka";
  src: url("fonts/Fredoka-SemiBold.woff2") format("woff2"),
       url("fonts/Fredoka-SemiBold.woff") format("woff");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("fonts/NunitoSans-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #132033;
  --soft-cloud: #f2f6f9;
  --happy-blue: #2e9dc4;
  --happy-blue-deep: #1f7fa3;
  --muted: rgba(19, 32, 51, 0.62);
  --glass: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.55);
  --font-display: "Fredoka", "Nunito Sans", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--soft-cloud);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(46, 157, 196, 0.18), transparent 55%),
    radial-gradient(90% 60% at 100% 100%, rgba(46, 157, 196, 0.12), transparent 50%),
    var(--soft-cloud);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.62;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.blob-a {
  width: min(78vw, 820px);
  height: min(78vw, 820px);
  top: -22%;
  left: -14%;
  background: radial-gradient(circle, rgba(46, 157, 196, 0.62) 0%, transparent 68%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.blob-b {
  width: min(60vw, 620px);
  height: min(60vw, 620px);
  bottom: -24%;
  right: -12%;
  background: radial-gradient(circle, rgba(31, 127, 163, 0.42) 0%, transparent 70%);
  animation: drift-b 28s ease-in-out infinite alternate;
}

.blob-c {
  width: min(42vw, 460px);
  height: min(42vw, 460px);
  top: 42%;
  left: 52%;
  background: radial-gradient(circle, rgba(19, 32, 51, 0.1) 0%, transparent 70%);
  animation: drift-c 20s ease-in-out infinite alternate;
}

.blob-d {
  width: min(36vw, 380px);
  height: min(36vw, 380px);
  top: 12%;
  right: 18%;
  background: radial-gradient(circle, rgba(120, 190, 220, 0.45) 0%, transparent 70%);
  opacity: 0.5;
  animation: drift-d 30s ease-in-out infinite alternate;
}

.halo {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(92vw, 720px);
  height: min(92vw, 720px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 28%, transparent 62%);
  filter: blur(2px);
  opacity: 0.9;
  animation: pulse-halo 10s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(19, 32, 51, 0.06) 100%);
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(7%, 9%, 0) scale(1.1); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-9%, -6%, 0) scale(1.14); }
}
@keyframes drift-c {
  from { transform: translate3d(-4%, 0, 0) scale(1); }
  to   { transform: translate3d(6%, -7%, 0) scale(1.08); }
}
@keyframes drift-d {
  from { transform: translate3d(0, 4%, 0) scale(1); }
  to   { transform: translate3d(-6%, -4%, 0) scale(1.12); }
}
@keyframes pulse-halo {
  from { opacity: 0.72; transform: translate(-50%, -50%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

.gate {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 10vh, 120px) clamp(24px, 5vw, 48px);
}

.hero {
  width: min(100%, 640px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-brand {
  margin-bottom: clamp(28px, 4.5vh, 44px);
  opacity: 0;
  animation: rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.05s;
}

.brand-mark {
  display: block;
  height: clamp(42px, 7vw, 58px);
  width: auto;
  max-width: min(320px, 78vw);
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(19, 32, 51, 0.08));
}
.brand-mark-dark { display: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--happy-blue-deep);
  margin-bottom: clamp(18px, 2.8vh, 26px);
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(46, 157, 196, 0.08);
  opacity: 0;
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.16s;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--happy-blue);
  box-shadow: 0 0 0 4px rgba(46, 157, 196, 0.18);
  flex-shrink: 0;
}

.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 11vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
  overflow: visible;
  padding-inline: 0.04em;
  margin-bottom: clamp(18px, 2.5vh, 24px);
  text-wrap: balance;
  opacity: 0;
  animation: rise 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.26s;
}

.rule {
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--happy-blue), transparent);
  margin-bottom: clamp(18px, 2.5vh, 24px);
  opacity: 0;
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.36s;
}

.sub {
  font-size: clamp(16px, 2.15vw, 20px);
  font-weight: 500;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.6;
  text-wrap: pretty;
  opacity: 0;
  animation: rise 1s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.44s;
}

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.theme-toggle {
  position: fixed;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(19, 32, 51, 0.08);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(19, 32, 51, 0.06);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-1px);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--happy-blue);
  outline-offset: 3px;
}
.theme-toggle .icon-sun { display: none; }

html[data-theme="dark"] {
  --ink: #eaf0f6;
  --soft-cloud: #070b10;
  --happy-blue-deep: #7ec8e4;
  --muted: rgba(234, 240, 246, 0.7);
  --glass: rgba(14, 20, 28, 0.55);
  --glass-border: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .brand-mark-light { display: none; }
html[data-theme="dark"] .brand-mark-dark { display: block; }
html[data-theme="dark"] .brand-mark {
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}
html[data-theme="dark"] .blob-a {
  background: radial-gradient(circle, rgba(46, 157, 196, 0.5) 0%, transparent 68%);
  opacity: 0.78;
}
html[data-theme="dark"] .blob-b {
  background: radial-gradient(circle, rgba(46, 157, 196, 0.34) 0%, transparent 70%);
  opacity: 0.7;
}
html[data-theme="dark"] .blob-c {
  background: radial-gradient(circle, rgba(234, 240, 246, 0.08) 0%, transparent 70%);
}
html[data-theme="dark"] .blob-d {
  background: radial-gradient(circle, rgba(80, 170, 210, 0.35) 0%, transparent 70%);
}
html[data-theme="dark"] .halo {
  background:
    radial-gradient(circle, rgba(46, 157, 196, 0.18) 0%, rgba(46, 157, 196, 0.05) 32%, transparent 62%);
}
html[data-theme="dark"] .grain {
  opacity: 0.055;
  mix-blend-mode: soft-light;
}
html[data-theme="dark"] .vignette {
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.45) 100%);
}
html[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(22, 28, 36, 0.85);
}
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

@media (max-width: 720px) {
  body { overflow: auto; }
  .gate { padding-block: clamp(72px, 14vh, 120px); }
  .sub { max-width: 30ch; }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .halo,
  .gate-brand,
  .eyebrow,
  .headline,
  .rule,
  .sub {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .halo { transform: translate(-50%, -50%); }
  .blob { will-change: auto; }
}
