:root {
  --sky: #0f5fa8;
  --sky-light: #5cc4f2;
  --flame: #ff7a1a;
  --flame-hot: #ffc93c;
  --grass: #5ec237;
  --gem: #c04bff;
  --ink: #2b1305;
  --text: #ffffff;
  --muted: #d6ecff;
  --card: rgba(9, 44, 92, 0.82);
  --line: rgba(160, 220, 255, 0.3);
  --error: #ffb4a6;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---- Home: a sky of floating islands ---- */

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: linear-gradient(180deg, #0b4f94 0%, #1f86d1 45%, #6fd0f5 80%, #c8f0ff 100%);
}

.scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: 8vh;
  right: 11vw;
  width: min(22vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fffbe0 0%, #ffe27a 55%, #ffb627 100%);
  box-shadow: 0 0 90px 26px rgba(255, 220, 120, 0.45);
}

.cloud {
  position: absolute;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 30px -18px 0 4px rgba(255, 255, 255, 0.85), 70px -6px 0 -2px rgba(255, 255, 255, 0.85);
  animation: drift 60s linear infinite;
}

.c1 { top: 18vh; left: -10vw; width: 140px; }
.c2 { top: 52vh; left: -30vw; width: 110px; animation-duration: 80s; opacity: 0.8; }
.c3 { top: 32vh; left: -60vw; width: 170px; animation-duration: 95s; }

@keyframes drift { to { transform: translateX(170vw); } }

.isle { position: absolute; }
.isle__grass { fill: var(--grass); stroke: #2c6a14; stroke-width: 2; }
.isle__rock { fill: #8a5a35; stroke: #4b2a14; stroke-width: 2; }
.isle--far { bottom: 18vh; left: 6vw; width: min(22vw, 200px); opacity: 0.8; animation: bob 7s ease-in-out infinite; }
.isle--near { bottom: 4vh; right: 8vw; width: min(32vw, 300px); animation: bob 9s ease-in-out infinite reverse; }

.dragon { position: absolute; top: 26vh; left: 18vw; width: min(14vw, 120px); fill: #13406e; opacity: 0.7; animation: bob 5s ease-in-out infinite; }

@keyframes bob { 50% { transform: translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
  .cloud, .isle, .dragon { animation: none; }
}

.hero {
  position: relative;
  flex: 1;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}

.kicker {
  margin: 0 0 6px;
  color: var(--flame-hot);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.logo {
  margin: 0;
  font-size: clamp(54px, 9vw, 104px);
  line-height: 0.92;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.logo span {
  display: block;
  background: linear-gradient(180deg, #fff6c9 0%, #ffc93c 50%, #ff7a1a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #5a2203) drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.logo span + span { margin-left: 0.6em; }

.lead {
  max-width: 30em;
  margin: 18px 0 22px;
  font-size: 18px;
  color: var(--text);
}

.perks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perks li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 40, 84, 0.5);
  font-size: 14px;
  color: var(--muted);
}

.perks b { color: var(--text); font-weight: 600; }

.card {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.card h2 { margin: 0 0 6px; font-size: 24px; }
.muted { color: var(--muted); margin: 0 0 18px; }
.small { font-size: 13px; margin: 14px 0 0; }
.who { margin: -12px 0 18px; font-size: 28px; font-weight: 800; color: var(--flame-hot); }
.error { color: var(--error); margin: 14px 0 0; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid var(--flame-hot); outline-offset: 3px; }

.button.play {
  background: linear-gradient(180deg, var(--flame-hot) 0%, var(--flame) 60%, #e0520c 100%);
  color: var(--ink);
  box-shadow: 0 4px 0 #8a3005, 0 10px 24px rgba(255, 122, 26, 0.35);
}

.button.google {
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 4px 0 #b9ad9d, 0 10px 24px rgba(0, 0, 0, 0.3);
}

.button.google svg { width: 22px; height: 22px; }

.link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

form { display: grid; gap: 10px; }
label { font-size: 14px; color: var(--muted); }

input {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 28, 60, 0.6);
  color: var(--text);
  font: inherit;
}

input:focus { outline: 2px solid var(--flame); border-color: transparent; }

.spinner {
  width: 34px;
  height: 34px;
  margin: 4px auto 12px;
  border: 3px solid var(--line);
  border-top-color: var(--flame-hot);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

#loading { text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }

.foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(4, 28, 60, 0.7);
}

.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .logo span + span { margin-left: 0.35em; }
  .sun { top: 4vh; right: 6vw; }
}
