/* ---------- Tokens ---------- */
:root {
  /* Brand — derived from escudo (sky blue + heritage red) */
  --brand-50:  #EAF4FB;
  --brand-100: #C9E2F3;
  --brand-200: #95C7E6;
  --brand-300: #5DA8D5;
  --brand-400: #2B8FCB;
  --brand-500: #1E88E5;
  --brand-600: #0D6FBE;
  --brand-700: #0A4D8C;
  --brand-800: #0B3868;
  --brand-900: #0B243F;

  --accent-red: #E53935;
  --accent-red-deep: #B82C28;

  /* Neutrals */
  --bg:           #F7F8FB;
  --bg-elev:     #FFFFFF;
  --bg-tint:     #F2F5FA;
  --surface:     #FFFFFF;
  --surface-alt: #F4F6FB;
  --fg:           #0B1426;
  --fg-muted:    #5A6478;
  --fg-soft:      #8893A6;
  --border:       #E6EAF0;
  --border-strong:#CFD6E2;
  --shadow-sm: 0 1px 2px rgba(11, 20, 38, 0.04), 0 1px 1px rgba(11, 20, 38, 0.03);
  --shadow-md: 0 4px 14px -2px rgba(11, 20, 38, 0.08), 0 2px 4px rgba(11, 20, 38, 0.04);
  --shadow-lg: 0 24px 48px -16px rgba(11, 20, 38, 0.18), 0 8px 20px -8px rgba(11, 20, 38, 0.08);
  --shadow-brand: 0 14px 40px -10px rgba(30, 136, 229, 0.45);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --font-display: "Space Grotesk", "Manrope", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1240px;
}

/* Dark theme */
[data-theme="dark"] {
  --bg:           #07101E;
  --bg-elev:     #0E1827;
  --bg-tint:     #0B1421;
  --surface:     #0F1B2E;
  --surface-alt: #142136;
  --fg:           #F4F6FA;
  --fg-muted:    #A9B4C6;
  --fg-soft:      #6D7A91;
  --border:       #1A2840;
  --border-strong:#283A5A;
  --brand-500:   #4FB3F5;
  --brand-600:   #2E96E0;
  --brand-700:   #1572BB;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.45), 0 2px 4px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 28px 60px -16px rgba(0, 0, 0, 0.6), 0 8px 20px -8px rgba(0, 0, 0, 0.35);
  --shadow-brand: 0 14px 50px -8px rgba(79, 179, 245, 0.55);
}

/* Palette: heritage (warmer cream + deep navy + red) */
[data-palette="heritage"] {
  --bg:           #F6F1E6;
  --bg-elev:     #FBF8F1;
  --bg-tint:     #EFE7D3;
  --surface:     #FFFDF7;
  --surface-alt: #F1EAD7;
  --fg:           #1B1812;
  --fg-muted:    #6B5F48;
  --fg-soft:      #998765;
  --border:       #E2D7BD;
  --border-strong:#CAB98E;
  --brand-500:   #1F4E8C;
  --brand-600:   #143864;
  --brand-700:   #0E2944;
  --accent-red:  #B82C28;
  --shadow-brand: 0 14px 40px -10px rgba(31, 78, 140, 0.35);
}
[data-palette="heritage"][data-theme="dark"] {
  --bg: #14110A;
  --bg-elev: #1C1810;
  --bg-tint: #221E15;
  --surface: #1F1B12;
  --surface-alt: #2A2418;
  --fg: #F6EFDB;
  --fg-muted: #B8A77F;
  --fg-soft: #8A7A56;
  --border: #2E2719;
  --border-strong: #4A3F25;
  --brand-500: #6AA4DF;
  --brand-600: #4E8AC8;
}

