/* Clementi Swimming School. Read STYLE-NOTES.md before changing anything visual. */

:root {
  --air: #E4F2FA;      /* pale pool blue: page intros, soft panels */
  --pool: #0E6FAE;     /* the water */
  --deep: #0A2E4A;     /* ink, footer, menu */
  --shallow: #9ED8F2;  /* light blue on dark */
  --tile: #F4F8FB;     /* quiet panels on white */
  --line: #DCE8EF;     /* borders on white */
  --sun: #FFC83D;      /* the one warm accent */
  --wa: #25D366;       /* WhatsApp buttons, with deep ink text */
  --mute: #4A6378;
  --white: #FFFFFF;

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --gut: 20px;
  --head-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
body {
  margin: 0;
  padding-top: var(--head-h);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--deep);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  /* Best-effort copy protection. Inputs stay usable (see below). */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body.home { padding-top: 0; }
body.menu-open { overflow: hidden; }
input, textarea { -webkit-user-select: text; user-select: text; }
img { max-width: 100%; height: auto; display: block; -webkit-user-drag: none; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 104%;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.45em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 9.5vw, 5rem); }
h2 { font-size: clamp(1.85rem, 5.6vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.measure { max-width: 34em; }
.lead { font-size: 1.14rem; color: var(--mute); }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--deep); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 60; }
.skip:focus { left: 8px; }

