/* Flyster website. Colours match Flyster/UI/Theme.swift. */
:root {
  --ink: #120d21;
  --ink-2: #1b1430;
  --ink-3: #261c42;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f2ff;
  --muted: rgba(246, 242, 255, 0.68);
  --orange: #ff751f;
  --pink: #ff4780;
  --cyan: #52e6ff;
  --gold: #ffd652;
  --magenta: #ff4dc7;
  --flame: linear-gradient(90deg, var(--orange), var(--pink));
  --radius: 22px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 13, 33, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { font-weight: 900; font-style: italic; font-size: 20px; letter-spacing: 0.5px; }
.top nav { display: flex; gap: 22px; font-weight: 700; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
@media (max-width: 640px) { .top nav .wide { display: none; } }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 72px 0 0; }
.hero::before { /* sunset sky */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 50% 62%, rgba(255, 117, 31, 0.55), transparent 70%),
    linear-gradient(180deg, #120d21 0%, #2a1645 38%, #6b2350 62%, #120d21 100%);
}
.sun {
  position: absolute; left: 50%; top: 46%; z-index: -1;
  width: min(520px, 90vw); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), var(--orange) 55%, var(--pink));
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 20px) bottom / 100% 48% no-repeat,
                linear-gradient(#000, #000) top / 100% 52% no-repeat;
          mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 20px) bottom / 100% 48% no-repeat,
                linear-gradient(#000, #000) top / 100% 52% no-repeat;
  opacity: 0.9;
  filter: drop-shadow(0 0 60px rgba(255, 117, 31, 0.5));
}
.grid {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 46%; z-index: -1;
  background:
    linear-gradient(transparent 0 calc(100% - 2px), rgba(255, 77, 199, 0.55) 0) 0 0 / 100% 48px,
    linear-gradient(90deg, transparent 0 calc(100% - 2px), rgba(255, 77, 199, 0.55) 0) 0 0 / 64px 100%,
    linear-gradient(180deg, transparent, rgba(18, 13, 33, 0.4));
  transform: perspective(320px) rotateX(62deg);
  transform-origin: top;
  -webkit-mask: linear-gradient(180deg, transparent, #000 30%);
          mask: linear-gradient(180deg, transparent, #000 30%);
  animation: drive 1.2s linear infinite;
}
@keyframes drive { to { background-position: 0 48px, 0 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .grid { animation: none; } }

.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: end; gap: 40px; }
.hero-copy { padding-bottom: 96px; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  font-size: 13px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
}
.logo {
  margin: 0; font-size: clamp(64px, 12vw, 132px); line-height: 0.9;
  font-weight: 900; font-style: italic; letter-spacing: -1px;
  background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 var(--ink)) drop-shadow(0 0 28px rgba(255, 117, 31, 0.55));
}
.tagline { margin: 14px 0 0; font-size: 15px; font-weight: 800; letter-spacing: 6px; color: rgba(255, 255, 255, 0.86); }
.lede { max-width: 30em; margin: 22px 0 30px; font-size: 20px; color: var(--text); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; text-decoration: none;
  font-weight: 900; font-size: 17px; letter-spacing: 1.5px; text-transform: uppercase;
}
.btn-primary { background: var(--flame); color: var(--ink); box-shadow: 0 10px 30px rgba(255, 71, 128, 0.35); }
.btn-primary:hover { color: var(--ink); filter: brightness(1.08); }
.btn-ghost { color: var(--text); border: 2px solid rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.note { font-size: 14px; color: var(--muted); }

.phone {
  position: relative; width: min(330px, 100%); margin-inline: auto;
  padding: 10px; border-radius: 48px;
  background: linear-gradient(160deg, #3b3150, #120d21);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px rgba(0, 0, 0, 0.55);
}
.phone img { border-radius: 38px; aspect-ratio: 1320 / 2868; width: 100%; height: auto; background: var(--ink-3); }
.hero .phone { margin-bottom: -120px; }
@media (max-width: 860px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .hero-copy { padding-bottom: 32px; }
  .lede { margin-inline: auto; }
  .cta { justify-content: center; }
  .hero .phone { width: min(280px, 80%); }
  .sun { top: auto; bottom: 0; translate: -50% 10%; width: min(440px, 110vw); } /* behind the phone, clear of the text */
}

/* Sections */
section { padding: 96px 0; }
.hero + section { padding-top: 168px; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: var(--cyan); }
h2 { margin: 0; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; font-weight: 900; letter-spacing: -0.5px; }
h3 { margin: 0 0 6px; font-size: 20px; font-weight: 900; }
.section-head p { margin: 14px 0 0; color: var(--muted); font-size: 18px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  padding: 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-2), rgba(27, 20, 48, 0.4));
  border: 1px solid var(--line);
}
.card p { margin: 0; color: var(--muted); }
.badge {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px;
  border-radius: 14px; font-size: 24px; background: rgba(255, 255, 255, 0.06);
}
.c-orange { color: var(--orange); } .c-pink { color: var(--pink); } .c-cyan { color: var(--cyan); }
.c-gold { color: var(--gold); } .c-magenta { color: var(--magenta); }

/* Controls */
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.control { padding: 20px; border-radius: 18px; background: var(--ink-2); border: 1px solid var(--line); }
.control b { display: block; font-size: 19px; font-weight: 900; }
.control span { color: var(--muted); font-size: 15px; }
.control .g { display: block; margin-bottom: 10px; font-size: 26px; }

/* Biomes */
.biomes { background: linear-gradient(180deg, var(--ink), #180f2c 50%, var(--ink)); }
.shots {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.shot figure { margin: 0; }
.shot .phone { padding: 7px; border-radius: 34px; }
.shot .phone img { border-radius: 28px; }
.shot figcaption { margin-top: 14px; text-align: center; }
.shot figcaption b { display: block; font-size: 18px; font-weight: 900; }
.shot figcaption span { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .shots {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
    margin-inline: -16px; padding-inline: 16px; scrollbar-width: none;
  }
  .shot { scroll-snap-align: center; }
}

/* Missions */
.missions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mission { position: relative; padding: 24px 24px 22px; border-radius: var(--radius); background: #fff8e8; color: #21182f; }
.mission::after { /* comic speech-bubble tail */
  content: ""; position: absolute; left: 36px; bottom: -12px;
  border: 12px solid transparent; border-top-color: #fff8e8; border-bottom: 0;
}
.mission .emoji { font-size: 34px; line-height: 1; }
.mission p { margin: 12px 0 10px; font-size: 16px; }
.mission .call { font-weight: 900; color: #d9365e; }
.mission .goal {
  display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px;
  background: #21182f; color: var(--gold); font-size: 13px; font-weight: 800;
}

/* Rankings */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.board { border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); overflow: hidden; }
.board-head { display: flex; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 900; }
.board-head span { color: var(--muted); font-weight: 700; font-size: 14px; }
.board ol { list-style: none; margin: 0; padding: 6px 0; }
.board li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; padding: 10px 20px; font-variant-numeric: tabular-nums; }
.board li .r { font-weight: 900; color: var(--muted); }
.board li:nth-child(1) .r { color: var(--gold); }
.board li.you { background: rgba(82, 230, 255, 0.1); }
.board li.you .n { color: var(--cyan); font-weight: 800; }
.board .s { font-weight: 800; }
.board-foot { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { padding-left: 30px; position: relative; color: var(--muted); }
.ticks li::before { content: "◆"; position: absolute; left: 4px; color: var(--pink); }
.ticks b { color: var(--text); }

/* Final CTA */
.final { text-align: center; }
.final .box {
  padding: 64px 24px; border-radius: 32px; position: relative; overflow: hidden;
  background: radial-gradient(80% 120% at 50% 120%, rgba(255, 117, 31, 0.5), transparent 60%), var(--ink-2);
  border: 1px solid var(--line);
}
.final img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.final p { color: var(--muted); max-width: 32em; margin: 14px auto 28px; }

/* Footer */
footer { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Text pages: privacy, support */
.page { padding: 64px 0 96px; }
.page .wrap { max-width: 760px; }
.page h1 { margin: 0 0 8px; font-size: clamp(36px, 6vw, 52px); font-weight: 900; line-height: 1.05; }
.page .meta { color: var(--muted); margin: 0 0 40px; }
.page h2 { font-size: 26px; margin: 44px 0 12px; }
.page p, .page li { color: rgba(246, 242, 255, 0.86); }
.page ul { padding-left: 22px; }
.page li + li { margin-top: 6px; }
.page table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.page th, .page td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page th { color: var(--text); font-weight: 900; }
.page td { color: var(--muted); }
.table-scroll { overflow-x: auto; }
details { border: 1px solid var(--line); border-radius: 16px; background: var(--ink-2); padding: 0 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 18px 0; font-weight: 800; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--pink); font-weight: 900; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-top: 0; }
details > :last-child { padding-bottom: 18px; margin-bottom: 0; }
.contact {
  margin-top: 40px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 117, 31, 0.18), rgba(255, 71, 128, 0.12));
  border: 1px solid var(--line);
}
.contact h2 { margin-top: 0; }
