/* The Fencing Club theme. Mobile first, no external fonts or CDNs.
   Club colours come from the crest: deep maroon and dark green. */

:root {
  --tfc-ink: #17130f;
  --tfc-ink-2: #241d17;
  --tfc-paper: #faf8f4;
  --tfc-card: #ffffff;
  --tfc-fg: #1c1a17;
  --tfc-muted: #57503f;
  --tfc-line: #e2dcd0;
  --tfc-maroon: #7a1e30;
  --tfc-maroon-deep: #4c1220;
  --tfc-green: #1b4d2e;
  --tfc-green-tint: #e9f0ea;
  --tfc-dark-fg: #f2ede3;
  --tfc-dark-muted: #c9c0ae;
  --tfc-max: 70rem;
  --tfc-radius: 0.9rem;
  --tfc-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { font-size: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--tfc-font);
  line-height: 1.65;
  color: var(--tfc-fg);
  background: var(--tfc-paper);
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
}
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1rem; }
ul { padding-left: 1.2rem; }

a { color: var(--tfc-green); text-underline-offset: 0.15em; }
a:hover { color: var(--tfc-maroon); }

:focus-visible {
  outline: 3px solid var(--tfc-maroon);
  outline-offset: 3px;
  border-radius: 2px;
}
.tfc-header :focus-visible,
.tfc-hero :focus-visible,
.tfc-pagehead :focus-visible,
.tfc-cta :focus-visible,
.tfc-footer :focus-visible {
  outline-color: #ffffff;
}

.tfc-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  color: #000;
  padding: 0.6rem 1rem;
  z-index: 200;
}
.tfc-skip:focus { left: 0.5rem; top: 0.5rem; }

.tfc-wrap { width: min(100% - 2.5rem, var(--tfc-max)); margin-inline: auto; }
.tfc-note { color: var(--tfc-muted); font-size: 0.95rem; }
.tfc-quote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--tfc-green);
  border-left: 4px solid var(--tfc-maroon);
  padding-left: 1rem;
}

/* Buttons */
.tfc-button {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background: var(--tfc-maroon);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid var(--tfc-maroon);
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.tfc-button:hover { background: var(--tfc-maroon-deep); border-color: var(--tfc-maroon-deep); color: #fff; }
.tfc-button--ghost {
  background: transparent;
  border-color: currentColor;
  color: #fff;
}
.tfc-button--ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.tfc-button--ghost-dark {
  background: transparent;
  border-color: var(--tfc-green);
  color: var(--tfc-green);
}
.tfc-button--ghost-dark:hover { background: var(--tfc-green-tint); color: var(--tfc-green); }
.tfc-button--small { padding: 0.45rem 1rem; font-size: 0.95rem; }
.tfc-button--nav { margin-left: 0.75rem; padding: 0.5rem 1.1rem; }

/* Header */
.tfc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(23, 19, 15, 0.97);
  color: var(--tfc-dark-fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tfc-header__inner {
  width: min(100% - 2.5rem, var(--tfc-max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0;
}
.tfc-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}
/* Crest badge: cream plate and maroon ring so the transparent crest
   reads on dark grounds. Header crest is 20% wider (132px to 158px).
   Vertical padding is absorbed so the header grows by at most 8px. */
.tfc-logo__img,
.tfc-footer__crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: content-box;
  background: #f5efe6;
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--tfc-maroon), 0 2px 10px rgba(0, 0, 0, 0.35);
  line-height: 0;
}
.tfc-logo__img {
  margin-block: -6px;
}
.tfc-logo__img img {
  width: 158px;
  height: auto;
  display: block;
  filter: none;
}

.tfc-logo__word { display: flex; flex-direction: column; line-height: 1.2; }
.tfc-logo__word strong { font-size: 1.02rem; }
.tfc-logo__word small { color: var(--tfc-dark-muted); font-size: 0.75rem; }

.tfc-nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font: inherit;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.6rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}
.tfc-nav-toggle__bar {
  width: 1.25rem;
  height: 2px;
  background: currentColor;
}
.tfc-nav-toggle__label { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

.tfc-nav { display: none; width: 100%; padding: 0.75rem 0 1rem; }
.tfc-nav.is-open { display: block; }
.tfc-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.tfc-nav a {
  display: block;
  color: var(--tfc-dark-fg);
  text-decoration: none;
  padding: 0.55rem 0.25rem;
  border-radius: 0.4rem;
}
.tfc-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.tfc-nav .tfc-button--nav { margin: 0.75rem 0 0; color: #fff; }
.tfc-nav .tfc-button--nav:hover { background: var(--tfc-maroon-deep); }

@media (min-width: 62rem) {
  .tfc-nav-toggle { display: none; }
  .tfc-nav { display: flex; width: auto; align-items: center; padding: 0; }
  .tfc-nav__list { flex-direction: row; flex-wrap: wrap; gap: 0 0.25rem; }
  .tfc-nav a { padding: 0.45rem 0.6rem; font-size: 0.95rem; }
  .tfc-nav .tfc-button--nav { margin: 0 0 0 0.6rem; }
}

/* Hero */
.tfc-hero {
  position: relative;
  min-height: 78svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--tfc-ink);
  color: #fff;
}
.tfc-hero__media,
.tfc-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.tfc-hero__media img { object-fit: cover; }
.tfc-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 19, 15, 0.35) 0%, rgba(23, 19, 15, 0.78) 78%, rgba(23, 19, 15, 0.92) 100%);
}
.tfc-hero__inner {
  position: relative;
  width: min(100% - 2.5rem, var(--tfc-max));
  margin-inline: auto;
  padding: 4.5rem 0 4rem;
}
.tfc-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: #ffd9c8;
  margin-bottom: 0.9rem;
}
.tfc-hero h1 {
  font-size: clamp(2rem, 1.3rem + 3.6vw, 3.6rem);
  max-width: 22ch;
  margin-bottom: 1rem;
}
.tfc-hero__lead { max-width: 38rem; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: #f4efe6; }
.tfc-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }

