/* ===== Base ===== */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #ede6e1;
  --color-taupe: #b59a87;
  --color-taupe-dark: #8f7462;
  --color-text: #1b1b1b;
  --color-muted: #5f5853;
  --color-border: #ddd3cc;
  --font-sans: "Montserrat", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --container: 1120px;
  --space: 1.25rem;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

.narrow {
  max-width: 760px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: #fff;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ===== Header / nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-taupe);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: var(--header-height);
  padding: 0 var(--space);
}

.brand {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: #fff;
}

.site-nav {
  display: none;
  width: 100%;
}

.site-nav.is-open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--space);
}

.site-nav a {
  display: block;
  padding: 0.6rem 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus {
  opacity: 0.75;
}

/* ===== Shared UI ===== */
.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.link-arrow::before {
  content: "\2192";
  font-size: 1.2rem;
  font-weight: 400;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border: 0;
  background: var(--color-taupe-dark);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus {
  background: var(--color-text);
}

.button:disabled {
  background: #b9b2ad;
  cursor: not-allowed;
}

.button-light {
  background: #fff;
  color: var(--color-taupe-dark);
}

.button-light:hover,
.button-light:focus {
  background: var(--color-bg-soft);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 78vh;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--color-text);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--space) 8vh;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

/* ===== Tiles ===== */
.tiles {
  padding: 2.5rem 0;
}

.tiles-band {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}

.tiles-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.4s ease;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

.tile:hover img,
.tile:focus img {
  transform: scale(1.04);
}

.tile-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tile-label .link-arrow {
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

/* ===== Sections ===== */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--color-bg-soft);
}

.section-accent {
  background: var(--color-taupe);
  color: #fff;
}

.section-title {
  font-size: 1.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-intro {
  max-width: 720px;
  margin: 0 0 2rem;
}

.lead {
  font-size: 1.2rem;
}

.source {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ===== Highlights ===== */
.stats {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: var(--space);
}

.stat {
  padding: 1.5rem;
  background: #fff;
  border-top: 4px solid var(--color-taupe);
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-taupe-dark);
}

.stat-label {
  color: var(--color-muted);
}

.medal-table-wrap {
  overflow-x: auto;
}

.medal-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  background: #fff;
}

.medal-table caption {
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  padding-bottom: 0.5rem;
}

.medal-table th,
.medal-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.medal-table th[scope="row"],
.medal-table thead th:first-child {
  text-align: left;
}

/* ===== Competitions ===== */
.events {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-border);
}