/* Palette: midnight (premium dark-first sky) */
[data-palette="midnight"] {
  --bg:           #06091A;
  --bg-elev:     #0C112B;
  --bg-tint:     #0A0F26;
  --surface:     #0E1532;
  --surface-alt: #131A3F;
  --fg:           #EEF1FA;
  --fg-muted:    #A0AAC8;
  --fg-soft:      #6B7596;
  --border:       #1B244D;
  --border-strong:#2A3669;
  --brand-500:   #5BA6FF;
  --brand-600:   #3A8CEF;
  --brand-700:   #1F6BCC;
  --accent-red:  #FF5764;
  --shadow-brand: 0 14px 60px -8px rgba(91, 166, 255, 0.55);
}
[data-palette="midnight"][data-theme="light"] {
  /* if user picks light on midnight, fall back to default light */
  --bg:           #F7F8FB;
  --bg-elev:     #FFFFFF;
  --bg-tint:     #F2F5FA;
  --surface:     #FFFFFF;
  --surface-alt: #F4F6FB;
  --fg:           #0B1426;
  --fg-muted:    #5A6478;
  --fg-soft:      #8893A6;
  --border:       #E6EAF0;
  --border-strong:#CFD6E2;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.55;
  transition: background-color 240ms ease, color 240ms ease;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand-500);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--brand-500);
  display: inline-block;
}

.divider {
  height: 1px;
  background: var(--border);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: transform 140ms ease, background 160ms ease, color 160ms ease, box-shadow 200ms ease, border-color 160ms ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand-500);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: var(--brand-600); }
[data-palette="heritage"] .btn-primary { color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-alt); }

.btn-dark {
  background: var(--fg);
  color: var(--bg-elev);
}
.btn-dark:hover { opacity: 0.9; }

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 240ms ease, border-color 200ms ease;
}
.card.hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.chip-red { background: color-mix(in oklab, var(--accent-red) 12%, transparent); color: var(--accent-red); border-color: color-mix(in oklab, var(--accent-red) 30%, transparent); }
.chip-blue { background: color-mix(in oklab, var(--brand-500) 12%, transparent); color: var(--brand-500); border-color: color-mix(in oklab, var(--brand-500) 30%, transparent); }
.chip-live { background: var(--accent-red); color: #fff; border-color: transparent; }
.chip-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ---------- Crest badge ---------- */
.crest {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.crest img {
  width: 75%;
  height: 75%;
  object-fit: contain;
}

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms ease, background-color 240ms ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 17px;
}
.brand-mark .subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--fg-muted);
  position: relative;
  transition: color 160ms ease, background 160ms ease;
}
.nav a:hover { color: var(--fg); background: var(--surface-alt); }
.nav a.active { color: var(--fg); }
.nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-500);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .header-cta .bell-btn { display: none; }
  .header-cta .cta-label { display: none; }
}
@media (max-width: 880px) {
  .nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 80px;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1100px 600px at 20% 0%, color-mix(in oklab, var(--brand-500) 14%, transparent) 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, color-mix(in oklab, var(--accent-red) 10%, transparent) 0%, transparent 60%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--fg) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--fg) 4%, transparent) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 0%, transparent 70%);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }
}

