/* Skyfill website. Colours and type match the game: Lilita One titles with a
   navy outline, Nunito body, night-sky blues and star gold. */

@font-face { font-family: "Lilita One"; src: url(/assets/fonts/LilitaOne-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/assets/fonts/Nunito-Variable.ttf) format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --sky-top: #070f33;
  --sky-mid: #142a7a;
  --sky-low: #2f5fd6;
  --outline: #12204a;
  --gold: #ffc83d;
  --gold-hi: #ffe27a;
  --ink: #ffffff;
  --soft: rgba(255, 255, 255, 0.8);
  --faint: rgba(255, 255, 255, 0.55);
  --card: rgba(10, 22, 70, 0.55);
  --line: rgba(255, 255, 255, 0.13);
  --drift: #6fa8ff;
  --spark: #ffb067;
  --starfall: #6cf0c2;
  --style: #e59bff;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { background: var(--sky-top); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 500 18px/1.6 "Nunito", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 38%, #1c3c9f 70%, var(--sky-low) 100%);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* The live sky behind everything */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.page-body { position: relative; z-index: 1; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(24px, calc((100% - 1140px) / 2 + 24px));
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(7, 15, 51, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 26px "Lilita One", sans-serif; letter-spacing: 0.5px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 4px 12px #0007; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a { color: var(--soft); text-decoration: none; font-weight: 800; }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); }
.nav .nav-cta { color: var(--outline) !important; background: var(--gold); padding: 7px 16px; border-radius: 12px; border: 2px solid var(--outline); box-shadow: 0 3px 0 var(--outline); }

/* ---------- Type */
.title {
  font-family: "Lilita One", sans-serif; font-weight: 400;
  line-height: 1.04; letter-spacing: 0.5px; margin: 0;
  -webkit-text-stroke: 0.14em var(--outline); paint-order: stroke fill;
  text-shadow: 0 0.07em 0 rgba(18, 32, 74, 0.65);
}
.gold { color: var(--gold); }
.eyebrow { display: inline-block; font-weight: 900; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 14px; }
.lead { font-size: 21px; color: var(--soft); max-width: 31em; }

/* ---------- Buttons */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 16px;
  background: var(--gold); color: var(--outline);
  font: 900 17px/1.2 "Nunito", sans-serif; text-decoration: none;
  border: 3px solid var(--outline); box-shadow: 0 5px 0 var(--outline);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--outline); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--outline); }
.btn.alt { background: #fff; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-weight: 700; font-size: 12px; opacity: 0.75; }
.fine { color: var(--faint); font-size: 15px; margin-top: 14px; }

/* ---------- Device frames */
.phone {
  position: relative; width: 270px; aspect-ratio: 1179 / 2556;
  border-radius: 44px; padding: 10px;
  background: var(--outline);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08) inset, 0 30px 60px -10px rgba(0,0,0,0.65), 0 0 80px -20px var(--glow, #6fa8ff);
}
.phone img, .phone .frames { width: 100%; height: 100%; border-radius: 34px; object-fit: cover; }
.phone .frames { position: relative; overflow: hidden; }
.phone .frames img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.18s; }
.phone .frames img.on { opacity: 1; }
.tablet {
  position: relative; width: 100%; max-width: 560px; aspect-ratio: 2064 / 2752;
  border-radius: 36px; padding: 14px; background: var(--outline);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08) inset, 0 40px 80px -10px rgba(0,0,0,0.6), 0 0 120px -30px var(--drift);
}
.tablet img { width: 100%; height: 100%; border-radius: 24px; object-fit: cover; }

/* ---------- Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 30px; align-items: center; min-height: min(calc(100vh - 70px), 860px); padding-block: 30px 60px; }
.hero h1 { font-size: clamp(54px, 7.4vw, 96px); margin-bottom: 22px; }
.hero .lead { margin: 0 0 30px; }
.hero-art { position: relative; height: 620px; }
.hero-art .phone { position: absolute; }
.hero-art .p1 { left: 4%; top: 70px; transform: rotate(-7deg); --glow: var(--drift); animation: float 7s ease-in-out infinite; }
.hero-art .p2 { right: 2%; top: 0; transform: rotate(6deg); --glow: var(--spark); animation: float 7s ease-in-out -3.5s infinite; }
@keyframes float { 50% { translate: 0 -14px; } }
.hero-icon { width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 10px 30px #0009; margin-bottom: 24px; }

/* ---------- Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 10px 0 40px; }
.stats div { background: var(--card); padding: 26px 20px; text-align: center; backdrop-filter: blur(8px); }
.stats b { display: block; font: 46px/1 "Lilita One", sans-serif; color: var(--gold); letter-spacing: 0.5px; }
.stats span { color: var(--soft); font-weight: 800; font-size: 15px; }

/* ---------- Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding-block: 70px; }
.feature.flip .copy { order: 2; }
.feature h2 { font-size: clamp(40px, 5vw, 62px); margin-bottom: 18px; }
.feature .art { display: flex; justify-content: center; position: relative; }
.feature .art::before { /* soft coloured glow behind the device */
  content: ""; position: absolute; inset: 10% 15%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent); opacity: 0.45; filter: blur(30px);
}
.feature .phone { width: 300px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding: 0; list-style: none; }
.chips li { padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-size: 15px; color: var(--soft); }
.tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--glow); margin-bottom: 12px; }
.tag::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 12px var(--glow); }

