/* ===========================================================================
   family.css — shared stylesheet for the Kenilworth "Four Club Family" sites
   ---------------------------------------------------------------------------
   One layout, four accents. Each site sets its own palette by overriding the
   custom properties in :root (see /lc/css/theme.css, /41/css/theme.css,
   /tangent/css/theme.css). Nothing below hard-codes a brand colour.

   CANONICAL COPY: /css/family.css
   Mirrored to /lc/css/, /41/css/ and /tangent/css/ so that each directory can
   later be served as the document root of its own domain. After editing this
   file run  ./sync-family.sh  to push the change out to the three sub-sites.
   =========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Open+Sans:wght@300;400;600;700&display=swap");

/* ---------------------------------------------------------------- tokens - */
:root {
  /* Overridden per site */
  --accent: #fbaf33;      /* brand colour, used on light surfaces */
  --accent-dk: #fbaf33;   /* lightened variant, used on dark surfaces */
  --accent-dark: #e89710; /* hover/pressed state of --accent */
  --accent-ink: #1d1d1a;  /* text colour that sits legibly ON the accent */
  --hero-from: #2c2c28;
  --hero-to: #1d1d1a;

  /* Shared across the family */
  --ink: #1d1d1a;
  --body: #3d3d39;
  --muted: #6b6b66;
  --white: #ffffff;
  --paper: #f6f6f4;
  --line: #e3e3df;
  --footer-bg: #1d1d1a;
  --footer-text: #ffffff;

  --font-display: "Orbitron", "Arial Black", sans-serif;
  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --wrap: 1200px;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  --header-h: 80px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.65;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.2;
}

h4,
h5,
h6 {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.accent {
  color: var(--accent);
}

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

/* ---------------------------------------------------------------- header - */
header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ink);
  border-bottom: 3px solid var(--accent-dk);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.logo-container .logo {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

.logo-text h1 {
  font-size: 15px;
  color: var(--white);
  white-space: nowrap;
}

.logo-text p {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dk);
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: none;
  align-items: center;
}

.nav-links a {
  margin-left: 24px;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-dk);
}

.burger {
  width: 30px;
  cursor: pointer;
  display: block;
  background: none;
  border: 0;
  padding: 4px 0;
}

