/* Raid on Camelot website (card 958). Daylight look of the game and its store art: sky blue, navy, gold, parchment.
   Headings in Lilita One (the game's display font, OFL), body in the system font. No outside fonts or scripts. */

@font-face {
  font-family: 'Lilita One';
  src: url('/fonts/lilita-one-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #4a9be8;
  --sky-light: #cfe8ff;
  --navy: #1d2a5c;
  --navy-deep: #121a3d;
  --gold: #f5b82e;
  --gold-deep: #c98a12;
  --gold-light: #ffe08a;
  --red: #c8321e;
  --parchment: #fff6df;
  --parchment-edge: #f1dfb2;
  --ink: #1b2347;
  --ink-soft: #3b4570;
  --white: #ffffff;
  --display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 64px;
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--sky-light);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--gold); color: var(--navy); padding: 8px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  background: rgba(18, 26, 61, 0.86);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(245, 184, 46, 0.55);
}
.site-header .bar {
  max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header .brand img { height: 48px; width: auto; }
.js .site-header.auto { transform: translateY(-110%); transition: transform 0.25s ease; }
.js .site-header.auto.show { transform: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-size: 22px; text-decoration: none; cursor: pointer;
  color: var(--navy); background: linear-gradient(#ffd86a, var(--gold) 55%, var(--gold-deep));
  border: 3px solid var(--navy); border-radius: 18px; padding: 12px 26px;
  box-shadow: 0 5px 0 var(--navy), 0 10px 22px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--navy), 0 14px 26px rgba(0, 0, 0, 0.3); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--navy), 0 6px 14px rgba(0, 0, 0, 0.25); }
.btn svg { width: 22px; height: 22px; flex: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-start;
  padding: 4vh 16px 40px; overflow: hidden; background: var(--sky);
}
.hero picture, .hero .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .hero-art { object-fit: cover; object-position: 70% 50%; }
.hero::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(transparent, rgba(18, 26, 61, 0.55));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1; width: min(46%, 560px); margin-left: max(2vw, calc((100% - 1200px) / 2));
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.hero-logo { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(18, 26, 61, 0.35)); }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.soon {
  font-family: var(--display); font-size: 20px; color: var(--white); text-align: center; margin: 0;
  text-shadow: 0 2px 0 var(--navy), 0 0 10px rgba(18, 26, 61, 0.9), 0 0 3px rgba(18, 26, 61, 1);
}
@media (max-width: 820px) {
  .hero { align-items: flex-start; padding-top: 18px; }
  .hero .hero-art { object-position: 50% 100%; }
  .hero { padding-bottom: 28px; }
  .hero-inner {
    width: 100%; max-width: 440px; margin: 0 auto; gap: 12px;
    min-height: calc(100svh - 46px); justify-content: space-between;
  }
  .hero-logo { width: 86%; margin: 0 auto; }
  .hero-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
}

/* ---------- facts strip ---------- */
.facts {
  background: var(--navy); color: var(--white); border-top: 3px solid var(--gold); border-bottom: 3px solid var(--gold);
}
.facts ul {
  list-style: none; margin: 0 auto; padding: 18px 16px; max-width: 1100px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.facts li { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; }
.facts svg { width: 40px; height: 40px; flex: none; }
.facts b { font-family: var(--display); font-weight: 400; font-size: 26px; color: var(--gold-light); display: block; line-height: 1; }
.facts span { font-size: 15px; opacity: 0.92; }
@media (max-width: 720px) {
  .facts ul { grid-template-columns: repeat(2, 1fr); gap: 16px 8px; }
  .facts li { justify-content: flex-start; }
}

/* ---------- feature sections ---------- */
.feature {
  position: relative; overflow: hidden; padding: 72px 16px;
  background-color: var(--sky); background-size: cover; background-position: center;
}
.feature::before { /* soft veil so the plaque and phone stand out from the painting */
  content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, 0.06), rgba(18, 26, 61, 0.18));
}
.feature.parchment { background: var(--parchment) radial-gradient(circle at 50% 0%, #fffaf0, var(--parchment-edge)); }
.feature.parchment::before { display: none; }
.feature .row {
  position: relative; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
}
.feature.flip .text { order: 2; }
.plaque {
  background: var(--parchment); border: 5px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--navy), 0 16px 34px rgba(18, 26, 61, 0.3);
  padding: 26px 28px; text-align: center;
}
.plaque h2 { font-size: clamp(34px, 4.4vw, 52px); color: var(--navy); }
.plaque p { margin-top: 12px; font-size: 19px; color: var(--ink-soft); }
.chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
  background: var(--navy); color: var(--white); border: 2px solid var(--gold); border-radius: 999px; font-weight: 700; font-size: 16px;
}
.chips img { width: 32px; height: 32px; object-fit: contain; flex: none; }