/* Constellation drawn over the sky feature */
.constellation { position: absolute; width: 120%; left: -10%; top: -6%; z-index: 2; pointer-events: none; overflow: visible; }
.constellation line { stroke: var(--gold-hi); stroke-width: 2.2; stroke-linecap: round; opacity: 0.8; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 1.2s ease; }
.constellation circle { fill: #fff; filter: drop-shadow(0 0 6px var(--gold-hi)); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.2); transition: opacity 0.4s, transform 0.4s; }
.in .constellation line { stroke-dashoffset: 0; }
.in .constellation circle { opacity: 1; transform: scale(1); }

/* ---------- Daily list */
.daily { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px; padding: 0; list-style: none; }
.daily li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; color: var(--soft); font-size: 16px; }
.daily b { display: block; color: var(--ink); font-size: 17px; }

/* ---------- Collect fan */
.fan { position: relative; height: 560px; }
.fan .phone { position: absolute; width: 240px; left: 50%; top: 40px; }
.fan .phone:nth-child(1) { transform: translateX(-108%) rotate(-9deg); --glow: var(--style); }
.fan .phone:nth-child(2) { transform: translateX(-50%); z-index: 1; top: 0; --glow: var(--gold); }
.fan .phone:nth-child(3) { transform: translateX(8%) rotate(9deg); --glow: var(--starfall); }

/* ---------- iPad */
.ipad .art::before { --glow: var(--drift); }

/* ---------- Closing call to action */
.cta {
  text-align: center; margin: 60px 0 90px; padding: 70px 24px;
  border-radius: 36px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 200, 61, 0.22), transparent 60%), var(--card);
  backdrop-filter: blur(8px);
}
.cta h2 { font-size: clamp(40px, 5.5vw, 68px); margin-bottom: 14px; }
.cta p { color: var(--soft); margin: 0 auto 30px; max-width: 34em; }
.cta .stores { justify-content: center; }
.cta img { width: 110px; height: 110px; border-radius: 26px; margin: 0 auto 26px; box-shadow: 0 14px 40px #000a; }

/* ---------- Footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 46px; background: rgba(7, 15, 51, 0.5); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer nav { display: flex; gap: 22px; }
.footer nav a { color: var(--soft); text-decoration: none; font-weight: 800; }
.footer nav a:hover { color: var(--ink); }
.legal { color: var(--faint); font-size: 14px; margin: 18px 0 0; }
.legal a { color: var(--faint); }

/* ---------- Plain pages (support, privacy, 404) */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 24px 70px; }
.doc h1 {
  font: 400 clamp(40px, 6vw, 60px)/1.05 "Lilita One", sans-serif; letter-spacing: 0.5px; margin: 0 0 20px;
  -webkit-text-stroke: 0.14em var(--outline); paint-order: stroke fill; text-shadow: 0 0.07em 0 rgba(18, 32, 74, 0.65);
}
.doc h2 { font: 30px "Lilita One", sans-serif; letter-spacing: 0.4px; margin: 46px 0 12px; color: var(--gold); }
.doc h3 { font-size: 20px; font-weight: 900; margin: 0; }
.doc p, .doc li { color: var(--soft); }
.doc strong { color: var(--ink); }
.doc details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 22px; margin: 12px 0; backdrop-filter: blur(6px); }
.doc summary { cursor: pointer; font-weight: 900; font-size: 19px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; font: 26px/1 "Lilita One", sans-serif; color: var(--gold); transition: transform 0.2s; }
.doc details[open] summary::after { transform: rotate(45deg); }
.doc details[open] summary { margin-bottom: 6px; }
.doc details p { margin: 8px 0 0; }
.doc .contact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin: 26px 0; }
.doc .contact p:first-child { margin-top: 0; }

/* ---------- Reveal on scroll */
.js .reveal { opacity: 0; translate: 0 30px; transition: opacity 0.8s ease, translate 0.8s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .hero-art .phone { animation: none; }
  .constellation line { stroke-dashoffset: 0; transition: none; }
  .constellation circle { opacity: 1; transform: none; transition: none; }
}

/* ---------- Smaller screens */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: center; padding-top: 10px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .stores { justify-content: center; }
  .hero-icon { margin-left: auto; margin-right: auto; }
  .hero-art { height: 520px; max-width: 460px; width: 100%; margin: 0 auto; }
  .hero-art .phone { width: 220px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 36px; padding-block: 50px; text-align: center; }
  .feature.flip .copy { order: 0; }
  .feature .lead { margin-left: auto; margin-right: auto; }
  .chips { justify-content: center; }
  .daily { text-align: left; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav nav { gap: 14px; }
  .nav nav a:not(.nav-cta) { font-size: 15px; }
  .nav .nav-cta { display: none; }
  .brand { font-size: 23px; }
  .hero-art { height: 420px; }
  .hero-art .phone { width: 175px; border-radius: 30px; padding: 7px; }
  .hero-art .phone img, .hero-art .phone .frames { border-radius: 24px; }
  .btn { width: 100%; justify-content: center; }
  .feature .phone { width: 240px; }
  .daily { grid-template-columns: 1fr; }
  .fan { height: 430px; }
  .fan .phone { width: 170px; border-radius: 30px; padding: 7px; }
  .fan .phone img { border-radius: 24px; }
  .stats b { font-size: 38px; }
}
