/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #F1F6F6;
  --bg-alt: #E6EFEE;
  --surface: #FFFFFF;

  --ink: #16232B;
  --ink-soft: #47565E;
  --ink-faint: #7B8A90;

  --teal: #0F7173;
  --teal-dark: #0B5557;
  --amber: #E2711D;
  --amber-dark: #B65613;
  --violet: #6C4675;

  --border: #D7E3E2;

  --font-display: 'Frank Ruhl Libre', serif;
  --font-body: 'Heebo', sans-serif;

  --radius: 14px;
  --container: 1140px;
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.25;
}

h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; text-align: center; }

p { color: var(--ink-soft); max-width: 68ch; }

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

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

.section-title { margin-bottom: 32px; }

.skip-link {
  position: absolute;
  right: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus {
  right: 12px;
  top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-2px); }

.btn-outline {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: transparent;
}
.btn-outline:hover {
  background: var(--teal);
  color: #fff;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241, 246, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 24px 20px;
}

.header-top {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-whatsapp {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
}
.header-whatsapp svg { width: 34px; height: 34px; }

.logo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  direction: ltr;
}

.logo-plain {
  font-family: var(--font-body);
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.logo-script {
  font-family: 'Caveat', cursive;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.main-nav { display: flex; gap: 40px; font-weight: 500; flex-wrap: wrap; justify-content: center; }

.main-nav a { position: relative; padding: 6px 0; }
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

/* WhatsApp floating button */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(22, 35, 43, 0.25);
}
.whatsapp-fab svg { width: 52px; height: 52px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  text-align: center;
}

.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials { padding: 72px 0; background: var(--surface); }

.testimonial-slider {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  min-height: 260px;
}

.testimonial-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.testimonial-slide.is-active {
  display: flex;
  animation: fade-in 0.25s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.testimonial-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-alt);
}

.testimonial-photo--empty {
  display: block;
  background: var(--bg-alt) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='38' r='18' fill='%23C7D2D3'/><path d='M15 92c0-22 16-38 35-38s35 16 35 38' fill='%23C7D2D3'/></svg>") center / 60% no-repeat;
}

.testimonial-slide blockquote { margin: 0; }
.testimonial-slide blockquote p { margin: 0 auto 12px; }
.testimonial-slide footer { font-weight: 600; color: var(--teal-dark); }

.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.testimonial-arrow {
  background: none;
  border: 1px solid var(--border);
  color: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.testimonial-arrow:hover { background: var(--bg-alt); border-color: var(--teal); }

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 280px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
}
.dot.active { background: var(--amber); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery { padding: 72px 0; }

.gallery-grid {
  column-count: 4;
  column-gap: 12px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 12px;
  border-radius: var(--radius);
  break-inside: avoid;
}

@media (max-width: 900px) {
  .gallery-grid { column-count: 3; }
}

/* ==========================================================================
   About (image background)
   ========================================================================== */
.section-banner img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.about {
  padding: 72px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.about-inner p {
  color: var(--ink);
  max-width: none;
  margin: 0 0 14px;
}

/* ==========================================================================
   My way / Marathons
   ========================================================================== */
.my-way, .marathons {
  padding: 72px 0;
}

.my-way { background: var(--surface); }

.my-way p, .marathons p { max-width: 74ch; margin-left: auto; margin-right: auto; text-align: center; }

.my-way strong { font-weight: 700; color: var(--ink); }

.accent-text {
  color: var(--amber-dark);
  font-weight: 700;
}

.marathons-lead {
  font-weight: 600;
  color: var(--teal-dark);
}

.marathons p:last-of-type { font-weight: 500; margin-bottom: 40px; }

.course-links {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.course-links h3 {
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.course-links { scroll-margin-top: 140px; }

.course-group-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin: 28px 0 10px;
}

.course-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.course-link-row:last-child,
.course-link-row:has(+ .course-group-title) { border-bottom: 1px solid var(--border); }

.course-link-name { font-weight: 500; color: var(--ink); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: var(--ink); color: #fff; padding: 80px 0; text-align: center; }
.contact h2 { color: #fff; }
.contact-email {
  margin-left: auto;
  margin-right: auto;
}

.contact-email a {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
}

.contact-form {
  max-width: 480px;
  margin: 32px auto 0;
  display: grid;
  gap: 10px;
  text-align: right;
}

.contact-form label {
  font-size: 0.9rem;
  color: #C7D2D3;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.contact-form .btn { margin-top: 8px; justify-self: center; }

.form-success {
  color: var(--teal);
  font-weight: 600;
  margin-top: 10px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-alt);
  padding: 20px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Accessibility statement + toolbar
   ========================================================================== */
.accessibility { padding: 64px 0; background: var(--bg-alt); }
.accessibility p { max-width: 74ch; margin: 0 auto 16px; text-align: center; }
.accessibility-meta { font-size: 0.85rem; color: var(--ink-faint); }

.a11y-fab {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 95;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #2E7FE0;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(22, 35, 43, 0.25);
}
.a11y-fab svg { width: 26px; height: 26px; }

.a11y-panel {
  position: fixed;
  bottom: 144px;
  right: 24px;
  z-index: 95;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  width: 220px;
  box-shadow: 0 12px 28px rgba(22, 35, 43, 0.18);
  display: none;
  gap: 8px;
}

.a11y-panel.open { display: grid; }

.a11y-panel h3 { font-size: 1rem; margin-bottom: 4px; }

.a11y-panel button {
  text-align: right;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
}
.a11y-panel button:hover { background: var(--bg-alt); }

.a11y-statement-link {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--teal-dark);
  text-decoration: underline;
  margin-top: 4px;
}

.footer-a11y-link { color: var(--teal-dark); text-decoration: underline; }

/* Accessibility modes toggled on <html> */
html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-contrast .site-header,
html.a11y-contrast .about,
html.a11y-contrast .courses,
html.a11y-contrast .testimonials,
html.a11y-contrast .my-way,
html.a11y-contrast .marathons,
html.a11y-contrast .accessibility,
html.a11y-contrast .site-footer { background: #000 !important; color: #fff !important; }
html.a11y-contrast p,
html.a11y-contrast h1,
html.a11y-contrast h2,
html.a11y-contrast h3,
html.a11y-contrast li,
html.a11y-contrast span { color: #fff !important; }
html.a11y-contrast a { color: #ffd54a !important; }

html.a11y-underline a { text-decoration: underline !important; }

/* ==========================================================================
   Focus states
   ========================================================================== */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 760px) {
  .logo-script { font-size: 1.9rem; }
  .logo-plain { font-size: 0.7rem; }
  .header-whatsapp svg { width: 26px; height: 26px; }
  .main-nav { gap: 24px; }

  .hero { min-height: 260px; }

  .gallery-grid { column-count: 2; }
  .section-banner img { height: 200px; }
  .course-link-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