/* ---------- Header: menu top right ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--head-h);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  backdrop-filter: saturate(1.5) blur(12px);
  box-shadow: 0 1px 0 var(--line);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.4s var(--ease);
}
.home .site-head:not(.scrolled) { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--white); }
.head-row { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand svg { flex: none; }
.brand-logo { flex: none; width: 50px; height: 50px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.site-foot .brand-logo { width: 72px; height: 72px; }
.brand-name { font-family: var(--display); font-stretch: 104%; font-weight: 700; font-size: 1.02rem; line-height: 1.1; white-space: nowrap; }
.brand-name span { display: block; font-family: var(--body); font-weight: 500; font-size: 0.78rem; opacity: 0.75; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a { text-decoration: none; font-size: 0.97rem; font-weight: 500; padding: 8px 12px; border-radius: 10px; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { margin-left: 10px; }
.nav .btn::after { display: none; }

.menu-btn {
  width: 46px; height: 46px; margin-right: -8px; border: 0; background: transparent; color: inherit;
  display: grid; place-items: center; align-content: center; cursor: pointer; border-radius: 12px;
}
.menu-btn span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.35s var(--ease); }
.menu-btn span + span { margin-top: 7px; }
.menu-open .menu-btn span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* Phone menu: full screen, slides down */
.mobile-menu {
  position: fixed; inset: 0; z-index: 35;
  background: var(--deep); color: var(--white);
  padding: calc(var(--head-h) + 24px) var(--gut) 32px;
  display: flex; flex-direction: column;
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}
.menu-open .mobile-menu { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.menu-open .site-head { background: var(--deep); color: var(--white); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu nav a {
  font-family: var(--display); font-weight: 700; font-size: 2rem; letter-spacing: -0.02em;
  text-decoration: none; padding: 8px 0;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.menu-open .mobile-menu nav a { opacity: 1; transform: none; }
.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: 0.04s; }
.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: 0.08s; }
.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: 0.12s; }
.menu-open .mobile-menu nav a:nth-child(5) { transition-delay: 0.16s; }
.menu-open .mobile-menu nav a:nth-child(6) { transition-delay: 0.2s; }
.mobile-menu nav a[aria-current="page"] { color: var(--sun); }
.mobile-menu .menu-foot { margin-top: auto; display: grid; gap: 14px; color: #B8CDDC; font-size: 0.95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 1rem/1 var(--body);
  padding: 16px 24px; min-height: 52px;
  border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg { flex: none; }
.btn-wa { background: var(--wa); color: var(--deep); }
.btn-wa:hover { background: #1fc05b; box-shadow: 0 10px 24px -10px rgba(37, 211, 102, 0.8); }
.btn-pool { background: var(--pool); color: var(--white); }
.btn-pool:hover { background: #0B5F96; }
.btn-line { background: transparent; color: var(--deep); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-line:hover { background: rgba(10, 46, 74, 0.06); }
.btn-glass { background: rgba(255, 255, 255, 0.14); color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.26); }
.btn-sm { padding: 10px 18px; min-height: 42px; font-size: 0.93rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.text-link {
  font-weight: 600; color: var(--pool); text-decoration: none; padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.text-link:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* Floating WhatsApp button on phones, appears after the hero */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: var(--deep);
  box-shadow: 0 10px 26px rgba(10, 46, 74, 0.3);
  transform: scale(0); transition: transform 0.4s var(--ease);
}
.wa-float.show { transform: scale(1); }
.menu-open .wa-float { transform: scale(0); }

/* ---------- Home hero: words on solid navy beside a real lesson photo ----------
   The words never sit on the photo, so they stay readable and no faces are covered. */
.hero { color: var(--white); background: var(--deep); padding-top: var(--head-h); overflow: hidden; }
.hero-grid { display: grid; gap: 30px; padding-top: 18px; padding-bottom: 52px; }
.hero-photo { order: -1; position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: #123E5F; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; animation: settle 9s var(--ease) both; }
.hero-photo figcaption {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(5, 24, 40, 0.78); color: var(--white);
  font-size: 0.85rem; font-weight: 500; padding: 6px 12px; border-radius: 999px;
}
.hero .where { font-weight: 600; font-size: 1rem; color: var(--sun); margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.3rem, 8.5vw, 4.4rem); max-width: 11em; margin-bottom: 0.3em; }
.hero .lead { color: #E4F0F8; max-width: 30em; }
.rise { animation: rise 1s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Scroll reveals (only when JS runs) ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-tile { background: var(--tile); }
.section-head { margin-bottom: 36px; }
.section-head p { color: var(--mute); max-width: 36em; }
.split-head { display: grid; gap: 12px 40px; align-items: end; margin-bottom: 40px; }
.split-head h2 { margin: 0; }
.split-head p { color: var(--mute); margin: 0; max-width: 34em; }

/* Trust strip under the hero */
.trust-strip { padding: 44px 0; border-bottom: 1px solid var(--line); }
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.trust li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; }
.trust svg { grid-row: span 2; }
.trust b { font-family: var(--display); font-size: 1.12rem; font-weight: 700; }
.trust span { color: var(--mute); font-size: 0.98rem; }

/* Photo cards (lessons) */
.cards { display: grid; gap: 30px; }
.card { text-decoration: none; display: block; }
.card-media { border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--air); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card h3 { margin: 18px 0 6px; }
.card p { color: var(--mute); font-size: 0.98rem; margin-bottom: 10px; }
.card .more { font-weight: 600; color: var(--pool); font-size: 0.95rem; }

/* Coach */
.coach { display: grid; gap: 34px; align-items: center; }
.coach-photo { border-radius: 24px; overflow: hidden; aspect-ratio: 1; max-width: 440px; background: var(--air); }
.coach-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.quote {
  margin: 26px 0; padding: 0 0 0 20px;
  border-left: 3px solid var(--sun);
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.2rem, 3.4vw, 1.45rem); line-height: 1.38; letter-spacing: -0.01em;
}
.quote cite { display: block; margin-top: 10px; font-family: var(--body); font-style: normal; font-weight: 500; font-size: 0.95rem; color: var(--mute); letter-spacing: 0; }

.approach { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.approach li { padding-left: 36px; position: relative; }
.approach li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--air) url("img/tick.svg") center / 12px no-repeat;
}
.approach b { display: block; font-size: 1.05rem; }
.approach span { color: var(--mute); font-size: 0.98rem; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 22px; border-top: 1px solid #C9DCE7; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 14px;
  font: 700 2.4rem/1 var(--display); color: var(--pool);
}
.steps h3 { margin-bottom: 0.3em; }
.steps p { color: var(--mute); }

/* Full-width photo band with gentle parallax */
.band { position: relative; overflow: hidden; color: var(--white); min-height: 460px; display: flex; align-items: center; background: var(--deep); }
.band-media { position: absolute; inset: -12% 0; }
.band-media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 30, 50, 0.85), rgba(6, 30, 50, 0.4) 70%, rgba(6, 30, 50, 0.2)); }
.band .wrap { position: relative; z-index: 1; width: 100%; padding-top: 64px; padding-bottom: 64px; }
.band p { color: #DCEBF5; }

/* Lessons page rows: photo and text, alternating */
.lesson-row { display: grid; gap: 26px; align-items: center; padding: 36px 0; }
.lesson-row + .lesson-row { border-top: 1px solid var(--line); }
.lesson-row .card-media { aspect-ratio: 3 / 2; }
.lesson-row h2 { font-size: clamp(1.7rem, 4.6vw, 2.3rem); margin-bottom: 0.2em; }
.who { display: inline-block; margin-bottom: 12px; font-size: 0.95rem; font-weight: 600; color: var(--pool); }
.lesson-row ul { margin: 0 0 24px; padding-left: 1.1em; color: var(--mute); }
.lesson-row li { margin-bottom: 0.3em; }
.list-h { font-weight: 600; margin-bottom: 6px; }
.formats { display: grid; gap: 16px; }
.format { background: var(--white); border-radius: 20px; padding: 28px; }
.format p { color: var(--mute); }

/* Private fees note */
.private { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 20px; background: var(--air); }
.private svg { flex: none; margin-top: 2px; }
.private b { display: block; margin-bottom: 2px; }
.private p { color: #2C4A63; font-size: 0.98rem; }

/* Videos: click-to-play thumbnails */
.videos { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.video { margin: 0; }
.video figcaption { margin-top: 12px; font-weight: 600; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--deep); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: var(--deep) center / cover no-repeat;
}
.video-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.95) url("img/play.svg") 55% 50% / 26px no-repeat;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--ease);
}
.video-play:hover::after { transform: scale(1.08); }
.video-soon {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  color: #E1F0F9; font-size: 0.95rem; font-weight: 500;
  background: linear-gradient(rgba(10, 46, 74, 0.5), rgba(10, 46, 74, 0.7)), url("img/water-800.webp") center / cover;
}

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 22px 0; font-weight: 600; font-size: 1.07rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--tile) url("img/plus.svg") center / 12px no-repeat;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}
.faq summary:hover::after { background-color: var(--air); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 46px 24px 0; color: var(--mute); max-width: 42em; }
.faq details[open] .answer { animation: open 0.45s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Closing call to action over water */
.cta { position: relative; overflow: hidden; color: var(--white); text-align: center; background: var(--pool); padding: 92px 0 88px; }
.cta-media { position: absolute; inset: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; }
.cta::after { content: ""; position: absolute; inset: 0; background: rgba(8, 52, 86, 0.58); }
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { margin-bottom: 0.3em; }
.cta p { color: #E1F0F9; max-width: 28em; margin: 0 auto; }
.cta .btn-row { justify-content: center; }

/* Page intro (inner pages) */
.page-intro { position: relative; overflow: hidden; background: var(--air); padding: 64px 0 56px; }
.page-intro h1 { font-size: clamp(2.3rem, 8vw, 4rem); }
.page-intro .lead { color: #2C4A63; }
.page-intro.has-photo { color: var(--white); background: var(--deep); padding: 140px 0 60px; }
.page-intro.has-photo .lead { color: #DCEBF5; }
.intro-media { position: absolute; inset: 0; }
.intro-media img { width: 100%; height: 100%; object-fit: cover; animation: settle 9s var(--ease) both; }
.page-intro.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 30, 50, 0.88), rgba(6, 30, 50, 0.3)); }
.page-intro .wrap { position: relative; z-index: 1; }

/* Contact page */
.contact-grid { display: grid; gap: 22px; }
.contact-card { background: var(--tile); border-radius: 22px; padding: 30px; }
.contact-card h2 { font-size: 1.5rem; }
.contact-card p { color: var(--mute); }
.big-number { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 7vw, 2.8rem); letter-spacing: -0.02em; text-decoration: none; display: inline-block; margin: 0 0 14px; }