.event {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.event time {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  color: var(--color-taupe-dark);
}

.event h3 {
  margin: 0;
  font-size: 1.15rem;
}

.event h3 a {
  text-decoration: none;
}

.event h3 a:hover,
.event h3 a:focus {
  text-decoration: underline;
}

.event p {
  margin: 0;
  color: var(--color-muted);
}

/* ===== Mentoring ===== */
.mentoring-grid {
  display: grid;
  gap: var(--space);
  margin-bottom: 2.5rem;
}

.offer {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.offer h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.offer ul {
  margin: 0;
  padding-left: 1.1rem;
}

.offer li + li {
  margin-top: 0.4rem;
}

.form-wrap {
  padding: 1.75rem var(--space);
  background: #fff;
  color: var(--color-text);
}

.form-wrap h3 {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Honeypot field, invisible to users */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 700;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  font: inherit;
  background: #fff;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-taupe);
  outline-offset: 1px;
}

.checkbox-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}

.checkbox-row input {
  margin-top: 0.3rem;
}

.checkbox-row label {
  font-weight: 400;
}

.form-status {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ===== Footer ===== */
.site-footer {
  display: grid;
}

.footer-main {
  padding: 2.5rem var(--space);
  background: var(--color-bg-soft);
  font-size: 0.9rem;
}

.footer-links,
.social-links {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a,
.social-links a {
  text-decoration: none;
}

.footer-links a:hover,
.social-links a:hover,
.footer-links a:focus,
.social-links a:focus {
  text-decoration: underline;
}

.social-links a {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.credits,
.copyright {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer-panel {
  padding: 2.5rem var(--space);
  background: var(--color-taupe);
  color: #fff;
}

.footer-panel h2 {
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ===== Conoce la esgrima ===== */
.fencing-grid {
  display: grid;
  gap: var(--space);
  margin-top: 2rem;
}

.fencing-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
}

.fencing-card h3 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1rem;
  color: var(--color-taupe-dark);
}

.fencing-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.fencing-card li {
  margin: 0.4rem 0;
}

.fencing-outro {
  margin-top: 2rem;
}

/* Footer icons */
.social-icon,
.sponsor-icon {
  height: 2rem;
  width: auto;
  display: block;
}

.sponsor-icon {
  height: 2.6rem;
}

.newsletter-note {
  margin: 1.75rem 0 0.75rem;
  font-size: 0.9rem;
}

/* ===== Tablet and up ===== */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .header-inner {
    padding: 0 2rem;
  }

  .site-nav {
    display: block;
    width: auto;
  }

  .site-nav ul {
    display: flex;
    gap: 1.75rem;
    padding: 0;
  }

  .tiles-band {
    background: var(--color-taupe);
    padding: 0 3rem;
    margin-top: 2.5rem;
  }

  .tiles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: -2rem -4.5rem;
  }

  .tiles {
    padding: 2rem 0 5rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .event {
    grid-template-columns: 200px 1fr;
    align-items: baseline;
  }

  .mentoring-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mentoring-form-row {
    grid-template-columns: 2fr 3fr;
    align-items: start;
  }

  .mentoring-img {
    max-width: none;
  }

  .form-wrap {
    padding: 2.5rem;
  }

  /* Honeypot field, invisible to users */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
  }

  .form-row-full {
    grid-column: 1 / -1;
  }

  .site-footer {
    grid-template-columns: 3fr 2fr;
  }

  .footer-main,
  .footer-panel {
    padding: 3rem;
  }

  .section {
    padding: 5rem 0;
  }

  .fencing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1100px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hero motto */
.hero-motto {
  margin: -0.5rem 0 1.5rem;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 1.15rem;
}

.tile .tile-img-alt {
  object-position: center 30%;
}

/* Quotes */
.section-quotes {
  background: var(--color-taupe-dark);
  color: #fff;
}

.quotes {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quotes blockquote {
  margin: 0;
}

.quotes blockquote p {
  margin: 0;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.45;
}

.quote-source {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Ranking chart */
.ranking {
  margin-top: 3rem;
}

.ranking h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rank-figure {
  margin: 1.5rem 0 1rem;
  padding: 1rem;
  background: #fff;
}

.rank-chart {
  display: block;
  width: 100%;
  height: auto;
}

.rank-chart .grid {
  stroke: var(--color-bg-soft);
  stroke-width: 1;
}

.rank-chart .axis {
  font-size: 11px;
  fill: #666;
}

.rank-chart .line {
  fill: none;
  stroke: var(--color-taupe-dark);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.rank-chart .dot {
  fill: var(--color-taupe-dark);
  stroke: #fff;
  stroke-width: 1.5;
}

.rank-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #666;
}

.rank-details summary {
  cursor: pointer;
  font-weight: 700;
}

.rank-table {
  width: 100%;
  max-width: 32rem;
  margin-top: 1rem;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

.rank-table caption {
  text-align: left;
  padding-bottom: 0.5rem;
  font-weight: 700;
}

.rank-table th,
.rank-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--color-bg-soft);
  text-align: left;
}

@media (min-width: 768px) {
  .quotes {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}


.rank-chart .rank-num {
  font-size: 9.5px;
  font-weight: 600;
  fill: var(--color-taupe-dark);
}

.mentoring-form-row {
  display: grid;
  gap: var(--space);
}

.mentoring-img {
  display: block;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
}
