/* =====================================================================
   Cranleigh ASC – site styles
   Follows the CASC Brand Guidelines (issue 1.1):
     - Typeface: Montserrat (Light, Medium, Bold, Black)
     - Club Orange: Pantone 144C / RGB 237, 139, 0 (#ED8B00)
     - Mostly white backgrounds with black text; orange for brand
       presence; black kept for highlights and accents; tints only for
       minor elements such as lines, bullets and subtle highlights.
   The colours are set once here, so they are easy to change.
   ===================================================================== */

:root {
  --orange: #ed8b00;          /* Club Orange (Pantone 144C) */
  --orange-dark: #c97600;     /* hover state for orange buttons */
  --orange-tint-10: #fdf3e5;  /* 10% orange tint: subtle backgrounds */
  --orange-tint-25: #fae2bf;  /* 25% orange tint: lines and borders */
  --black: #000000;
  --text: #000000;
  --grey: #4d4d4d;            /* black tint for secondary text */
  --grey-light: #e6e6e6;      /* black tint for lines */
  --white: #ffffff;
  --container: 1170px;
  --font: "Montserrat", Arial, Helvetica, sans-serif;
}

/* ---------- Fonts (stored locally in assets/fonts) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap; src: url("../assets/fonts/montserrat-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../assets/fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 900; font-display: swap; src: url("../assets/fonts/montserrat-latin-900-normal.woff2") format("woff2"); }

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

html { scroll-behavior: smooth; scroll-padding-top: 20px; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  border-top: 6px solid var(--orange);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color .2s;
}
a:hover { color: var(--orange); }

h1, h2, h3 {
  font-family: var(--font);
  line-height: 1.2;
  margin: 0 0 20px;
}

/* Section headings: Montserrat Black, capitals, with an orange rule */
h2 {
  font-weight: 900;
  font-size: clamp(28px, 2.4vw + 12px, 40px);
  text-transform: uppercase;
  letter-spacing: .01em;
  text-align: center;
  margin-bottom: 30px;
}
h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--orange);
  margin: 16px auto 0;
}
h3 { font-size: 22px; font-weight: 800; text-transform: uppercase; }

p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 60px);
  margin: 0 auto;
  padding: 0 30px;
}
.narrow { max-width: 860px; }
.centre { text-align: center; }

.icon { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: middle; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--orange); color: var(--black); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 20px 48px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  transition: background-color .2s, color .2s;
}
.btn--orange { background: var(--orange); color: var(--black); }
.btn--orange:hover { background: var(--black); color: var(--orange); }
.btn--black { background: var(--black); color: var(--white); }
.btn--black:hover { background: var(--white); color: var(--black); }
.btn--small { font-size: 13px; line-height: 17px; padding: 10px 22px; }

/* ---------- Icon circles (Open Meets, Find us, Member Zone) ---------- */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-size: 26px;
  flex-shrink: 0;
}
.icon-circle--small { width: 22px; height: 22px; font-size: 11px; }
.icon-circle--large { width: 84px; height: 84px; font-size: 40px; }

/* ---------- Logo lockup (crest | name / tag statement) ---------- */
.lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--black);
}
.lockup:hover { color: var(--black); }
.lockup-crest { width: 88px; height: auto; }
.lockup-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 18px;
  border-left: 3px solid var(--orange);
  min-height: 80px;
}
.lockup-name { font-weight: 700; font-size: 22px; line-height: 1.2; }
.lockup-tag {
  margin-top: 6px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange);
  word-spacing: .15em;
}

/* ---------- Header ---------- */
.site-header { background: var(--white); position: relative; z-index: 20; border-bottom: 1px solid var(--grey-light); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 140px;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; }
.main-nav a {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  display: block;
  padding: 8px 0;
  border-bottom: 3px solid transparent;
  transition: border-color .2s, color .2s;
}
.main-nav a:hover { color: var(--black); border-color: var(--orange); }
.main-nav a.is-active { color: var(--orange); border-color: var(--orange); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  font-size: 26px;
  color: var(--black);
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-bars { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  text-align: center;
  background-color: var(--black);
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .25) 70%),
    url("../assets/images/cranleigh_swimmer.png");
  background-size: cover;
  background-position: center;
  padding: 8vw 0 calc(8vw + 50px);
}
.hero-tag {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .14em;
  word-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.hero h1 {
  font-weight: 900;
  font-size: clamp(32px, 3.6vw + 12px, 64px);
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0 auto 24px;
  max-width: 900px;
}
.hero-lead {
  font-size: 20px;
  line-height: 1.6;
  font-weight: 500;
  max-width: 720px;
  margin: 0 auto 44px;
}
.hero-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px 24px; }
.hero-curve {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 4.5vw;
  min-height: 24px;
  display: block;
}

/* ---------- Sections ---------- */
.section { padding: 70px 0; }

/* About */
.about { padding-top: 40px; }
.about p { font-weight: 400; }