/* Inner page header */
.tfc-pagehead {
  background:
    radial-gradient(60rem 20rem at 110% -10%, rgba(122, 30, 48, 0.5), transparent 60%),
    radial-gradient(50rem 18rem at -10% 120%, rgba(27, 77, 46, 0.45), transparent 60%),
    var(--tfc-ink);
  color: var(--tfc-dark-fg);
  padding: 2.75rem 0 2.5rem;
}
.tfc-pagehead__kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: #ffd9c8;
  margin-bottom: 0.6rem;
}
.tfc-pagehead__title { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem); color: #fff; }
.tfc-pagehead__lead { max-width: 44rem; color: var(--tfc-dark-muted); font-size: 1.08rem; margin-bottom: 0; }

/* Breadcrumbs */
.tfc-crumbs { margin-bottom: 1rem; }
.tfc-crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  font-size: 0.9rem;
}
.tfc-crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--tfc-dark-muted); }
.tfc-crumbs a { color: #ffd9c8; }

/* Sections */
.tfc-section { padding: clamp(2.75rem, 2rem + 3vw, 4.5rem) 0; }
.tfc-section--alt { background: #f1ede4; }
.tfc-split { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 60rem) {
  .tfc-split { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* Cards */
.tfc-cards {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
@media (min-width: 46rem) {
  .tfc-cards { grid-template-columns: repeat(3, 1fr); }
}
.tfc-card {
  background: var(--tfc-card);
  border: 1px solid var(--tfc-line);
  border-top: 4px solid var(--tfc-maroon);
  border-radius: var(--tfc-radius);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: 0 1px 2px rgba(23, 19, 15, 0.06);
}
.tfc-card h2, .tfc-card h3 { margin-bottom: 0.6rem; }
.tfc-card__more { margin-bottom: 0; font-weight: 600; }
.tfc-card__more a::after { content: " \2192"; }

/* Chips */
.tfc-chips {
  list-style: none;
  margin: 1rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tfc-chips li {
  background: var(--tfc-green-tint);
  color: var(--tfc-green);
  border: 1px solid #cfdccf;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Photos: content photos always at natural aspect ratio */
.tfc-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--tfc-radius);
  border: 1px solid var(--tfc-line);
}

/* Tables */
.tfc-table-wrap { margin: 1.25rem 0 1.75rem; overflow-x: auto; }
.tfc-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tfc-card);
  border: 1px solid var(--tfc-line);
  border-radius: var(--tfc-radius);
  overflow: hidden;
}
.tfc-table caption {
  text-align: left;
  font-size: 0.9rem;
  color: var(--tfc-muted);
  padding: 0 0 0.5rem;
}
.tfc-table th,
.tfc-table td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--tfc-line);
}
.tfc-table tbody tr:last-child th,
.tfc-table tbody tr:last-child td { border-bottom: 0; }
.tfc-table tbody tr:nth-child(even) { background: #f6f2e9; }
.tfc-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tfc-table-note { color: var(--tfc-muted); font-size: 0.9rem; margin-top: 0.5rem; }

/* Contact details */
.tfc-contact { margin: 0 0 1rem; }
.tfc-contact div { margin-bottom: 0.9rem; }
.tfc-contact dt { font-weight: 700; }
.tfc-contact dd { margin: 0.15rem 0 0; }

/* CTA band */
.tfc-cta {
  background: linear-gradient(135deg, var(--tfc-maroon-deep), var(--tfc-maroon));
  color: #fff;
  padding: clamp(2.75rem, 2rem + 3vw, 4rem) 0;
  text-align: center;
}
.tfc-cta h2 { color: #fff; }
.tfc-cta p { max-width: 44rem; margin-inline: auto; }
.tfc-cta__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.25rem; }
.tfc-cta__actions .tfc-button { background: #fff; border-color: #fff; color: var(--tfc-maroon-deep); }
.tfc-cta__actions .tfc-button:hover { background: #f0e9dd; border-color: #f0e9dd; color: var(--tfc-maroon-deep); }
.tfc-cta__actions .tfc-button--ghost { background: transparent; border-color: #fff; color: #fff; }
.tfc-cta__actions .tfc-button--ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* Generic content */
.tfc-content { max-width: 46rem; }
.tfc-content article + article { margin-top: 2.5rem; }

/* Footer */
.tfc-footer {
  background: var(--tfc-ink);
  color: var(--tfc-dark-fg);
  padding: 3rem 0 2rem;
}
.tfc-footer__inner { width: min(100% - 2.5rem, var(--tfc-max)); margin-inline: auto; }
.tfc-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 46rem) {
  .tfc-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; }
}
.tfc-footer__crest img { width: 160px; height: auto; display: block; filter: none; }
.tfc-footer__name { font-weight: 700; margin: 0.9rem 0 0.3rem; }
.tfc-footer__tagline { color: var(--tfc-dark-muted); max-width: 30rem; }
.tfc-footer__heading { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: #ffd9c8; margin-bottom: 0.8rem; }
.tfc-footer__col p { margin-bottom: 0.5rem; }
.tfc-footer__nav { list-style: none; margin: 0; padding: 0; }
.tfc-footer__nav li { margin-bottom: 0.5rem; }
.tfc-footer a { color: var(--tfc-dark-fg); }
.tfc-footer a:hover { color: #fff; }
.tfc-footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  color: var(--tfc-dark-muted);
  font-size: 0.9rem;
}

/* Reveal on scroll: only when JS is on and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .tfc-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js .tfc-reveal.is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
