/*
  GeneralTSL — Public Site
  ══════════════════════════════════════════════════════════════════════════
  Aesthetic: "Squad Patch" — a comic-inked mascot badge system built around
  the TSL skull-sergeant logo. Thick black ink outlines, rounded sticker
  cards with hard offset shadows, a halftone-dot wash instead of scanlines,
  and the mascot + emote art used as actual decoration (corner stickers,
  hero art, badge marks) rather than abstract HUD glyphs.

  Same brand palette and type pairing as the dashboard/previous system —
  amber-on-charcoal, Rajdhani + Sora — but the construction language is
  totally different: sticker-peel and ink-outline instead of clip-path
  angles and hairline HUD brackets.

  Fonts:
    Display → Rajdhani (angular, chunky enough to read as a varsity/patch wordmark)
    Body    → Sora (brand continuity with the dashboard)
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0a0807;
  --bg-elev:     #15110b;
  --bg-elev-2:   #1d170e;

  --ink:         #060402;   /* comic-outline black, used for all thick borders */
  --border:      #2e2715;   /* kept for subtle dividers */
  --border-hi:   #463a1e;

  --text:        #f5ead6;
  --text-muted:  #a9916b;
  --text-dim:    #5c4e34;

  --accent:      #f59e0b;   /* amber — UI + type accents */
  --accent-hi:   #ffc857;
  --accent-2:    #f2690c;   /* mascot-logo orange — stickers, shadows, badges */
  --accent-dim:  rgba(245, 158, 11, 0.12);
  --accent-glow: rgba(245, 158, 11, 0.35);

  --font-display: 'Rajdhani', 'Arial Narrow', sans-serif;
  --font-body:    'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;

  --radius:    20px;
  --radius-sm: 12px;
  --ink-w:     3px;
  --pop:       7px;  /* hard-shadow offset used by the sticker system */
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* .glow-field is fixed + wider than the viewport on
    purpose (desktop glow bleed) — without this on <html> too, that fixed
    descendant expands the viewport's effective width past 100vw. */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── Atmosphere: halftone dot wash + warm vignette ──────────────────────
   Comic-print texture instead of the old scanline/grain pass — dots are
   drawn with two offset radial-gradients so they read as a genuine
   halftone screen rather than a repeating grid. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  background-image:
    radial-gradient(var(--accent-2) 1px, transparent 1.4px),
    radial-gradient(var(--accent-2) 1px, transparent 1.4px);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  mix-blend-mode: overlay;
  opacity: 0.08;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at 50% -10%, rgba(0,0,0,0) 0%, var(--bg) 78%);
}
/* Comic "impact burst" glow anchored top-center — concentric rather than
   a soft single ellipse, echoing the shield-badge rings in the mascot art */
.glow-field {
  position: fixed;
  top: -28%;
  left: 50%;
  width: 1100px;
  height: 1100px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      var(--accent-glow) 0px,
      transparent 2px,
      transparent 42px,
      var(--accent-glow) 44px
    );
  opacity: 0.22;
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 70%);
          mask-image: radial-gradient(circle, black 0%, transparent 70%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
}

