/* ===================================================================
   KPMG Media Intelligence — front-end landing styling.

   Shared by the media-pack landing (index.html) and 404.html. Palette,
   fonts and dot-texture are lifted from the sister product
   golf-kpmg-player-reels (web/assets/site.css) and the media-pack theme
   (src/kpmg_media/services/theme.py) so the FE and the packs read as one
   product.

   This is a desktop-leaning hub (a wall of pack thumbnails), so the
   column is wider than the reels' 430px frame, but it stays fully
   responsive down to mobile.
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy:    #00091a;
  --kblue:   #00338D;
  --ksky:    #0077C8;
  --kgold:   #AF9157;
  --kgold-h: #C9A96E;
  --green:   #21C56E;
  --red:     #FF4D4D;
  --text:    rgba(255,255,255,0.95);
  --muted:   rgba(255,255,255,0.62);
  --muted2:  rgba(255,255,255,0.38);
  --font:    'Inter', ui-sans-serif, sans-serif;
  --display: 'Bebas Neue', Impact, sans-serif;
  --surface-card:   rgba(255,255,255,0.04);
  --surface-border: rgba(255,255,255,0.08);
}

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

[hidden] { display: none !important; }

html { height: 100%; background: var(--navy); -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  background: var(--navy);
  background-image:
    radial-gradient(ellipse 900px 600px at 70% 8%,  rgba(0,52,141,0.28) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 15% 92%, rgba(0,32,91,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 420px 320px at 50% 50%, rgba(175,145,87,0.05) 0%, transparent 50%);
  background-attachment: fixed;
  font-family: var(--font);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  -webkit-font-smoothing: antialiased;
}

/* Dot texture (matches the packs' grid) */
body::before {
  content: ''; position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

.page {
  position: relative; z-index: 1;
  width: 100%;
  min-width: 0; /* let children wrap instead of inflating the page width */
  max-width: 1040px; /* laptop-first: a wide hub, not the reels' phone frame */
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Header / brand lockup ── */
.site-header {
  width: 100%;
  padding: clamp(24px, 4vh, 40px) 0 4px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
  animation: fadeUp 0.6s ease both;
}
.brand-logo { height: 28px; width: auto; opacity: 0.92; }
.brand-rule {
  width: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--kgold), transparent);
}
.hero-logo {
  width: auto; height: clamp(52px, 8vw, 70px);
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.45));
}
.site-title {
  width: 100%; max-width: 100%; overflow-wrap: anywhere;
  font-family: var(--display);
  font-size: clamp(32px, 6vw, 46px);
  letter-spacing: 1.5px; line-height: 0.96; color: #fff;
}
.site-title span {
  display: block; font-family: var(--font);
  font-size: clamp(12px, 3.4vw, 13px); font-weight: 400; letter-spacing: 0.4px;
  line-height: 1.5; color: var(--muted); margin-top: 8px; text-transform: none;
}

/* "Live" status pill under the tournament logo. */
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(33,197,110,0.3); background: rgba(33,197,110,0.08);
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--green);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(33,197,110,0.6); animation: live-ping 2s ease-out infinite;
}
@keyframes live-ping {
  0%   { box-shadow: 0 0 0 0 rgba(33,197,110,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(33,197,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(33,197,110,0); }
}

/* Testing-only context badge (?event= override). Gold "testing" framing,
   hidden unless an event override is active. */
.test-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(175,145,87,0.35); background: rgba(175,145,87,0.1);
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--kgold-h);
}

/* ── Sections ── */
/* Laptop-first: Media Packs (main) and Live Dashboard (rail) sit side by side. */
.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 28px;
  padding: 14px 0 8px;
}
.section { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; min-width: 0; }

/* Stack the two sections vertically on narrower viewports. */
@media (max-width: 880px) {
  .content { grid-template-columns: 1fr; gap: 12px; }
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  animation: fadeUp 0.5s ease both;
}
.section-title {
  font-family: var(--display); font-size: clamp(22px, 6vw, 28px);
  letter-spacing: 1.4px; text-transform: uppercase; color: #fff; line-height: 1;
}
.section-sub { font-size: 11px; color: var(--muted2); letter-spacing: 0.3px; }
.section-rule {
  height: 1px; background: linear-gradient(90deg, rgba(175,145,87,0.4), rgba(255,255,255,0.04) 70%, transparent);
}