.hero h1 {
  font-size: clamp(44px, 6.4vw, 86px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.96;
  margin: 18px 0 24px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--brand-500), var(--brand-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.hero p.lead {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hero-meta .stat .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero-meta .stat .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* hero crest art */
.hero-crest-art {
  position: relative;
  aspect-ratio: 1 / 1.05;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 980px) {
  .hero-crest-art { max-width: 420px; }
}
.hero-crest-art .halo {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background:
    conic-gradient(from 160deg, var(--brand-500), var(--brand-700), var(--brand-500));
  filter: blur(40px);
  opacity: 0.35;
}
.hero-crest-art .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  animation: spin 60s linear infinite;
}
.hero-crest-art .ring.inner {
  inset: 8%;
  border: 1px solid var(--border);
  animation-direction: reverse;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.hero-crest-art .crest-big {
  position: relative;
  width: 62%;
  aspect-ratio: 526/757;
  background: #fff;
  border-radius: 28px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.hero-crest-art .crest-big img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero-crest-art .floating {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 3;
}
.hero-crest-art .floating.f1 { top: 8%; left: -2%; animation: float 6s ease-in-out infinite; }
.hero-crest-art .floating.f2 { bottom: 12%; right: -4%; animation: float 5.2s ease-in-out infinite 1.1s; }
.hero-crest-art .floating.f3 { bottom: 0; left: 6%; animation: float 7s ease-in-out infinite 0.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* alt hero: photo */
.hero.photo .hero-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 30%, transparent), var(--bg) 92%),
    linear-gradient(110deg, color-mix(in oklab, var(--brand-900) 90%, transparent), color-mix(in oklab, var(--brand-700) 60%, transparent)),
    /* placeholder pitch pattern */
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--brand-800) 80%, #000 20%) 0 80px, color-mix(in oklab, var(--brand-800) 70%, #fff 6%) 80px 160px);
  background-blend-mode: normal, multiply, normal;
}

/* ---------- Sections ---------- */
section.s {
  padding: 100px 0;
}
section.s.tight { padding: 70px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 720px;
}
.section-head .head-actions {
  display: flex;
  gap: 8px;
}

/* ---------- Match card (próximo partido) ---------- */
.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.match-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 50% -10%, color-mix(in oklab, var(--brand-500) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.match-card .team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  z-index: 1;
}
.match-card .team.home { align-items: flex-end; text-align: right; flex-direction: row-reverse; }
.match-card .team.away { align-items: flex-start; text-align: left; flex-direction: row; }
.match-card .team .crest {
  width: 78px;
  height: 78px;
  border-radius: 18px;
}
.match-card .team .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
}
.match-card .team .sub {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.match-card .vs {
  text-align: center;
  z-index: 1;
}
.match-card .vs .date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.02em;
}
.match-card .vs .month {
  font-size: 12px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.match-card .vs .time {
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-muted);
}
.match-card .countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
.match-card .countdown .unit {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  min-width: 54px;
}
.match-card .countdown .unit .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.match-card .countdown .unit .l {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@media (max-width: 720px) {
  .match-card { grid-template-columns: 1fr; padding: 28px 22px; }
  .match-card .team.home, .match-card .team.away { flex-direction: column; align-items: center; text-align: center; }
}

/* ---------- News ---------- */
.news-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .news-grid { grid-template-columns: 1fr; }
}
.news-secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
}
.news-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  position: relative;
  overflow: hidden;
}
.news-card .thumb .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}
.news-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.18) 0%, transparent 60%);
}
.news-card .body {
  padding: 22px 24px 24px;
}
.news-card.featured .thumb { aspect-ratio: 16/12; }
.news-card.featured .body h3 { font-size: 28px; }
.news-card h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 10px 0 8px;
}
.news-card .meta {
  font-size: 12.5px;
  color: var(--fg-muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.news-card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-soft); }
.news-card p.excerpt {
  color: var(--fg-muted);
  font-size: 14.5px;
  margin: 6px 0 0;
}

.news-card.compact {
  flex-direction: row;
  align-items: stretch;
}
.news-card.compact .thumb { width: 38%; aspect-ratio: auto; flex-shrink: 0; }
.news-card.compact .body { padding: 18px 22px; flex: 1; }
.news-card.compact h3 { font-size: 16.5px; margin-top: 6px; }

/* ---------- Titles section ---------- */
.titles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 880px) { .titles-grid { grid-template-columns: repeat(2, 1fr); } }