/* To-confirm placeholders: visible on purpose until Freddie confirms */
.todo { background: #FFF1C2; color: #6B4E00; padding: 1px 6px; border-radius: 5px; font-weight: 600; font-size: 0.92em; }

/* Lane rope above the footer */
.rope { height: 22px; background: url("img/rope.svg") 0 50% / 96px 22px repeat-x; }

/* Footer */
.site-foot { background: var(--deep); color: #C6DAE8; padding: 54px 0 30px; font-size: 0.95rem; }
.foot-grid { display: grid; gap: 30px; }
.site-foot .brand-name { color: var(--white); }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-h { color: var(--white); font-weight: 600; margin-bottom: 10px; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.85rem; color: #9DB6C9; }

/* Pay page */
.pay-steps { display: grid; gap: 18px; }
.pay-card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.pay-card h2 { font-size: 1.45rem; }
.pay-card .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; }
.field input {
  font: 500 1.05rem var(--body); color: var(--deep);
  padding: 14px; border-radius: 12px; border: 1.5px solid #B9D3E2; background: var(--white);
}
.field input:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--pool); }
.hint { font-size: 0.9rem; color: var(--mute); }
.qr { width: 220px; aspect-ratio: 1; border-radius: 14px; border: 2px dashed #B9D3E2; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--mute); font-size: 0.9rem; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--mute); }

/* Real lesson videos are phone-shaped */
.video-frame.tall { aspect-ratio: 9 / 16; max-height: 640px; }
.videos.tall-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 300px)); }
.video-note { margin-top: 26px; color: var(--mute); }
.media-split { display: grid; gap: 34px; align-items: center; }