/* ── Layout shell ────────────────────────────────────────────────────── */
.page { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ── Top bar: mascot badge + pill nav ───────────────────────────────── */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 28px;
  max-width: 1080px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 46px; height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,0.5));
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.brand:hover .brand-badge { transform: rotate(-6deg) scale(1.06); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-name span { color: var(--accent-2); }

.main-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.main-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 9px 18px;
  border: var(--ink-w) solid transparent;
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.main-nav a:hover {
  color: var(--text);
  background: var(--bg-elev-2);
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.main-nav a.active {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

/* ── Sticker panel: the core card component, used everywhere ──────────
   Thick ink border + rounded corners + hard offset shadow reads as a
   patch/sticker rather than a HUD readout panel. */
.panel {
  position: relative;
  background: var(--bg-elev);
  border: var(--ink-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop) var(--pop) 0 rgba(0,0,0,0.55);
  padding: 32px;
  margin-bottom: 28px;
}

/* corner-bracket HUD marks retired along with the old system */
.panel-corners { display: none; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 2px solid var(--accent-2);
  border-radius: 999px;
  padding: 4px 14px 4px 10px;
}
.eyebrow::before { content: '★'; font-size: 10px; }

/* ── Buttons: sticker buttons with a tactile press ──────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 13px 26px;
  background: var(--accent);
  color: var(--ink);
  border: var(--ink-w) solid var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
}
.btn:hover { background: var(--accent-hi); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost {
  background: var(--bg-elev);
  color: var(--text);
}
.btn.ghost:hover { background: var(--bg-elev-2); color: var(--accent-hi); }

/* ── Hero (home page): headline beside the mascot, comic-burst behind it */
.hero {
  padding: 56px 0 44px;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-copy { flex: 1 1 420px; min-width: 280px; }
.hero-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent-2);
  text-transform: uppercase;
  margin-bottom: 14px;
  animation: fadeUp 0.5s ease both;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.94;
  margin-bottom: 18px;
  animation: fadeUp 0.6s ease 0.08s both;
}
.hero h1 .accent-stroke {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent-2);
}
.hero-sub {
  max-width: 500px;
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
  animation: fadeUp 0.6s ease 0.16s both;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; animation: fadeUp 0.6s ease 0.24s both; }

.hero-mascot {
  flex: 0 0 auto;
  width: min(340px, 42vw);
  position: relative;
  animation: fadeUp 0.7s ease 0.1s both, floaty 5s ease-in-out 0.8s infinite;
}
.hero-mascot img { width: 100%; display: block; filter: drop-shadow(0 14px 0 rgba(0,0,0,0.5)); }

/* ── Nav cards grid (home) — sticker tiles, gently rotated ──────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin: 10px 0 44px; }
.nav-card {
  position: relative;
  display: block;
  background: var(--bg-elev);
  border: var(--ink-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop) var(--pop) 0 rgba(0,0,0,0.55);
  padding: 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
  animation: fadeUp 0.5s ease both;
  rotate: var(--tilt, 0deg);
}
.nav-card:nth-child(4n+1) { --tilt: -1.4deg; }
.nav-card:nth-child(4n+2) { --tilt: 1deg; }
.nav-card:nth-child(4n+3) { --tilt: -0.8deg; }
.nav-card:nth-child(4n+4) { --tilt: 1.6deg; }
.nav-card:hover {
  rotate: 0deg;
  transform: translateY(-5px);
  background: var(--bg-elev-2);
  box-shadow: 9px 9px 0 rgba(0,0,0,0.55);
}
.nav-card .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.nav-card h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); }
.nav-card:hover h3 { color: var(--accent-hi); }
.nav-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.nav-card .arrow { position: absolute; bottom: 20px; right: 22px; color: var(--accent); opacity: 0; transition: opacity 0.2s, transform 0.2s; transform: translateX(-6px); }
.nav-card:hover .arrow { opacity: 1; transform: translateX(0); }

/* A small emote sticker clipped to a card corner, like it's been slapped
   on top of the patch — used sparingly (one per page) for personality. */
.corner-sticker {
  position: absolute;
  width: 58px; height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.5));
  pointer-events: none;
  z-index: 4;
}
.corner-sticker.top-right { top: -20px; right: -16px; rotate: 10deg; }
.corner-sticker.top-left  { top: -18px; left: -16px; rotate: -12deg; }