/* ── Pack cards (the secondary / legacy packs) ── */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.pack-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 18px 16px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none; color: inherit;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  animation: fadeUp 0.5s ease both;
}
.pack-card:active { transform: scale(0.99); }
@media (hover: hover) {
  .pack-card:hover { border-color: rgba(175,145,87,0.28); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
}
.pack-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pack-card__title { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.2px; line-height: 1.25; }
.pack-card__headline { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pack-card__meta {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
  font-size: 10.5px; color: var(--muted2);
}
.pack-card__arrow {
  position: absolute; right: 16px; bottom: 16px;
  width: 18px; height: 18px; color: var(--muted); transition: color .25s, transform .25s;
}
@media (hover: hover) { .pack-card:hover .pack-card__arrow { color: var(--kgold); transform: translateX(3px); } }

/* Pack-type chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(0,119,200,0.35); background: rgba(0,119,200,0.1);
  font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ksky); flex-shrink: 0;
}

/* ── Featured pack: the most recent one, given prominence ── */
.pack-featured {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  padding: 26px 26px 22px; border-radius: 20px;
  text-decoration: none; color: inherit;
  background:
    radial-gradient(520px 240px at 85% 0%, rgba(0,52,141,0.32) 0%, transparent 60%),
    linear-gradient(135deg, rgba(175,145,87,0.14) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(175,145,87,0.4);
  box-shadow: 0 12px 44px rgba(0,0,0,0.38);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: fadeUp 0.55s ease both;
}
.pack-featured:active { transform: scale(0.995); }
@media (hover: hover) {
  .pack-featured:hover { transform: translateY(-2px); box-shadow: 0 18px 52px rgba(0,0,0,0.44); }
  .pack-featured:hover .pack-featured__cta .pack-card__arrow { transform: translateX(3px); }
}
.pack-featured__eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--kgold-h);
}
.pack-featured__title {
  max-width: 100%; overflow-wrap: anywhere;
  font-family: var(--display); font-size: clamp(28px, 7vw, 40px);
  letter-spacing: 1px; text-transform: uppercase; color: #fff; line-height: 0.98;
}
.pack-featured__headline { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 56ch; }
.pack-featured__meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted2); }
.pack-featured__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  align-self: flex-start; min-height: 46px; padding: 12px 22px; border-radius: 12px;
  background: linear-gradient(135deg, #8a6e3a 0%, var(--kgold) 45%, var(--kgold-h) 100%);
  color: #000d1a; font-size: 14px; font-weight: 900; letter-spacing: 0.4px;
  box-shadow: 0 6px 20px rgba(175,145,87,0.32);
}
.pack-featured__cta .pack-card__arrow { position: static; color: #000d1a; width: 18px; height: 18px; }

/* ── Live Dashboard tile ── */
.dashboard-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 22px; border-radius: 18px;
  background:
    radial-gradient(420px 240px at 85% 0%, rgba(0,119,200,0.18) 0%, transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(0,119,200,0.28);
  text-decoration: none; color: inherit;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  animation: fadeUp 0.5s ease both;
}
@media (hover: hover) {
  .dashboard-tile:not(.dashboard-tile--soon):hover {
    border-color: rgba(0,119,200,0.5); transform: translateY(-2px); box-shadow: 0 14px 44px rgba(0,0,0,0.34);
  }
}
.dashboard-tile__icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ksky), rgba(0,51,141,0.7));
  color: #fff;
}
.dashboard-tile__icon svg { width: 26px; height: 26px; }
.dashboard-tile__body { flex: 1; min-width: 0; }
.dashboard-tile__title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.2px; }
.dashboard-tile__desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.dashboard-tile__arrow { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted); transition: color .25s, transform .25s; }
@media (hover: hover) { .dashboard-tile:not(.dashboard-tile--soon):hover .dashboard-tile__arrow { color: var(--ksky); transform: translateX(3px); } }
.dashboard-tile--soon { opacity: 0.62; cursor: default; border-style: dashed; }
.dashboard-tile--soon .dashboard-tile__icon { background: rgba(255,255,255,0.05); color: var(--muted2); }
.soon-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px; margin-left: 8px;
  border: 1px solid rgba(175,145,87,0.35); background: rgba(175,145,87,0.1);
  font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--kgold-h);
}

/* ── State (loading / empty / error) ── */
.state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 36px 20px; text-align: center;
  border: 1px dashed var(--surface-border); border-radius: 16px;
  background: var(--surface-card);
  font-size: 13px; color: var(--muted);
}
.state__spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.14); border-top-color: var(--kgold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.site-footer { padding: 24px 0 36px; text-align: center; margin-top: auto; animation: fadeUp 0.5s 0.4s ease both; }
.footer-rule { width: 32px; height: 1px; margin: 0 auto 14px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); }
.footer-note { font-size: 10px; color: var(--muted2); line-height: 1.6; }
.footer-note a { color: var(--kgold); text-decoration: none; }
.footer-note a:hover { text-decoration: underline; }

/* ── 404 ── */
.notfound { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.notfound__code { font-family: var(--display); font-size: clamp(72px, 24vw, 120px); color: var(--kgold-h); line-height: 0.9; letter-spacing: 2px; }
.notfound__msg { font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 320px; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 24px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #8a6e3a 0%, var(--kgold) 45%, var(--kgold-h) 100%);
  color: #000d1a; font-family: var(--font); font-size: 14px; font-weight: 900; letter-spacing: 0.4px;
  text-decoration: none; box-shadow: 0 6px 20px rgba(175,145,87,0.32);
}

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
