/* La Casa de Padel — base styles + 4 theme variants (A default) */

:root {
  --bg: #faf7f2;
  --bg-alt: #f1ece3;
  --ink: #1c1611;
  --ink-soft: #5c5348;
  --accent: #c4502a;
  --accent-ink: #ffffff;
  --line: #e2dacd;
  --card: #ffffff;
  --radius: 4px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: none;
  --card-border: 1px solid var(--line);
}

/* Theme B — La Casa Verde */
:root[data-theme="b"] {
  --bg: #f4f1e8;
  --bg-alt: #e9e5d8;
  --ink: #14201a;
  --ink-soft: #4d5c53;
  --accent: #1e5c3f;
  --accent-ink: #f4f1e8;
  --line: #d8d3c2;
  --card: #fbf9f3;
}

/* Theme C — Ocean Glass */
:root[data-theme="c"] {
  --bg: #edf2f7;
  --bg-alt: #e2eaf2;
  --ink: #12212e;
  --ink-soft: #4c6274;
  --accent: #0a67a3;
  --accent-ink: #ffffff;
  --line: #d3dfe9;
  --card: rgba(255, 255, 255, 0.72);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(18, 33, 46, 0.08);
  --card-border: 1px solid rgba(255, 255, 255, 0.85);
}

/* Theme D — Match Point Mono */
:root[data-theme="d"] {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --ink: #0a0a0a;
  --ink-soft: #5a5a5a;
  --accent: #0a0a0a;
  --accent-ink: #f5e000;
  --line: #0a0a0a;
  --card: #ffffff;
  --radius: 0;
  --card-border: 2px solid #0a0a0a;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="c"] body {
  background: linear-gradient(160deg, #f2f6fa 0%, #e6eef6 45%, #dfeaf4 100%);
  min-height: 100vh;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
:root[data-theme="c"] .site-header {
  background: rgba(240, 245, 250, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}
:root[data-theme="d"] .site-header { border-bottom: 2px solid var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordmark svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
:root[data-theme="d"] .wordmark svg { color: #0a0a0a; }

.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
:root[data-theme="d"] .site-nav a:hover,
:root[data-theme="d"] .site-nav a[aria-current="page"] {
  color: #0a0a0a; background: var(--accent-ink); padding: 2px 6px; margin: -2px -6px;
}

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; border-bottom: 1px solid var(--line); }
:root[data-theme="d"] .hero { border-bottom: 2px solid var(--line); }

.kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.kicker::before { content: ""; width: 34px; height: 2px; background: var(--accent); }
:root[data-theme="d"] .kicker { color: #0a0a0a; }
:root[data-theme="d"] .kicker::before { background: var(--accent-ink); height: 8px; }

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(42px, 7.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 15ch;
}
h1 .serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
}
:root[data-theme="d"] h1 .serif { color: #0a0a0a; background: var(--accent-ink); padding: 0 8px; }

.hero-sub {
  margin-top: 28px;
  max-width: 56ch;
  font-size: 19px;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
:root[data-theme="d"] .section + .section { border-top: 2px solid var(--line); }

h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  margin: 34px 0 10px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.ghost-num {
  font-family: var(--font-mono);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  line-height: 1;
  user-select: none;
}
:root[data-theme="d"] .ghost-num { -webkit-text-stroke: 1px #c9c9c9; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--card);
  border: var(--card-border);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}
.card:hover { transform: translateY(-3px); }
.card svg.card-icon { width: 30px; height: 30px; color: var(--accent); }
:root[data-theme="d"] .card svg.card-icon { color: #0a0a0a; }
.card h3 { margin: 0; font-size: 18px; text-transform: uppercase; letter-spacing: 0.01em; }
.card p { color: var(--ink-soft); font-size: 15px; }
.card .card-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: auto;
}
:root[data-theme="d"] .card .card-tag { color: #0a0a0a; background: var(--accent-ink); align-self: flex-start; padding: 2px 6px; }

/* ---------- Editor strip ---------- */
.editor-strip {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border: var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
@media (max-width: 640px) { .editor-strip { grid-template-columns: 1fr; } }

.monogram {
  width: 96px; height: 96px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 900; font-size: 30px; letter-spacing: 0.02em;
}
.editor-strip .name { font-weight: 900; font-size: 20px; text-transform: uppercase; }
.editor-strip .role { color: var(--ink-soft); font-size: 15px; margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px;
  border-radius: var(--radius);
}
.btn svg { width: 15px; height: 15px; }
:root[data-theme="d"] .btn { background: #0a0a0a; color: var(--accent-ink); }

/* ---------- Article ---------- */
.article-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
:root[data-theme="d"] .article-head { border-bottom: 2px solid var(--line); }
.article-head h1 { font-size: clamp(34px, 5.4vw, 58px); max-width: 20ch; }

.byline {
  display: flex; align-items: center; gap: 12px; margin-top: 26px;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft);
}
.byline a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--accent); font-weight: 700; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-soft); }

.article-body { padding: 48px 0 72px; }
.article-body p { margin: 0 0 20px; max-width: 68ch; }
.article-body h2 { font-size: clamp(22px, 3vw, 30px); margin: 44px 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 20px 22px; max-width: 64ch; }
.article-body li { margin-bottom: 8px; }
.article-body strong { font-weight: 700; }

.factbox {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
  max-width: 68ch;
}
:root[data-theme="d"] .factbox { border: 2px solid #0a0a0a; border-left: 10px solid #0a0a0a; background: #fffef0; }
.factbox .factbox-title {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
:root[data-theme="d"] .factbox .factbox-title { color: #0a0a0a; }

.club-list { list-style: none; margin: 0 0 24px !important; max-width: 100%; }
.club-list li {
  display: grid; grid-template-columns: 26px 1fr; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line); margin: 0;
}
.club-list svg { width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }
:root[data-theme="d"] .club-list svg { color: #0a0a0a; }
.club-list .club-name { font-weight: 900; }
.club-list .club-meta { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Profile page ---------- */
.profile-hero { padding: 80px 0 56px; border-bottom: 1px solid var(--line); }
:root[data-theme="d"] .profile-hero { border-bottom: 2px solid var(--line); }
.profile-grid {
  display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start;
}
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

.profile-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: var(--card-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--ink-soft);
  overflow: hidden;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo svg { width: 64px; height: 64px; color: var(--accent); opacity: 0.5; }
.profile-photo .ph-note { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }

.profile-name { font-size: clamp(36px, 5vw, 58px); }
.profile-role {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(20px, 2.6vw, 27px); color: var(--accent); margin-top: 10px;
}
:root[data-theme="d"] .profile-role { color: #0a0a0a; background: var(--accent-ink); display: inline-block; padding: 0 8px; }

.profile-loc {
  display: flex; align-items: center; gap: 8px; margin-top: 18px;
  font-family: var(--font-mono); font-size: 13.5px; color: var(--ink-soft);
}
.profile-loc svg { width: 16px; height: 16px; color: var(--accent); }

.profile-links { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

.facts { list-style: none; margin: 0 !important; }
.facts li {
  display: grid; grid-template-columns: 170px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
@media (max-width: 560px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }
.facts .k {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); padding-top: 3px;
}
.facts .v { font-weight: 400; }

.faq details {
  border-bottom: 1px solid var(--line); padding: 4px 0;
}
.faq summary {
  cursor: pointer; font-weight: 900; padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 16px; height: 16px; color: var(--accent); flex: none; transition: transform 0.2s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; max-width: 66ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; margin-top: 40px; }
:root[data-theme="d"] .site-footer { border-top: 2px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer p { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft);
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.04em;
}
.site-footer nav a:hover { color: var(--accent); }

/* ---------- Court diagram ---------- */
.court-figure { margin: 32px 0; max-width: 560px; }
.court-figure svg { width: 100%; height: auto; color: var(--accent); }
:root[data-theme="d"] .court-figure svg { color: #0a0a0a; }
.court-figure figcaption {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); margin-top: 10px;
}

/* ---------- Breadcrumb ---------- */
.crumbs {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 18px 0 0;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span.sep { margin: 0 8px; color: var(--line); }

/* ---------- Photos ---------- */
.hero-photo { margin-top: 52px; }
.hero-photo img, .article-photo img {
  width: 100%; height: auto; max-height: 460px; object-fit: cover;
  border-radius: var(--radius); display: block;
}
.article-photo { margin: 0 0 36px; }
.hero-photo figcaption, .article-photo figcaption {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 10px;
}
:root[data-theme="d"] .hero-photo img,
:root[data-theme="d"] .article-photo img {
  filter: grayscale(1) contrast(1.06);
  border: 2px solid #0a0a0a;
}