/* Open Meets */
.meets {
  color: var(--white);
  background-color: var(--black);
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .55) 100%),
    url("../assets/images/cranleigh_leisure_centre.jpg");
  background-size: cover;
  background-position: center;
  border-bottom: 6px solid var(--orange);
}
.meets a { color: var(--white); }
.meets a:hover { color: var(--orange); }
.meets-intro { text-align: center; font-size: 17px; margin-bottom: 40px; }
.meets-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
}
.meet {
  text-align: center;
  border-top: 3px solid var(--orange);
  padding-top: 30px;
}
.meet .icon-circle { margin-bottom: 15px; color: var(--black); }
.meet h3 { color: var(--orange); margin-bottom: 14px; }
.meet-text { font-size: 15px; line-height: 1.8; }
.meet-text p { margin: 0 0 10px; }
.meet-text strong { font-weight: 800; letter-spacing: .02em; }
.meet-text a { font-weight: 700; }

/* Cards (used by Our Team) */
.card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-top: 4px solid var(--orange);
  padding: 24px;
}

/* Our Team */
.team-intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px;
}
.team-intro p { font-size: 17px; }
.team-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.person { text-align: center; }
.person-photo img { margin: 0 auto; }
.person-name { margin-top: 20px; }
.person-name span { display: block; }
.person-name span:first-child { font-weight: 800; font-size: 18px; text-transform: uppercase; }
.person-name span:last-child {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-top: 4px;
}
.person-bio { margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--grey); }

/* Latest News */
.news { background: var(--orange-tint-10); }
.embed-box {
  max-width: 500px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--orange-tint-25);
  color: var(--grey);
  text-align: center;
  padding: 30px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.embed-box p { margin-bottom: 15px; }
.embed-box.is-loaded { background: none; border: 0; padding: 0; display: flex; justify-content: center; }
.embed-box iframe { max-width: 100%; display: block; }
.news-follow { text-align: center; margin-top: 30px; font-size: 15px; }
.news-follow a { font-weight: 700; }

/* Contact */
.contact-form { max-width: 760px; margin: 30px auto 60px; }
.find-us {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 8%;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 60px;
  border-top: 1px solid var(--grey-light);
}
.find-us-text { text-align: center; padding: 0 6%; }
.find-us-text .icon-circle { margin-bottom: 15px; color: var(--black); }
.find-us-text p { font-size: 16px; }
.find-us-map img { border: 4px solid var(--orange); max-width: 500px; width: 100%; margin: 0 auto; }

/* Member Zone */
.members { background: var(--orange-tint-10); }
.members-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 8%;
  align-items: center;
  margin-top: 30px;
}
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 10px;
}
.check-list .icon-circle { color: var(--black); }
.check-list a { text-decoration: none; }
.check-list a:hover { color: var(--orange); }

.video-facade,
.video-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: var(--black);
  cursor: pointer;
  overflow: hidden;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.play-button {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--black);
  font-size: 24px;
  padding-left: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.video-facade:hover .play-button { transform: translate(-50%, -50%) scale(1.08); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding: 60px 0 30px; border-top: 6px solid var(--orange); }
.site-footer .lockup,
.site-footer .lockup:hover { color: var(--white); }
.lockup--footer .lockup-crest { width: 70px; }
.lockup--footer .lockup-name { font-size: 18px; }
.lockup--footer .lockup-text { min-height: 64px; }
.footer-menus {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  align-items: start;
  padding-bottom: 50px;
}
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu a {
  display: inline-block;
  color: var(--white);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.footer-menu a:hover { color: var(--orange); border-color: var(--orange); }
.footer-menu li + li { margin-top: 12px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, .2);
  padding-top: 20px;
}
.copyright { font-size: 12px; margin: 0; font-weight: 400; }
.social { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.social a { color: var(--white); font-size: 18px; text-decoration: none; }
.social a:hover { color: var(--orange); }

/* Back-to-top button */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  background: var(--orange);
  color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, background-color .2s;
  z-index: 30;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--orange); background: var(--black); }

/* =====================================================================
   Responsive layouts
   ===================================================================== */

/* Tablets and small laptops: collapse the menu */
@media (max-width: 1100px) {
  .header-inner { min-height: 120px; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--grey-light);
    border-bottom: 4px solid var(--orange);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    padding: 15px 30px;
    border-bottom: 1px solid var(--grey-light);
  }
  .main-nav a:hover, .main-nav a.is-active { border-color: var(--grey-light); }
  .find-us, .members-grid { gap: 30px 5%; }
}

/* Phones and portrait tablets: stack the columns */
@media (max-width: 800px) {
  body { font-size: 16px; }
  .section { padding: 55px 0; }
  .meets-list, .team-list, .find-us, .members-grid { grid-template-columns: 1fr; }
  .team-list { gap: 30px; max-width: 440px; margin: 0 auto; }
  .person-photo img { max-width: 320px; }
  .hero-lead { font-size: 18px; }
  .find-us-map { order: 2; }
  .members-video { order: 2; }
  .check-list { max-width: 420px; margin: 0 auto; }
  .footer-menus { grid-template-columns: 1fr 1fr; }
  .lockup--footer { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .header-inner { min-height: 96px; }
  .lockup { gap: 12px; }
  .lockup-crest { width: 60px; }
  .lockup-text { padding-left: 12px; min-height: 56px; }
  .lockup-name { font-size: 16px; }
  .lockup-tag { font-size: 10px; margin-top: 4px; }
  .main-nav a { padding: 15px 20px; }
  .hero { padding: 60px 0 80px; }
  .hero-tag { font-size: 12px; }
  .hero-buttons { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
  .btn { padding: 18px 28px; }
  .footer-menus { grid-template-columns: 1fr; padding-bottom: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
  .lockup-name { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