/* Photo gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--air); aspect-ratio: 1; }
.gallery figure.wide { grid-column: span 2; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.gallery figure:hover img { transform: scale(1.04); }

/* "Swim With Fred" yellow cap */
.cap-note { display: grid; gap: 26px; align-items: center; background: #FFF6D6; border-radius: 24px; padding: 26px; }
.cap-note img { width: 100%; max-width: 260px; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.cap-note h2 { font-size: clamp(1.6rem, 4.6vw, 2.2rem); }
.cap-note p { color: #4D4220; }

/* Learning aids */
.gear { display: grid; gap: 18px; }
.gear figure { margin: 0; }
.gear { grid-template-columns: 1fr 1fr; }
.gear .card-media { aspect-ratio: 4 / 3; }
.gear figcaption { margin-top: 10px; color: var(--mute); font-size: 0.95rem; }

/* Water safety poster (our own design, also exported as an image for WhatsApp) */
.poster {
  border-radius: 26px; overflow: hidden; color: var(--white);
  background: var(--pool) url("img/water-800.webp") center / cover;
  position: relative;
}
.poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10, 46, 74, 0.92), rgba(10, 46, 74, 0.7)); }
.poster-in { position: relative; padding: 34px 26px; }
.poster h2 { margin-bottom: 0.2em; }
.poster .sub { color: #D6EAF7; margin-bottom: 26px; }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: tip; }
.tips li { counter-increment: tip; display: grid; grid-template-columns: 44px 1fr; gap: 0 14px; background: rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 18px; }
.tips li::before {
  content: counter(tip); grid-row: span 2;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun); color: var(--deep); font: 700 1.25rem/1 var(--display);
}
.tips b { font-size: 1.08rem; }
.tips span { color: #D6EAF7; font-size: 0.97rem; }

/* ---------- v4 (4 Nov 2026) ---------- */
/* Jump links at the top of Programmes and Videos */
.jump { display: flex; gap: 8px; padding-top: 20px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: none; text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 8px 14px; border-radius: 999px; background: var(--tile); border: 1px solid var(--line); }
.jump a:hover { background: var(--air); }

/* Video library: same-size thumbnails that play in a pop-up, so low-quality originals stay small */
.vgrid { display: grid; gap: 18px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vcard { margin: 0; }
.vthumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--deep); cursor: pointer; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.vthumb:hover img { transform: scale(1.05); }
.vthumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(5, 24, 40, 0.55)); z-index: 1; }
.vthumb::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; z-index: 2;
  border-radius: 50%; background: rgba(255, 255, 255, 0.95) url("img/play.svg") 56% 50% / 22px no-repeat;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--ease);
}
.vthumb:hover::after { transform: scale(1.1); }
.vdur { position: absolute; right: 8px; bottom: 8px; z-index: 2; color: #fff; font-size: 0.8rem; font-weight: 600; background: rgba(5, 24, 40, 0.75); padding: 2px 8px; border-radius: 999px; }
.vcard figcaption { margin-top: 8px; font-weight: 600; font-size: 0.95rem; line-height: 1.35; }

.vplayer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.vplayer::backdrop { background: rgba(5, 18, 30, 0.88); }
.vplayer-in { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 16px 24px; }
.vtitle { color: #fff; font-weight: 600; margin-bottom: 12px; text-align: center; }
.vbox video { display: block; max-width: min(92vw, 900px); max-height: calc(100vh - 140px); border-radius: 14px; background: #000; }
.vclose { position: absolute; top: 12px; right: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--deep); font-size: 1.8rem; line-height: 1; cursor: pointer; }

/* Programme posters on the home page */
.posters { display: grid; gap: 22px; }
.poster-card { display: block; border-radius: 20px; overflow: hidden; box-shadow: 0 14px 34px -18px rgba(10, 46, 74, 0.45); transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.poster-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -18px rgba(10, 46, 74, 0.55); }
.poster-card img { width: 100%; height: auto; }

/* Programmes page */
.prog-tag { display: inline-block; background: var(--sun); color: var(--deep); font-weight: 700; font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--air) url("img/tick.svg") center / 12px no-repeat; }
.prog-art { width: 100%; max-width: 420px; height: auto; margin: 0 auto 18px; }
.prog-photo { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; }
.prog-photo img { width: 100%; height: 100%; object-fit: cover; }
.medal { display: flex; gap: 14px; align-items: center; margin: 22px 0 0; }
.medal img { width: 96px; height: 120px; object-fit: cover; border-radius: 12px; }
.medal figcaption { color: var(--mute); font-size: 0.92rem; }

/* FAQ "Ask us" badge: our own version of the yellow button image Freddie likes */
.faq-wrap { display: grid; gap: 34px; align-items: start; }
.askme {
  justify-self: center; width: 200px; aspect-ratio: 1; border-radius: 50%; text-decoration: none;
  display: grid; place-content: center; text-align: center; gap: 6px;
  background: var(--sun); color: var(--deep); box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.08), 0 14px 30px -14px rgba(10, 46, 74, 0.5);
  transform: rotate(-6deg); transition: transform 0.4s var(--ease);
}
.askme:hover { transform: rotate(0deg) scale(1.04); }
.askme b { font: 800 2.6rem/0.9 var(--display); letter-spacing: -0.02em; }
.askme span { font-weight: 600; font-size: 0.95rem; }

/* About page uses a friendly comic-style font (Comic Neue, a cleaner Comic Sans), as Freddie asked */
.comic main h1, .comic main h2, .comic main h3, .comic main p, .comic main li, .comic main b, .comic .quote { font-family: "Comic Neue", "Comic Sans MS", var(--body); }
.comic main h1, .comic main h2 { font-weight: 700; letter-spacing: -0.01em; }
.comic main p, .comic main li span { font-size: 1.08rem; }

