/* ===== Club Deportivo Linares — sistema visual ===== */
:root {
  --red: #c8202a;          /* rojo carmesí del club — vivo */
  --red-deep: #8a1820;     /* rojo oscuro para hover/sombras */
  --red-ink: #1a1614;      /* tinta negra para fondos topbar/footer/palmarés */
  --cream: #fdf6f3;        /* blanco hueso con tinte rojizo */
  --paper: #ffffff;        /* fondo principal — blanco puro */
  --ink: #4a0a10;          /* tinta para texto sobre blanco */
  --ink-soft: #8a4040;     /* texto secundario */
  --rule: #f0d9d9;         /* líneas en rosado pálido */
  --gold: #a8884a;         /* dorado apagado */

  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* Type system */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 500;
}
.eyebrow.muted { color: var(--ink-soft); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--red);
}

.h-section {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  font-weight: 500;
}

.h-card {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 500;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 400;
  font-style: italic;
}

.body { font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.body p + p { margin-top: 1em; }

.small {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Layout */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-thick { height: 2px; background: var(--red); border: 0; margin: 0; }

/* ===== Top bar ===== */
.topbar {
  background: var(--red-ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; padding-bottom: 10px;
}
.topbar .dot { color: var(--red); margin: 0 10px; }

/* ===== Header ===== */
.header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.header .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 18px; padding-bottom: 18px;
  gap: 24px;
}
@media (max-width: 760px) {
  .header .wrap {
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
    padding-top: 14px; padding-bottom: 14px;
  }
  .nav-left, .nav-right {
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px !important;
  }
  .brandmark { order: -1; }
}
.nav-left, .nav-right {
  display: flex; gap: 32px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-right { justify-content: flex-end; }
.nav-left a, .nav-right a {
  text-decoration: none; color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav-left a:hover, .nav-right a:hover { border-bottom-color: var(--red); color: var(--red); }

.brandmark {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--ink);
}
.brandmark .name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
}
.brandmark .sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 4px;
}

/* ===== Hero ===== */
.hero {
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  padding-top: clamp(30px, 4.5vw, 60px);
  padding-bottom: clamp(40px, 6vw, 80px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-meta {
  display: flex; gap: 32px;
  margin-bottom: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-meta .v { color: var(--red); margin-right: 6px; }

.hero-title em { font-style: italic; color: var(--red); font-weight: 400; }

.hero-quote {
  border-left: 2px solid var(--red);
  padding-left: 24px;
  margin-top: 40px;
}
.hero-quote .lead { color: var(--ink); }
.hero-quote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--ink-soft);
}

.hero-crest {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px;
}
.hero-crest svg { width: 260px; height: auto; }
.hero-crest.hero-crest-mobile { display: none; }

.hero-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.hero-strip > div {
  padding: 22px 24px;
  border-right: 1px solid var(--rule);
}
.hero-strip > div:last-child { border-right: 0; }
.hero-strip .num {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
  color: var(--ink);
}
.hero-strip .num em { color: var(--red); font-style: normal; }
.hero-strip .lab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}
@media (max-width: 760px) {
  .hero-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-strip > div { padding: 16px 14px; }
  .hero-strip > div:nth-child(2) { border-right: 0; }
  .hero-strip > div:nth-child(1), .hero-strip > div:nth-child(2) { border-bottom: 1px solid var(--rule); }
  .hero-strip .num { font-size: 32px; }
  .hero-strip .lab { font-size: 9px; }
}

/* ===== Section frame ===== */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.dark {
  background: var(--red-ink);
  color: var(--cream);
}
.section.dark h1, .section.dark h2, .section.dark h3 { color: var(--cream); }
.section.dark .body, .section.dark .lead { color: rgba(245, 239, 230, 0.78); }
.section.dark .rule { background: rgba(245, 239, 230, 0.18); }
.section.dark .small { color: rgba(245, 239, 230, 0.6); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: baseline;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(40px, 6vw, 64px);
}
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; }
}
.section-head .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.section-head .lead { margin-top: 16px; }

/* ===== Historia / timeline ===== */
.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
}
@media (max-width: 900px) { .timeline { grid-template-columns: 1fr; } }