.title-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.title-card .ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--brand-500) 10%, transparent);
  color: var(--brand-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.title-card.gold .ico { background: color-mix(in oklab, #D4A017 14%, transparent); color: #D4A017; }
.title-card.red .ico { background: color-mix(in oklab, var(--accent-red) 12%, transparent); color: var(--accent-red); }
.title-card.green .ico { background: color-mix(in oklab, #16A66B 12%, transparent); color: #16A66B; }

.title-card .count {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.title-card .name {
  font-weight: 600;
  font-size: 15.5px;
}
.title-card .seasons {
  color: var(--fg-muted);
  font-size: 12.5px;
  letter-spacing: -0.005em;
}

/* ---------- Instalacións / banner ---------- */
.facility {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  padding: 80px 60px;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--brand-700) 92%, #000), var(--brand-500));
  color: #fff;
  isolation: isolate;
}
.facility::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 280px at 100% 100%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(380px 220px at 0% 0%, rgba(255,255,255,0.12), transparent 60%);
  z-index: -1;
}
.facility::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  bottom: -30px;
  width: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 60px, rgba(255,255,255,0.0) 60px 120px);
  border-radius: 50%;
  filter: blur(20px);
  z-index: -1;
}
.facility h2 {
  font-size: clamp(32px, 4vw, 48px);
  color: #fff;
  max-width: 640px;
  margin-bottom: 18px;
}
.facility p { color: rgba(255,255,255,0.85); max-width: 560px; font-size: 16px; }
.facility .facts {
  margin-top: 36px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.facility .facts .f .v {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
}
.facility .facts .f .l {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

/* ---------- Timeline (Historia) ---------- */
.timeline {
  position: relative;
  padding: 20px 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-500), transparent);
}
.tl-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 36px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item .dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--brand-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-500);
}
.tl-item .year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-500);
}
.tl-item h4 {
  font-size: 19px;
  margin: 6px 0 8px;
}
.tl-item p { color: var(--fg-muted); margin: 0; }

.quote-card {
  padding: 28px 32px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand-500) 7%, transparent), transparent 80%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
}
.quote-card .mark {
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 0.8;
  color: var(--brand-500);
  opacity: 0.3;
  position: absolute;
  top: 16px; left: 18px;
}
.quote-card blockquote {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}
.quote-card cite {
  font-size: 13px;
  color: var(--fg-muted);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 60px 0 28px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.footer-grid a {
  display: block;
  padding: 4px 0;
  color: var(--fg);
  font-size: 14.5px;
  transition: color 160ms;
}
.footer-grid a:hover { color: var(--brand-500); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 50px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--fg-muted);
  font-size: 13px;
}

/* ---------- Login Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 30, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn 200ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: rise 240ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal .close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
}
.modal .close:hover { background: var(--surface-alt); color: var(--fg); }
.modal h3 { font-size: 24px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--fg-muted); font-size: 14px; margin-bottom: 24px; }
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.form-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-alt);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 14.5px;
  color: var(--fg);
  transition: border-color 160ms, background 160ms;
}
.form-field input:focus {
  outline: 0;
  border-color: var(--brand-500);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand-500) 18%, transparent);
}
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0 20px;
  font-size: 13px;
  color: var(--fg-muted);
}
.form-row a { color: var(--brand-500); font-weight: 600; }
.modal .btn { width: 100%; padding: 14px; }
.modal-aux {
  margin-top: 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--fg-muted);
}
.modal-aux a { color: var(--brand-500); font-weight: 600; }

/* ---------- Utilities ---------- */
.fade-in { animation: fade 280ms ease both; }
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* History page */
.history-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
@media (max-width: 880px) { .history-cols { grid-template-columns: 1fr; } }

/* News page */
.news-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .news-listing-grid { grid-template-columns: 1fr; } }
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.filter-bar button {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 160ms;
}
.filter-bar button.active {
  background: var(--fg);
  color: var(--bg-elev);
  border-color: var(--fg);
}
.filter-bar button:not(.active):hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

/* Page header */
.page-head {
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand-500) 8%, transparent), transparent);
}
.page-head h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 16px 0 16px;
}
.page-head p {
  color: var(--fg-muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0;
}
