/* City of Preston Triathlon Club — shared styles */

:root {
  --navy: #002b5c;
  --navy-deep: #001a38;
  --navy-mid: #0f3d72;
  --paper: #f6f4ef;
  --white: #ffffff;
  --ink: #17202e;
  --ink-soft: #4a5568;
  --accent: #dc2640;
  --accent-dark: #a30d25;
  --accent-btn: #c8102e;
  --accent-btn-hover: #a30d25;
  --line: #e2ddd1;
  --radius: 4px;
  --shadow: 0 12px 30px -14px rgba(0, 27, 58, 0.35);
  --max: 1140px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-btn);
  margin-bottom: 0.9em;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}
.section--tight { padding: 48px 0; }
.section--navy {
  background: var(--navy);
  color: rgba(255,255,255,0.92);
}
.section--navy h2, .section--navy h3 { color: #fff; }
.section--alt { background: var(--white); }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent-btn);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-btn-hover); }
.btn-outline {
  border-color: currentColor;
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.section--navy .btn-outline { color: #fff; }
.section--navy .btn-outline:hover { background: #fff; color: var(--navy); }
.btn-email { font-size: 0.82rem; padding: 12px 22px; }

/* Announcement bar */
.announce {
  background: var(--accent-btn);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}
.announce a { display: block; padding: 10px 0; }
.announce a:hover .announce-cta { text-decoration: underline; }
.announce-cta { font-weight: 600; margin-left: 6px; }
@media (max-width: 720px) {
  .announce-detail { display: none; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 72px; width: auto; }
.brand-text {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.15;
}
.brand-text small {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy);
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: rgba(0,43,92,0.08); }
.main-nav a.active { background: var(--navy); color: #fff; }
.main-nav .btn { margin-left: 8px; color: #fff; }
.main-nav .btn:hover { background: var(--accent-btn-hover); color: #fff; }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  display: flex;
  align-items: flex-end;
  min-height: 78vh;
  overflow: hidden;
}
.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,26,56,0.35) 0%, rgba(0,26,56,0.55) 55%, rgba(0,20,44,0.92) 100%);
}
.hero .container {
  position: relative;
  z-index: 2;
  padding-bottom: 64px;
  padding-top: 120px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffd7bd;
  margin-bottom: 18px;
}
.hero h1 { color: #fff; max-width: 800px; }
.hero p.lead {
  max-width: 560px;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* Page header (non-home hero, smaller) */
.page-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,27,58,0.92) 0%, rgba(0,43,92,0.75) 60%, rgba(0,43,92,0.55) 100%);
}
.page-hero .container {
  position: relative;
  z-index: 2;
  padding-top: 62px;
  padding-bottom: 62px;
}
.page-hero--plain { background: var(--navy-deep); }
.page-hero--plain::after { background: linear-gradient(120deg, rgba(0,43,92,0.55) 0%, rgba(0,43,92,0) 100%); }
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { max-width: 560px; color: rgba(255,255,255,0.88); margin: 0; }
.breadcrumb {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd7bd;
  margin-bottom: 14px;
  font-weight: 700;
}

/* Cards / grids */
.grid {
  display: grid;
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card h2, .card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card-action { margin-top: auto; padding-top: 18px; text-align: center; }
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(220,38,64,0.12);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
}

/* Photo grid on home */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.photo-strip img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Trust bar */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  align-items: center;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
}
.trust-item .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Schedule table */
.schedule {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.schedule caption {
  text-align: left;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--navy);
  padding: 20px 24px 4px;
  caption-side: top;
  font-weight: 600;
}
.schedule th, .schedule td {
  text-align: left;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}
.schedule thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.schedule tbody tr:last-child td { border-bottom: none; }
.schedule tbody tr:hover { background: rgba(0,43,92,0.04); }
.schedule td.day { font-weight: 700; color: var(--navy); }

.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(220,38,64,0.12);
  color: var(--accent-btn);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Kit lists */
.kit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kit-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.kit-list li:last-child { border-bottom: none; }
.kit-list li::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  margin-top: 3px;
  border-radius: 5px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.4-1.4z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.4-1.4z'/></svg>") center/contain no-repeat;
}

/* Event pages */
.event-feature { align-items: center; gap: 56px; }
.event-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
}
.event-facts div { border-left: 4px solid var(--accent); padding-left: 16px; }
.event-facts dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-btn);
}
.event-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); }
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 24px;
}
.feature-list li { padding-left: 28px; position: relative; font-weight: 500; }
.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent-btn);
  font-weight: 700;
}
.course-maps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.course-maps figure { margin: 0; }
.course-maps img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.schedule td.laps { font-weight: 700; font-size: 1.05rem; color: var(--accent-btn); white-space: nowrap; }
.schedule td.total { font-weight: 700; color: var(--navy); }
.laps-label { display: block; font-size: 1.1rem; color: var(--navy); }
.course-maps figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 10px; }
.partner-card { align-items: center; text-align: center; }
.partner-card .partner-logo { width: auto; max-width: 100%; height: auto; max-height: 100px; margin: 0 auto 18px; }
.partner-card--dark { background: var(--navy); border-color: var(--navy); color: rgba(255,255,255,0.88); }
.partner-card--dark h3 { color: #fff; }
.partner-card--dark .btn-outline { color: #fff; }
.partner-card--dark .btn-outline:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* Legal / policy pages */
.legal { max-width: 760px; margin: 0 auto; }
.legal h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 2em 0 0.6em; }
.legal ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.6em; }
.legal a { color: var(--accent-btn); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent-btn-hover); }

/* Callout / notice */
.notice {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.notice h2, .notice h3 { font-size: 1.3rem; margin-bottom: 8px; }

/* Coach cards */
.coach-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.coach-card .coach-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--navy);
}
.coach-card .coach-photo img { width: 100%; height: 100%; object-fit: cover; }
.coach-card .coach-avatar {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy), var(--navy-mid));
  color: #fff;
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 600;
}
.coach-body { padding: 24px; }
.coach-role {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-btn);
  margin-bottom: 8px;
}
.coach-body h3 { margin-bottom: 10px; }
.coach-body p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background-image: radial-gradient(circle at 85% 20%, rgba(220,38,64,0.25), transparent 55%);
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; max-width: 480px; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid img { height: 64px; width: auto; margin-bottom: 16px; }
.footer-grid h2, .footer-grid h3 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { font-size: 0.92rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85rem; color: var(--ink-soft); }

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

.skip-link {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.15s ease;
}
.skip-link:focus {
  transform: translateY(12px);
}

@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;
  }
}

@media (max-width: 900px) {
  .event-facts { grid-template-columns: 1fr 1fr; }
  .feature-list { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .event-feature { gap: 32px; }
  .course-maps { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 4px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 8px; }
  .main-nav .btn { margin: 10px 0 0; text-align: center; justify-content: center; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip img { height: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 24px; }
  .section { padding: 52px 0; }
  .schedule th, .schedule td { padding: 12px 14px; font-size: 0.88rem; }
  .schedule--compact th, .schedule--compact td { padding: 10px 6px; font-size: 0.8rem; }
  .schedule--compact thead th { font-size: 0.62rem; letter-spacing: 0; }
  .schedule--compact td.laps { font-size: 0.85rem; }
}