.timeline-prose .body p {
  font-size: 17px; line-height: 1.7; color: var(--ink-soft);
}
@media (max-width: 760px) {
  .timeline-prose .body p { font-size: 15px; }
  .timeline-prose .body p:first-of-type::first-letter { font-size: 4em; }
}
.timeline-prose .body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 5em;
  float: left;
  line-height: 0.85;
  margin: 0.05em 0.1em 0 0;
  color: var(--red);
  font-weight: 500;
}

.timeline-marks { position: relative; }
.timeline-marks::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--rule);
}
.tl-item {
  position: relative;
  padding: 18px 0 18px 36px;
  border-bottom: 1px solid var(--rule);
}
.tl-item:last-child { border-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -4px; top: 26px;
  width: 9px; height: 9px;
  background: var(--red);
  border-radius: 50%;
}
.tl-year {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.tl-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 6px;
  margin-bottom: 6px;
  color: var(--red);
  text-transform: uppercase;
}
.tl-body { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

/* ===== Imagen placeholder editorial ===== */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      rgba(168,35,44,0.06) 0 12px,
      transparent 12px 24px),
    var(--cream);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  padding: 24px;
  aspect-ratio: 4 / 5;
}
.placeholder.wide { aspect-ratio: 16 / 9; }
.placeholder .pl-tag {
  border: 1px solid currentColor;
  padding: 4px 8px;
  margin-bottom: 12px;
  color: var(--red);
  border-color: var(--red);
}

/* ===== Honors / palmarés ===== */
.honors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(245,239,230,0.18);
}
.honor {
  padding: 32px 28px;
  border-right: 1px solid rgba(245,239,230,0.18);
  border-bottom: 1px solid rgba(245,239,230,0.18);
}
.honor:nth-child(3n) { border-right: 0; }
.honors-grid > .honor:nth-last-child(-n+3) { border-bottom: 0; }
@media (max-width: 800px) {
  .honors-grid { grid-template-columns: 1fr; }
  .honor { border-right: 0; border-bottom: 1px solid rgba(245,239,230,0.18); }
  .honors-grid > .honor:last-child { border-bottom: 0; }
  .honors-grid > .honor:nth-last-child(-n+3) { border-bottom: 1px solid rgba(245,239,230,0.18); }
}
.honor .yr {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  font-weight: 500;
  color: var(--cream);
}
.honor .yr em { color: var(--red); font-style: normal; }
.honor .ti {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  margin-top: 12px;
  color: var(--cream);
  font-style: italic;
}
.honor .lo {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 14px;
  color: rgba(245,239,230,0.6);
}

/* ===== Roster ===== */
.roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 900px) { .roster { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .roster { grid-template-columns: 1fr; } }
.player {
  background: var(--paper);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.player .ph {
  aspect-ratio: 3 / 4;
  background:
    repeating-linear-gradient(135deg,
      rgba(168,35,44,0.05) 0 10px,
      transparent 10px 20px),
    linear-gradient(180deg, var(--cream), #ece4d4);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 16px;
  position: relative;
}
.player .ph .num {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 0.85;
  font-weight: 500;
  color: var(--red);
}
.player .ph .ph-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.player .meta {
  padding: 16px 18px 20px;
}
.player .pname {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--ink);
}
.player .ppos {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 4px;
}
.player .pmeta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

/* ===== Fixture ===== */
.fixture {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
}
.fixture thead th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--red);
  font-weight: 500;
}
.fixture tbody td {
  padding: 22px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
  font-size: 15px;
}
.fixture tbody tr:hover { background: rgba(168,35,44,0.04); }
.fixture .date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.fixture .date .d { font-size: 22px; font-family: var(--serif); display: block; line-height: 1; color: var(--red); font-weight: 500; }
.fixture .matchup {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}
.fixture .matchup .vs { color: var(--rule); font-style: italic; padding: 0 10px; }
.fixture .matchup .home { color: var(--red); }
.fixture .venue {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.fixture .res {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.fixture .res .w { color: var(--red); }
.fixture .res .l { color: var(--ink-soft); }
.fixture .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.fixture .tag.upcoming { border-color: var(--red); color: var(--red); }
.fixture .tag.win { border-color: var(--red); color: var(--red); background: rgba(168,35,44,0.06); }

/* ===== CTA / membership ===== */
.cta {
  background: var(--cream);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 800px) { .cta-grid { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--red);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--red-deep); }
.btn .arr { font-family: var(--mono); font-weight: 400; }
.btn-outline {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: var(--cream); }

/* ===== Footer ===== */
.footer {
  background: var(--red-ink);
  color: var(--cream);
  padding: 64px 0 32px;
}
.footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .footer .wrap { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,239,230,0.6);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 14px; }
.footer a { text-decoration: none; color: var(--cream); opacity: 0.85; }
.footer a:hover { opacity: 1; color: var(--red); }
.footer-bottom {
  border-top: 1px solid rgba(245,239,230,0.15);
  margin-top: 48px;
  padding-top: 20px;
  display: flex; justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,239,230,0.5);
}
.footer .crest-mini { width: 72px; margin-bottom: 16px; }
.footer .name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.footer .sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.footer .body { color: rgba(245,239,230,0.65); font-size: 13px; }