.stage { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: min(330px, 78vw); aspect-ratio: 780 / 1688; border-radius: 34px; overflow: hidden;
  border: 6px solid var(--gold); box-shadow: 0 0 0 4px var(--navy), 0 26px 50px rgba(18, 26, 61, 0.45);
  background: var(--navy-deep);
}
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; }
.phone.video { aspect-ratio: 9 / 16; }
.phone.grid { aspect-ratio: 780 / 878; width: min(400px, 86vw); border-radius: 26px; }
.phone { z-index: 1; }
.cutout { /* beside the phone, on the side away from the plaque; it may touch the gold frame, never the game screen */
  --cw: clamp(150px, 16vw, 230px);
  position: absolute; bottom: -72px; left: calc(50% + 165px - 6px); width: var(--cw); height: auto; z-index: 2;
  filter: drop-shadow(0 12px 16px rgba(18, 26, 61, 0.4)); pointer-events: none;
}
.feature.flip .cutout { left: auto; right: calc(50% + 165px - 6px); }
.stage:has(.phone.grid) .cutout { left: calc(50% + 200px - 6px); }
.feature.flip .stage:has(.phone.grid) .cutout { left: auto; right: calc(50% + 200px - 6px); }
@media (max-width: 820px) {
  .feature { padding: 56px 16px 64px; }
  .feature .row { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .text { order: 0; }
  .stage { justify-content: flex-end; }
  .phone { width: 62vw; }
  .phone.grid { width: 76vw; }
  .cutout, .stage:has(.phone.grid) .cutout { left: 0; right: auto; width: 44vw; bottom: -64px; z-index: 0; }
  .cutout.wide-only { display: none; }
  .feature.flip .stage { justify-content: flex-start; }
  .feature.flip .cutout, .feature.flip .stage:has(.phone.grid) .cutout { left: auto; right: 0; }
}

/* ---------- help ---------- */
.help { background: var(--navy-deep); color: var(--white); padding: 72px 16px; }
.help .row { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 40px; }
.help img { width: 168px; height: auto; flex: none; }
.help .app-icon { border-radius: 38px; border: 4px solid var(--gold); box-shadow: 0 0 0 3px var(--navy), 0 14px 28px rgba(0, 0, 0, 0.4); }
.help h2 { font-size: clamp(34px, 4.4vw, 48px); color: var(--gold-light); }
.help p { margin: 10px 0 22px; opacity: 0.92; }
.help .btn { margin-top: 18px; }
@media (max-width: 720px) {
  .help .row { flex-direction: column; gap: 20px; text-align: center; }
  .help img { width: 128px; }
  .help .app-icon { border-radius: 30px; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy-deep); color: rgba(255, 255, 255, 0.86); border-top: 2px solid rgba(245, 184, 46, 0.4);
  padding: 28px 16px 36px; font-size: 15px;
}
.site-footer .bar {
  max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { color: var(--gold-light); }

/* ---------- trailer dialog ---------- */
.trailer-dialog {
  padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100vh; margin: 0;
}
.trailer-dialog::backdrop { background: rgba(10, 14, 34, 0.9); }
.trailer-dialog .frame { height: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; }
.trailer-dialog video {
  max-height: calc(100vh - 32px); max-width: 100%; aspect-ratio: 9 / 16; border-radius: 18px;
  border: 4px solid var(--gold); background: #000;
}
.trailer-dialog .close {
  position: fixed; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--navy); background: var(--gold); color: var(--navy); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.trailer-dialog .close svg { width: 22px; height: 22px; }

/* ---------- reveal on scroll (only when the script runs; content is visible without it) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- legal pages ---------- */
.legal { padding: calc(var(--header-h) + 32px) 16px 56px; background: var(--sky-light); min-height: 100vh; }
.legal main {
  max-width: 780px; margin: 0 auto; background: var(--parchment); border: 4px solid var(--gold); border-radius: var(--radius);
  box-shadow: 0 0 0 3px var(--navy), 0 14px 30px rgba(18, 26, 61, 0.22); padding: 28px 28px 34px;
}
.legal h1 { font-size: 40px; color: var(--navy); }
.legal h2 { font-size: 24px; color: var(--navy); margin-top: 26px; }
.legal p, .legal li { font-size: 17px; color: var(--ink); margin-top: 10px; }
.legal ul { padding-left: 22px; margin: 0; }
.legal .muted { color: var(--ink-soft); font-size: 15px; }
.legal a { color: #1f4fb0; }
@media (max-width: 560px) { .legal main { padding: 22px 18px 28px; } .legal h1 { font-size: 32px; } }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--sky) center / cover; }
.lost .plaque { max-width: 460px; }
.lost .plaque > img { width: 180px; height: auto; margin: 0 auto 10px; }
.lost .btn img { width: 26px; height: 26px; }
.lost .btn { margin-top: 18px; }

.lost h1 { font-size: 40px; color: var(--navy); }
