/* ============================================================
   LUCK RAVENTO - base.css
   Design tokens, page shell, typography, the pitch backdrop.
   Portrait-first: everything is sized from a 360px baseline and
   capped at 560px so a tablet shows a phone-shaped stadium
   rather than a stretched one.
   ============================================================ */

:root {
  /* --- structure: indigo / navy ---------------------------------- */
  --navy-950: #080C24;
  --navy-900: #0E1436;
  --navy-850: #121A44;
  --navy-800: #16204F;
  --navy-700: #1D2965;
  --navy-600: #26347E;
  --indigo-500: #2F3D91;
  --indigo-400: #4053B4;
  --indigo-300: #6274D6;

  /* --- surfaces: cream ------------------------------------------ */
  --cream-50: #FEFBF4;
  --cream-100: #F8F2E4;
  --cream-200: #EFE5D0;
  --cream-300: #DFD0B2;
  --cream-400: #C7B48F;

  /* --- accent: energetic orange --------------------------------- */
  --orange-300: #FFB877;
  --orange-400: #FF9A44;
  --orange-500: #FF7A1A;
  --orange-600: #E8620A;
  --orange-700: #BE4D05;

  /* --- semantic -------------------------------------------------- */
  --good: #2FBF71;
  --good-dark: #1E8B50;
  --bad: #E5484D;
  --bad-dark: #B22F33;
  --warn: #F5B301;

  --ink: var(--navy-900);
  --ink-soft: #46528C;
  --ink-mute: #7C86B4;
  --on-navy: var(--cream-100);
  --on-navy-soft: #A9B3E0;

  /* --- shape ----------------------------------------------------- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --shadow-sm: 0 2px 6px rgba(8, 12, 36, .14);
  --shadow-md: 0 6px 18px rgba(8, 12, 36, .18);
  --shadow-lg: 0 14px 40px rgba(8, 12, 36, .28);
  --shadow-in: inset 0 2px 0 rgba(255, 255, 255, .35);

  --pad: 16px;
  --gap: 12px;
  --top-h: 60px;

  --font: "Trebuchet MS", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Trebuchet MS", system-ui, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--navy-950);
}

body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ------------------------------------------------------------------ *
 * The stadium: a navy pitch with mown stripes and floodlight glow.     *
 * Fixed behind everything, so scrolling a screen never drags it.       *
 * ------------------------------------------------------------------ */
#stadium {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 62% at 50% -12%, rgba(255, 154, 68, .20) 0%, rgba(255, 154, 68, 0) 62%),
    radial-gradient(90% 50% at 50% 112%, rgba(64, 83, 180, .34) 0%, rgba(64, 83, 180, 0) 70%),
    linear-gradient(178deg, var(--navy-900) 0%, var(--navy-850) 46%, var(--navy-950) 100%);
}

#stadium::before {
  /* mown pitch stripes */
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, .028) 0px,
    rgba(255, 255, 255, .028) 46px,
    rgba(255, 255, 255, 0) 46px,
    rgba(255, 255, 255, 0) 92px
  );
}

#stadium::after {
  /* centre circle + halfway line, faint enough to never fight the UI */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74vw;
  height: 74vw;
  max-width: 420px;
  max-height: 420px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(247, 240, 224, .05);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(247, 240, 224, .02);
}

/* ------------------------------------------------------------------ *
 * App shell                                                            *
 * ------------------------------------------------------------------ */
#app-root {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.screen__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--pad) var(--pad) calc(28px + var(--safe-bottom));
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 240, 224, .22) transparent;
}
.screen__scroll::-webkit-scrollbar { width: 6px; }
.screen__scroll::-webkit-scrollbar-thumb { background: rgba(247, 240, 224, .22); border-radius: 3px; }

.screen__foot {
  flex: 0 0 auto;
  padding: 10px var(--pad) calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(14, 20, 54, 0) 0%, rgba(14, 20, 54, .92) 34%, var(--navy-900) 100%);
}

/* Entrance animation. Removed by the router the moment it finishes so a
   throttled tab can never leave a screen parked off-centre. */
@keyframes screenIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.screen-enter { animation: screenIn .26s ease-out both; }

/* ------------------------------------------------------------------ *
 * Typography                                                           *
 * ------------------------------------------------------------------ */
.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; color: var(--cream-50); }
.h2 { font-size: 20px; font-weight: 800; letter-spacing: -.2px; color: var(--cream-50); }
.h3 { font-size: 16px; font-weight: 800; color: var(--cream-100); }
.lead { font-size: 14.5px; color: var(--on-navy-soft); }
.tiny { font-size: 12px; color: var(--ink-mute); }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; }

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--orange-400);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--on-navy-soft);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(247, 240, 224, .18), rgba(247, 240, 224, 0));
}
.section-title:first-child { margin-top: 2px; }

.ico { display: block; flex: 0 0 auto; }

.stack > * + * { margin-top: var(--gap); }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.spacer { flex: 1 1 auto; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ *
 * Accessibility / preference switches                                  *
 * ------------------------------------------------------------------ */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--orange-400);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Very short viewports (landscape phones, split screen) - tighten it up
   rather than clipping content away. */
@media (max-height: 620px) {
  :root { --pad: 12px; --gap: 9px; --top-h: 52px; }
  .h1 { font-size: 22px; }
}