/* ===== Misc ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }
.value {
  padding: 28px 28px 28px 0;
  border-right: 1px solid var(--rule);
}
.value:last-child { border-right: 0; padding-right: 0; }
@media (max-width: 800px) {
  .value { border-right: 0; border-bottom: 1px solid var(--rule); padding: 24px 0; }
  .value:last-child { border-bottom: 0; }
}
.value .roman {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--red);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.value h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 12px;
}
.value p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
@media (max-width: 800px) {
  .value:not(:first-child) { padding-left: 0; }
}

/* Form inputs */
.form-input:focus { border-bottom-color: var(--red) !important; }

/* Sedes responsive */
@media (max-width: 800px) {
  .sedes-grid-formal { grid-template-columns: 1fr !important; }
  .decimo-banner { grid-template-columns: 1fr !important; gap: 24px !important; padding: 32px !important; text-align: center; }
  .podium-stats { grid-template-columns: 1fr !important; }
  .podium-stats > div { border-right: 0 !important; border-bottom: 1px solid rgba(245,239,230,0.18); }
  .podium-stats > div:last-child { border-bottom: 0 !important; }
}

@media (max-width: 760px) {
  /* Topbar: solo "10× Campeón Liga A1" en una línea */
  .topbar { font-size: 9px; }
  .topbar .wrap {
    justify-content: center;
    padding-top: 8px; padding-bottom: 8px;
    gap: 0;
  }
  .topbar .wrap > div:first-child { display: none; }
  .topbar .wrap > div:last-child {
    text-align: center;
    letter-spacing: 0.18em;
  }

  /* Header: más compacto */
  .header .wrap { padding-top: 16px !important; padding-bottom: 14px !important; gap: 12px !important; }
  .nav-left, .nav-right {
    gap: 18px !important;
    font-size: 12px !important;
    letter-spacing: 0.04em;
  }
  .brandmark .name { font-size: 22px !important; }
  .brandmark .sub { font-size: 9px !important; letter-spacing: 0.22em !important; }

  /* Hero-meta: solo "Est. 2008" en mobile */
  .hero-meta {
    flex-wrap: wrap;
    gap: 10px !important;
    margin-bottom: 16px !important;
    font-size: 9px !important;
    letter-spacing: 0.16em !important;
    justify-content: center;
    text-align: center;
  }
  .hero-meta-extra { display: none !important; }

  /* Escudo: mostrar arriba en mobile, ocultar el lateral */
  .hero-crest-mobile { display: flex !important; margin-bottom: 8px; }
  .hero-crest-desktop { display: none !important; }
  .hero-crest-mobile svg,
  .hero-crest-mobile img { width: 140px !important; }

  /* Cita en hero más compacta */
  .hero-quote { margin-top: 28px !important; padding-left: 16px !important; }
  .hero-quote .lead { font-size: 15px !important; line-height: 1.5 !important; }
  .hero-quote cite { font-size: 10px !important; letter-spacing: 0.14em !important; }

  /* Botones full width en mobile */
  .hero .btn { width: 100%; justify-content: center; }
}

/* Mobile global tweaks */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .display { font-size: clamp(40px, 12vw, 64px); }
  .h-section { font-size: clamp(28px, 7vw, 40px); }
  .lead { font-size: 17px; }
  .section-head { gap: 16px; padding-bottom: 24px; margin-bottom: 32px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
}

/* Prevent horizontal scroll */
html, body { overflow-x: hidden; }