@media (min-width: 700px) {
  .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
  .posters { grid-template-columns: repeat(3, 1fr); }
  .gear { grid-template-columns: repeat(4, 1fr); }
  .faq-wrap { grid-template-columns: 1fr 220px; }
  .askme { position: sticky; top: calc(var(--head-h) + 30px); }
}
@media (min-width: 960px) {
  .vgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .media-split .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comic .steps { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Larger screens ---------- */
@media (min-width: 700px) {
  :root { --gut: 32px; }
  .trust { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .formats, .contact-grid, .approach-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery figure.wide { aspect-ratio: auto; position: relative; }
  .gallery figure.wide img { position: absolute; inset: 0; }
  .cap-note { grid-template-columns: 260px 1fr; padding: 34px; gap: 40px; }
  .tips { grid-template-columns: repeat(3, 1fr); }
  .tips li { grid-template-columns: 1fr; gap: 12px; }
  .tips li::before { grid-row: auto; }
  .poster-in { padding: 54px 48px; }
  .pay-steps { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  :root { --head-h: 78px; }
  .nav { display: flex; }
  .menu-btn, .mobile-menu, .wa-float { display: none; }
  .hero-photo { order: 0; }
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 80px; }
  .media-split { grid-template-columns: 1fr 1.2fr; gap: 64px; }
  .section { padding: 112px 0; }
  .split-head { grid-template-columns: 1.1fr 1fr; }
  .cards { grid-template-columns: repeat(4, 1fr); gap: 26px; }
  .coach { grid-template-columns: 440px 1fr; gap: 72px; }
  .lesson-row { grid-template-columns: 1fr 1fr; gap: 64px; padding: 60px 0; }
  .lesson-row:nth-child(even) .card-media { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
}
@media print {
  .site-head, .cta, .wa-float, .mobile-menu { display: none; }
}

/* SwimSafer stage list (Programmes page) */
.stages { margin: 6px 0 20px; }
.stage-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.stage-list li { background: var(--tile); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 0.95rem; color: var(--mute); }
.stage-list b { display: block; color: var(--deep); }

/* ---------- v5 (5 Nov 2026): new logo, Classes menu, video carousels, slimmer pages ---------- */
:root { --head-h: 76px; }
/* Header is always white now, so the kid logo (navy lettering) is readable */
.home .site-head:not(.scrolled) { background: rgba(255, 255, 255, 0.95); color: var(--deep); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px); }
.brand-logo { width: auto; height: 60px; border-radius: 0; box-shadow: none; background: none; }
.foot-logo { display: inline-block; background: #fff; border-radius: 16px; padding: 10px 14px; }
.site-foot .brand-logo { width: auto; height: 84px; }
.menu-open .site-head { background: #fff; color: var(--deep); }

/* Classes dropdown (desktop): opens on hover, focus or click */
.dd { position: relative; }
.dd-btn { font: 500 0.97rem var(--body); color: inherit; background: none; border: 0; padding: 8px 12px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.dd-btn[aria-current="true"] { box-shadow: inset 0 -2px 0 currentColor; border-radius: 0; }
.dd-btn svg { transition: transform 0.25s var(--ease); }
.dd-menu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 190px; padding: 8px;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(10, 46, 74, 0.35), 0 0 0 1px var(--line);
  display: grid; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
}
.dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.dd:hover .dd-menu, .dd:focus-within .dd-menu, .dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dd:hover .dd-btn svg, .dd.open .dd-btn svg { transform: rotate(180deg); }
.nav .dd-menu a { color: var(--deep); padding: 10px 12px; border-radius: 10px; }
.nav .dd-menu a::after { display: none; }
.nav .dd-menu a:hover, .nav .dd-menu a[aria-current="page"] { background: var(--tile); }

/* Phone menu: white sheet, Classes as a small group label */
.mobile-menu { background: #fff; color: var(--deep); }
.mobile-menu nav a { font-size: 1.6rem; padding: 6px 0; }
.mobile-menu nav a.m-sub { font-size: 1.25rem; padding-left: 18px; color: var(--mute); }
.mobile-menu nav a[aria-current="page"] { color: var(--pool); }
.m-group { font-weight: 600; font-size: 0.9rem; color: var(--mute); margin-top: 10px; }
.mobile-menu .menu-foot { color: var(--mute); }

/* Slimmer, calmer pages */
.section { padding: 56px 0; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); }
.page-intro { padding: 44px 0 36px; }
.page-intro h1 { font-size: clamp(2rem, 6.5vw, 3rem); }
.lead { font-size: 1.05rem; }
.section-head { margin-bottom: 26px; }
.split-head { margin-bottom: 28px; }
.hero h1 { font-size: clamp(2.3rem, 8vw, 3.8rem); }
.hero-grid { padding-bottom: 40px; }
.cta { padding: 64px 0 60px; }
.band { min-height: 360px; }
.coach-photo { max-width: 360px; }
.lesson-row { padding: 26px 0; gap: 20px; }
.lesson-row .card-media { aspect-ratio: 16 / 10; max-width: 520px; }
.lesson-row h2 { font-size: clamp(1.4rem, 3.6vw, 1.8rem); }
.steps li::before { font-size: 1.8rem; margin-bottom: 8px; }
.approach { gap: 14px; }

/* Video carousel: one video at a time, arrows on both sides */
.vcar { position: relative; max-width: 260px; margin: 0 auto; padding: 0 44px; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: auto; scrollbar-width: none; border-radius: 16px; }
.car-track::-webkit-scrollbar { display: none; }
.car-track .vcard { flex: 0 0 100%; scroll-snap-align: center; opacity: 1; transform: none; }
.car-btn {
  position: absolute; top: calc(50% - 30px); width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: #fff; color: var(--deep);
  box-shadow: 0 6px 16px -6px rgba(10, 46, 74, 0.45), 0 0 0 1px var(--line);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.car-btn:hover { transform: scale(1.08); }
.car-btn[disabled] { opacity: 0.3; cursor: default; transform: none; }
.car-btn.prev { left: 0; }
.car-btn.next { right: 0; }
.car-count { text-align: center; font-size: 0.85rem; color: var(--mute); margin: 6px 0 0; }
.vcar .vcard figcaption { text-align: center; font-size: 0.9rem; }

/* Videos page: the 4 groups side by side */
.vgroups { display: grid; gap: 44px; }
.vgroup { text-align: center; }
.vgroup h2 { font-size: 1.35rem; margin-bottom: 4px; }
.vgroup > p { color: var(--mute); font-size: 0.95rem; margin-bottom: 16px; }

/* Programmes page: 4 simple cards */
.prog-grid { display: grid; gap: 22px; }
.prog { background: var(--tile); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px; text-align: center; }
.prog h2 { font-size: 1.45rem; margin-bottom: 6px; }
.prog > p { color: var(--mute); font-size: 0.97rem; max-width: 30em; margin: 0 auto 18px; }
.prog .btn { margin-top: 16px; }

@media (min-width: 700px) {
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .vgroups { grid-template-columns: 1fr 1fr; }
  .prog-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  :root { --head-h: 92px; }
  .brand-logo { height: 74px; }
  .section { padding: 76px 0; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .vgroups { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .vgroups .vcar { padding: 0 40px; }
  .coach { grid-template-columns: 360px 1fr; gap: 56px; }
}

/* ---------- v6 (5 Nov 2026): autoplay previews, video rows, centred player ---------- */
/* Thumbnails are silent looping previews; a plain white play icon, no circle */
.vthumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.vthumb::after {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 0; box-shadow: none; background: url("img/play-white.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55)); opacity: 0.95;
}
.vthumb:hover::after { transform: scale(1.12); }
.vthumb:hover video { transform: scale(1.04); transition: transform 0.9s var(--ease); }

/* Player: a centred box, page stays visible behind it, close button outside the video */
.vplayer { width: auto; height: auto; max-width: 92vw; max-height: 92vh; margin: auto; overflow: visible; background: transparent; }
.vplayer::backdrop { background: transparent; }
.vplayer-in { padding: 0; height: auto; display: block; }
.vbox { position: relative; }
.vbox video { max-width: min(88vw, 440px); max-height: 78vh; border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(5, 24, 40, 0.65), 0 0 0 1px rgba(10, 46, 74, 0.15); }
.vtitle { color: var(--deep); background: #fff; display: inline-block; padding: 6px 14px; border-radius: 999px; margin: 0 0 10px; box-shadow: 0 6px 20px -8px rgba(5, 24, 40, 0.4); font-size: 0.95rem; }
.vplayer-in { text-align: center; }
.vclose { top: 34px; right: -54px; width: 42px; height: 42px; font-size: 1.6rem; box-shadow: 0 6px 18px -6px rgba(5, 24, 40, 0.5); }
@media (max-width: 600px) { .vclose { right: 8px; top: 50px; } }

/* Videos page: one row per group, 4 across, arrows at the edges of the screen */
.vsec { padding: 40px 0 44px; }
.vsec-head { margin-bottom: 18px; }
.vsec-head h2 { font-size: 1.45rem; margin-bottom: 2px; }
.vsec-head p { color: var(--mute); margin: 0; font-size: 0.95rem; }
.vrow { position: relative; }
.row-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .vcard { flex: 0 0 calc((100% - 14px) / 2); scroll-snap-align: start; }
.row-btn {
  position: absolute; top: calc(50% - 40px); z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: #fff; color: var(--deep);
  box-shadow: 0 8px 20px -8px rgba(10, 46, 74, 0.5), 0 0 0 1px var(--line);
}
.row-btn.prev { left: 6px; }
.row-btn.next { right: 6px; }
.row-btn[hidden] { display: none; }
.row-btn:hover { transform: scale(1.08); }

/* Home "Your coach": short pointers instead of a photo */
.pointers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.pointers li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.pointers b { display: block; font-family: var(--display); font-size: 1.15rem; color: var(--pool); }
.pointers span { color: var(--mute); font-size: 0.93rem; }

/* About: medal photo with its story on top */
.medal-photo { position: relative; aspect-ratio: 3 / 4; }
.medal-photo img { object-position: 50% 25%; }
.medal-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; color: #fff;
  background: linear-gradient(transparent, rgba(5, 24, 40, 0.85)); font-size: 0.95rem;
}
.medal-photo figcaption b { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--sun); }

/* Footer: Slate credit, centred */
.made-by { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 26px auto 0; width: max-content; color: #9DB6C9; font-size: 0.85rem; text-decoration: none; }
.made-by img { height: 52px; width: auto; }
.made-by:hover { text-decoration: none; opacity: 0.9; }
.foot-base { justify-content: center; gap: 22px; }

@media (min-width: 700px) {
  .row-track .vcard { flex-basis: calc((100% - 42px) / 4); }
  .row-track { gap: 14px; }
  .pointers { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .vsec { padding: 48px 0 52px; }
  .row-btn.prev { left: 14px; }
  .row-btn.next { right: 14px; }
}
.vplayer { width: fit-content; height: fit-content; }
.vplayer-in { width: auto; height: auto; }
.vbox { display: inline-block; }
.vplayer-in { display: flex; flex-direction: column-reverse; align-items: center; }
.vtitle { margin: 10px 0 0; }
.vclose { top: 0; }
@media (max-width: 600px) { .vclose { top: 8px; } }
.made-by img { height: 80px; }

/* ---------- v7 (4 Nov 2026): logo now reads "Clementi Swim School Singapore"; a little taller so "Singapore" is readable ---------- */
:root { --head-h: 84px; }
.brand-logo { height: 68px; }
.site-foot .brand-logo { height: 100px; }
@media (min-width: 960px) {
  :root { --head-h: 100px; }
  .brand-logo { height: 84px; }
}

/* ---------- v8 (6 Nov 2026): side-by-side sections, programme videos, 2x2 lessons, maps ---------- */
/* Two sections side by side (Home: coach + get started; About: how we teach + beginner to competitive) */
.two-col { display: grid; gap: 44px; }
.two-col h2 { margin-bottom: 20px; }
.pointers-2 { grid-template-columns: 1fr 1fr; }
.steps-stack { grid-template-columns: 1fr !important; gap: 16px; }
.steps-stack li { padding-top: 14px; }

/* Programmes: a video in each card; buttons always on the same line */
.prog { display: flex; flex-direction: column; align-items: center; }
.prog-video { width: 100%; max-width: 230px; margin: 4px auto 0; }
.prog-video .vcard figcaption { font-size: 0.88rem; color: var(--mute); }
.prog-btns { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.prog .prog-btns .btn { margin-top: 0; min-width: 250px; justify-content: center; }
.btn-line.btn-sm { font-size: 1rem; }

/* Lessons: 2 x 2 */
.lesson-grid { display: grid; gap: 22px; }
.lesson-cell { background: var(--tile); border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; align-items: flex-start; }
.lesson-cell .card-media { aspect-ratio: 16 / 9; width: 100%; margin-bottom: 14px; }
.lesson-cell h2 { font-size: 1.4rem; margin-bottom: 2px; }
.lesson-cell p { color: var(--mute); font-size: 0.97rem; }
.lesson-cell .btn { margin-top: auto; }
.lesson-format .format { width: 100%; padding: 16px 18px; margin-top: 10px; border-radius: 16px; }
.lesson-format .format h3 { font-size: 1.05rem; margin-bottom: 2px; }

/* Learning aids: big, whole pictures (not cropped) */
.gear { grid-template-columns: 1fr 1fr !important; gap: 18px; }
.gear-pic { background: #fff; border: 1px solid var(--line); border-radius: 18px; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 10px; overflow: hidden; }
.gear-pic { position: relative; }
.gear-pic img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
.gear figcaption { font-weight: 600; color: var(--deep); font-size: 1.05rem; text-align: center; }

/* Maps */
.map { margin-top: 20px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--air); }
.map iframe { display: block; width: 100%; height: 340px; border: 0; }

/* About: the cartoon, the 4-step path on one line, the Ask me picture */
.story-pic { margin: 0; max-width: 440px; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.story-pic img { width: 100%; height: auto; display: block; }
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: p; }
.path li { counter-increment: p; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; font-weight: 600; font-size: 0.85rem; line-height: 1.25; position: relative; }
.path li::before { content: counter(p); display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: var(--sun); color: var(--deep); font: 800 0.95rem var(--display); }
.path li + li::after { content: ""; position: absolute; left: -7px; top: 24px; width: 6px; height: 2px; background: var(--pool); }
.askme-pic { display: block; width: 200px; margin-top: 24px; border-radius: 50%; overflow: hidden; transition: transform 0.25s var(--ease); }
.askme-pic:hover { transform: scale(1.04) rotate(-3deg); }
.askme-pic img { width: 100%; height: auto; display: block; }

@media (min-width: 800px) {
  .lesson-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
}
@media (min-width: 1100px) {
  .prog-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 520px) {
  .pointers-2 { grid-template-columns: 1fr; }
  .path { grid-template-columns: 1fr 1fr; }
  .path li + li::after { display: none; }
}

/* ---------- v9 (6 Nov 2026): programmes in one row, blue arrows, bigger story picture ---------- */
/* Arrow buttons: blue so they stand out against light thumbnails */
.row-btn, .car-btn { background: var(--pool); color: #fff; box-shadow: 0 8px 20px -8px rgba(10, 46, 74, 0.6); }
.row-btn:hover, .car-btn:hover { background: var(--deep); }

/* Programmes: all 4 side by side and short enough to fit on one screen */
@media (min-width: 760px) {
  .prog-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 14px; }
  .prog { padding: 18px 12px; }
  .prog h2 { font-size: 1.15rem; }
  .prog > p { font-size: 0.86rem; line-height: 1.4; margin-bottom: 8px; }
  .prog-video { max-width: 150px; }
  .prog-video .vthumb { aspect-ratio: 1; }
  .prog-video .vcard figcaption { font-size: 0.8rem; margin-top: 6px; }
  .prog-btns { padding-top: 12px; gap: 8px; }
  .prog .prog-btns .btn { min-width: 0; width: 100%; font-size: 0.85rem; padding: 10px 10px; }
  .section[aria-label="Programmes"] { padding-top: 28px; }
}

/* About: the Our story picture, much bigger */
.coach:has(.story-pic) { align-items: center; }
.story-pic { max-width: none; width: 100%; }
@media (min-width: 960px) {
  .coach:has(.story-pic) { grid-template-columns: 1.25fr 1fr; gap: 48px; }
}

/* ---------- v10 (6 Nov 2026): moving waves in the home hero ---------- */
.hero { position: relative; }
.hero-grid { position: relative; z-index: 2; padding-bottom: 96px; }
/* soft light ripples drifting across the blue */
.hero-ripples {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
  background:
    radial-gradient(ellipse 60% 40% at 15% 30%, rgba(46, 160, 220, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 70%, rgba(46, 160, 220, 0.28), transparent 70%),
    repeating-radial-gradient(ellipse at 30% 120%, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 26px);
  background-size: 140% 140%, 140% 140%, 100% 100%;
  animation: ripple-drift 18s ease-in-out infinite alternate;
}
@keyframes ripple-drift {
  from { background-position: 0% 0%, 100% 100%, 0 0; }
  to   { background-position: 100% 60%, 0% 40%, 0 -40px; }
}
/* three layers of waves rolling along the bottom edge */
.hero-waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 110px; z-index: 1; pointer-events: none; overflow: hidden; }
.wv { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.wv1 { fill: #1C6FA6; opacity: 0.55; height: 100%; animation: wave-roll 16s linear infinite; }
.wv2 { fill: #2E9BD6; opacity: 0.45; height: 80%; animation: wave-roll 11s linear infinite reverse; }
.wv3 { fill: #fff; height: 55%; animation: wave-roll 8s linear infinite; }
@keyframes wave-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (min-width: 960px) {
  .hero-grid { padding-bottom: 120px; }
  .hero-waves { height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .wv, .hero-ripples { animation: none; }
}

/* ---------- v11 (6 Nov 2026): phone hero, phone slideshows, popping format boxes, picture zoom ---------- */
/* Lessons: the 3 lesson types sit in the 2 x 2 grid on bigger screens */
.lesson-slides { display: contents; }

/* Group or private: boxes that stand out */
.lesson-format .format {
  background: #fff; border: 2px solid var(--pool); border-left-width: 8px;
  box-shadow: 0 14px 30px -16px rgba(14, 111, 174, 0.55); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.lesson-format .format:hover { transform: translateY(-3px); box-shadow: 0 20px 36px -16px rgba(14, 111, 174, 0.65); }
.lesson-format .format h3 { color: var(--pool); font-size: 1.15rem; }
.lesson-format .format + .format { border-color: var(--sun); }
.lesson-format .format + .format h3 { color: var(--deep); }

/* Learning aids: tap to view large */
button.gear-pic { cursor: zoom-in; width: 100%; font: inherit; }
button.gear-pic::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--pool) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6' fill='none' stroke='white' stroke-width='2.4'/%3E%3Cpath d='M15 15l5 5M10.5 7.5v6M7.5 10.5h6' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.zoom { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.zoom::backdrop { background: rgba(5, 18, 30, 0.92); }
.zoom-in { width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 12px 24px; }
.zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.zoom-close { position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--deep); font-size: 1.7rem; line-height: 1; cursor: pointer; }

/* Phone slideshow dots and arrows (added by site.js on phones only) */
.slide-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.slide-nav button.arrow { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--pool); color: #fff; display: grid; place-items: center; cursor: pointer; }
.slide-dots { display: flex; gap: 7px; }
.slide-dots span { width: 8px; height: 8px; border-radius: 50%; background: #BFD3E1; transition: background 0.2s, transform 0.2s; }
.slide-dots span.on { background: var(--pool); transform: scale(1.3); }

@media (max-width: 699px) {
  /* Hero: the class photo becomes the background, everything centred, waves kept */
  .hero { min-height: 560px; display: flex; flex-direction: column; justify-content: center; }
  .hero-grid { position: static; padding-bottom: 110px; }
  .hero-copy { position: relative; z-index: 2; text-align: center; }
  .hero h1, .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .btn-row { justify-content: center; }
  .hero-photo { position: absolute; inset: 0; z-index: 0; margin: 0; width: auto; height: auto; max-width: none; border-radius: 0; aspect-ratio: auto; order: 0; animation: none; z-index: 0 !important; }
  .hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(10, 46, 74, 0.55), rgba(10, 46, 74, 0.8) 70%); }
  .hero-photo figcaption { display: none; }
  .hero-ripples { display: none; }
  .hero-waves { height: 80px; z-index: 3; }
  .hero-copy { z-index: 4; }

  /* Slideshows: one card at a time, swipe or use the arrows */
  .is-slides { display: flex !important; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px 0 10px; scroll-padding-left: 0; }
  .is-slides::-webkit-scrollbar { display: none; }
  .is-slides > * { flex: 0 0 88%; scroll-snap-align: start; opacity: 1 !important; transform: none !important; }
  .lesson-slides.is-slides { margin-bottom: 22px; }
}

/* ---------- v12 (6 Nov 2026): Freddie's notes ---------- */
/* About: 3 steps on one line; Ask me + Learn to swim poster side by side */
.path-3 { grid-template-columns: repeat(3, 1fr) !important; }
.about-pics { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.about-pics .askme-pic { margin-top: 0; width: 180px; flex: none; }
.l2s-poster { margin: 0; flex: 1 1 220px; max-width: 320px; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 30px -16px rgba(10, 46, 74, 0.5); }
.l2s-poster img { width: 100%; height: auto; display: block; }

/* Menu: the 3 video groups, indented under Videos */
.nav .dd-menu a.dd-sub { padding: 6px 12px 6px 26px; font-size: 0.9rem; color: var(--mute); }
.nav .dd-menu a.dd-sub:hover { color: var(--deep); }
.mobile-menu nav a.m-sub2 { font-size: 1.05rem; padding-left: 36px; }

/* Videos page: a darker band behind every other group */
.vsec.section-tile { background: #DCE9F3; }

/* ---------- v13 (6 Nov 2026): stronger copy protection ---------- */
/* No selecting, long-press saving or dragging of anything */
html, body, body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, video, picture, svg { -webkit-user-drag: none; user-drag: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
/* Hide the video download / overflow menu where browsers allow it */
video::-internal-media-controls-download-button { display: none; }
video::-webkit-media-controls-enclosure { overflow: hidden; }
/* Printing or "Save as PDF" shows a note instead of the page */
@media print {
  body * { display: none !important; }
  body::after { content: "This website can't be printed. Please visit clementiswimschool.sg"; display: block; font: 16px sans-serif; padding: 40px; }
}

/* ---------- v14 (6 Nov 2026): 3 video pages; glassy player ---------- */
/* Video pages: a tidy grid (2 across on phones) */
.vpage { padding-top: 36px; }
.vpage .vgrid { gap: 20px 14px; }

/* Player: the page behind turns frosted glass so the video stands out */
.vplayer::backdrop {
  background: rgba(10, 46, 74, 0.32);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}
.vbox video { max-width: min(92vw, 480px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
.vtitle { max-width: 92vw; }
/* Close button: always in the top-right corner of the screen, large and easy to see */
.vclose {
  position: fixed !important; top: 16px !important; right: 16px !important; z-index: 10;
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: #fff; color: var(--deep); font-size: 2rem; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.45);
}
.vclose:hover { transform: scale(1.06); }
@media (max-width: 600px) {
  .vbox video { max-width: 94vw; max-height: calc(100dvh - 170px); }
  .vclose { top: 12px !important; right: 12px !important; width: 48px; height: 48px; }
}