/* ── Schedule: mission tickets with a perforated divider ────────────── */
.dossier-list { display: flex; flex-direction: column; gap: 14px; }
.dossier-row {
  display: grid;
  grid-template-columns: 112px 150px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 18px 22px;
  background: var(--bg-elev);
  border: var(--ink-w) solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.5);
  position: relative;
}
.dossier-row::before {
  /* perforation notch, like a torn ticket stub */
  content: '';
  position: absolute;
  left: 94px; top: -3px; bottom: -3px;
  border-left: 2px dashed var(--border-hi);
}
.dossier-row .day { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-hi); }
.dossier-row .time { font-family: var(--font-mono); font-size: 13px; color: var(--text); padding-left: 6px; }
.dossier-row .note { color: var(--text-muted); font-size: 13.5px; }
@media (max-width: 560px) {
  .dossier-row { grid-template-columns: 1fr; gap: 4px; }
  .dossier-row::before { display: none; }
}

/* ── Points Shop ─────────────────────────────────────────────────────── */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin: 10px 0 10px; }
.shop-item {
  position: relative;
  background: var(--bg-elev);
  border: var(--ink-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--pop) var(--pop) 0 rgba(0,0,0,0.55);
  padding: 26px 22px;
  animation: fadeUp 0.5s ease both;
}
.shop-item h3 { font-size: 19px; margin-bottom: 10px; color: var(--text); }
.shop-item p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }
.shop-cost {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--bg);
  background: var(--accent);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.shop-cmd {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent-hi);
  background: var(--bg-elev-2);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 8px 12px;
}

/* ── About page ──────────────────────────────────────────────────────── */
.bio-text { white-space: pre-wrap; color: var(--text); font-size: 15.5px; line-height: 1.8; max-width: 640px; }
.bio-text p { margin-bottom: 1em; }

/* ── Terms page (denser, legible, less decoration — it's legal text) ─── */
.legal h2 { font-size: 16px; margin: 28px 0 10px; color: var(--accent-hi); letter-spacing: 0.02em; }
.legal p, .legal li { color: var(--text); font-size: 14.5px; margin-bottom: 8px; }
.legal ul { padding-left: 20px; margin-bottom: 8px; }
.legal code { background: var(--bg-elev-2); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 12.5px; border: 1px solid var(--border-hi); }
.updated {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--bg);
  background: var(--accent-2);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 26px;
  padding: 5px 12px;
  border-radius: 999px;
}

/* ── Empty state ─────────────────────────────────────────────────────── */
.empty-state-block { display: flex; align-items: center; gap: 18px; padding: 10px 0; }
.empty-state-block img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0,0,0,0.5)); flex-shrink: 0; }
.empty { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; padding: 20px 0; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: var(--ink-w) solid var(--ink);
  margin-top: 60px;
  padding: 32px 28px 40px;
}
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-row a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 2px solid var(--border-hi);
  border-radius: 999px;
  padding: 8px 16px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.social-row a:hover { color: var(--ink); border-color: var(--ink); background: var(--accent); }
.footer-credit { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.04em; display: flex; align-items: center; gap: 10px; }
.footer-credit img { width: 26px; height: 26px; object-fit: contain; }

/* ── Mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .topbar { padding: 18px 20px; gap: 14px; }
  .main-nav { width: 100%; justify-content: flex-start; }
  .main-nav a { padding: 8px 14px; font-size: 12px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 30px; }
  /* flex-basis (420px, set via the .hero-copy shorthand) wins over a plain
     width even at 100% — it has to be reset to auto before width can govern
     the item's main size, or this stays clipped at ~420px on narrow screens. */
  .hero-copy { flex: 1 1 auto; width: 100%; max-width: 100%; }
  .hero-sub { max-width: 100%; }
  .hero-mascot { width: min(230px, 56vw); align-self: center; order: -1; animation-name: fadeUp; }
  .card-grid { grid-template-columns: 1fr; }
  .dossier-row { padding: 16px; }
}

/* Defensive wrap guard — long words/URLs never force horizontal overflow */
.hero-sub, .bio-text, .legal p, .legal li { overflow-wrap: break-word; }

/* ── Animations ──────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-10px) rotate(1.5deg); }
}
.reveal { animation: fadeUp 0.5s ease both; }