.burger span {
  display: block;
  height: 3px;
  border-radius: 3px;
  margin: 5px 0;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* mobile overlay menu */
.menu-overlay {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--ink);
  z-index: 999;
  padding: 30px 24px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menu-overlay a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-overlay a:hover {
  color: var(--accent-dk);
}

/* ------------------------------------------------------------------ hero - */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 50px) 20px 70px;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 18% 78%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 52%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-logo {
  width: min(400px, 74vw);
  margin-bottom: 26px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.hero h1 {
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  color: var(--white);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
  margin-top: 10px;
  font-size: clamp(0.95rem, 2.4vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dk);
}

.hero-divider {
  width: 96px;
  height: 3px;
  margin: 24px auto;
  border-radius: 3px;
  background: var(--accent-dk);
}

.hero-description {
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
  max-width: 660px;
  margin: 0 auto;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 40px;
  margin: 38px 0 34px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  min-width: 110px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  font-weight: 900;
  color: var(--accent-dk);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* --------------------------------------------------------------- buttons - */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 28px;
  border: 2px solid transparent;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease,
    box-shadow 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* -------------------------------------------------------------- sections - */
.section {
  padding: 74px 20px;
}

.section.alt {
  background: var(--paper);
}

.section.dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
  --accent: var(--accent-dk); /* nested elements pick the dark-surface accent */
}

.section.dark h2,
.section.dark h3,
.section.dark h4 {
  color: var(--white);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
}

.wrap.narrow {
  max-width: 860px;
}

.section-header {
  text-align: center;
  margin-bottom: 44px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.section-underline {
  width: 72px;
  height: 4px;
  margin: 16px auto 0;
  border-radius: 4px;
  background: var(--accent);
}

.section-intro {
  max-width: 720px;
  margin: 18px auto 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.section.dark .section-intro {
  color: rgba(255, 255, 255, 0.72);
}

.prose p + p {
  margin-top: 16px;
}

.prose h3 {
  margin: 30px 0 12px;
  font-size: 1.15rem;
}

.prose a {
  color: var(--accent-dark);
  font-weight: 600;
}

/* ----------------------------------------------------------------- cards - */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card .card-icon {
  font-size: 1.7rem;
  color: var(--accent);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
}

.card ul {
  margin: 10px 0 0 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.card li + li {
  margin-top: 6px;
}

/* feature row: text next to an image */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.feature img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.feature + .feature {
  margin-top: 56px;
}

/* -------------------------------------------------------------- carousel - */
.carousel {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 22px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease;
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.carousel-btn.prev {
  left: 12px;
}
.carousel-btn.next {
  right: 12px;
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.carousel-dots button.active {
  background: var(--accent-dk);
  transform: scale(1.3);
}

/* ---------------------------------------------------------------- tables - */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* Classic scroll-shadow: the grey edge only shows while there is more table
     to scroll to, which is the only affordance a narrow screen gets. */
  background: linear-gradient(to right, var(--white) 30%, transparent) left /
      42px 100% no-repeat,
    linear-gradient(to left, var(--white) 30%, transparent) right / 42px 100%
      no-repeat,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.13), transparent)
      left / 13px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.13), transparent)
      right / 13px 100% no-repeat,
    var(--white);
  background-attachment: local, local, scroll, scroll, local;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

table.data th,
table.data td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

table.data thead th {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover {
  background: var(--paper);
}

table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

/* --------------------------------------------------------------- notices - */
.notice {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border-left: 4px solid var(--accent);
  font-size: 0.95rem;
}

.notice i {
  color: var(--accent);
  font-size: 1.2rem;
  margin-top: 2px;
}

.notice strong {
  color: var(--ink);
}

/* ------------------------------------------------------------------ form - */
.form-grid {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--body);
  background: var(--white);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field .hint {
  margin-top: 5px;
  font-size: 0.82rem;
  color: var(--muted);
}

.form-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.93rem;
  display: none;
}

.form-status.ok {
  display: block;
  background: #e8f6ed;
  color: #1c6b3a;
}

.form-status.err {
  display: block;
  background: #fdeaea;
  color: #9a2222;
}

/* ------------------------------------------------- four club family strip - */
.family-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.family-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 132px;
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.family-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.family-card img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.family-card span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.family-card.is-current {
  border-color: var(--accent);
  background: var(--paper);
}

/* ---------------------------------------------------------------- footer - */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 52px 20px 22px;
}

.footer-content {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo img {
  height: 56px;
  width: auto;
}

.footer-text h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.footer-text p {
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 140px;
  flex: 1 1 140px;
}

.footer-column h4 {
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--accent-dk);
}

.footer-column a {
  font-size: 0.92rem;
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.85;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.footer-column a:hover {
  color: var(--accent-dk);
  opacity: 1;
}

/* the four-club logo row that appears in every footer */
.footer-family {
  max-width: var(--wrap);
  margin: 36px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-family h4 {
  margin-bottom: 18px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-family-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.footer-family-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 104px;
  padding: 16px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.22s ease, border-color 0.22s ease,
    transform 0.22s ease;
}

.footer-family-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-dk);
  transform: translateY(-3px);
}

.footer-family-links img {
  height: 40px;
  width: auto;
  object-fit: contain;
  opacity: 0.92;
}

/* Some marks are optically smaller at the same pixel height than others —
   nudge them so the family row reads as one set. */
.footer-family-links img.optical-lg,
.family-card img.optical-lg {
  height: 50px;
}

.footer-family-links a:hover img {
  opacity: 1;
}

.footer-family-links span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.footer-family-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-dk);
}

.footer-bottom {
  max-width: var(--wrap);
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.66;
}

.footer-bottom p + p {
  margin-top: 4px;
}

/* ----------------------------------------------------------- breakpoints - */
@media (max-width: 480px) {
  table.data {
    min-width: 380px;
  }

  table.data th,
  table.data td {
    padding: 11px 10px;
    font-size: 0.88rem;
  }
}

@media (min-width: 620px) {
  .family-strip,
  .footer-family-links {
    grid-template-columns: repeat(4, 1fr);
  }

  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

@media (min-width: 900px) {
  :root {
    --header-h: 88px;
  }

  header {
    padding: 0 30px;
  }

  .logo-container .logo {
    height: 54px;
  }

  .logo-text h1 {
    font-size: 19px;
  }

  .logo-text p {
    font-size: 12px;
  }

  .nav-links {
    display: flex;
  }

  .burger,
  .menu-overlay {
    display: none;
  }

  .section {
    padding: 92px 30px;
  }

  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 46px;
  }

  .feature.reverse img {
    order: 2;
  }

  .footer-links {
    flex-wrap: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
