/* ============================================
   HARMONIC PULSE ACADEMY — DESIGN SYSTEM (WHITE THEME)
   Palette: white background, deep ink-teal for text/
   headings, mahogany clay + brass as accents.
   Signature motif: the "pulse line" — a waveform rule
   used as a section divider, echoing the academy's name.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --white: #ffffff;         /* primary site background */
  --off-white: #f7f6f2;     /* card / panel background, still white-family */
  --ink: #17302f;           /* deep ink-teal — ALL heading/body text, never a background */
  --ink-soft: #3d5654;      /* softer ink for secondary text on white */
  --clay: #a85c32;          /* mahogany / clay accent */
  --clay-dark: #8a4a27;
  --brass: #c9a15c;         /* brass gold accent */
  --sage: #7c9a82;          /* soft sage, success/active */
  --charcoal: #26211c;      /* body text on light */
  --charcoal-soft: #55504a;
  --line: rgba(23, 48, 47, 0.14);   /* hairline borders, visible on white */
  --line-soft: rgba(23, 48, 47, 0.08);

  /* Type */
  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-w: 1180px;
  --radius: 4px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 var(--space-2);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 var(--space-2); color: var(--charcoal-soft); }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------- Pulse line (signature divider) ---------- */
.pulse-line {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  margin: var(--space-4) 0;
  opacity: 0.9;
}
.pulse-line span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--clay);
}
/* kept for markup compatibility — on-dark now simply uses the same
   visible clay/brass tone, since no section is dark anymore */
.pulse-line.on-dark span { background: var(--clay); }
.pulse-line span:nth-child(1) { height: 30%; }
.pulse-line span:nth-child(2) { height: 70%; }
.pulse-line span:nth-child(3) { height: 45%; }
.pulse-line span:nth-child(4) { height: 100%; }
.pulse-line span:nth-child(5) { height: 55%; }
.pulse-line span:nth-child(6) { height: 80%; }
.pulse-line span:nth-child(7) { height: 35%; }
.pulse-line span:nth-child(8) { height: 60%; }
.pulse-line span:nth-child(9) { height: 25%; }
.pulse-line span:nth-child(10) { height: 90%; }
.pulse-line span:nth-child(11) { height: 40%; }
.pulse-line span:nth-child(12) { height: 65%; }

@media (prefers-reduced-motion: no-preference) {
  .pulse-line.animated span {
    animation: pulse-beat 1.8s ease-in-out infinite;
  }
  .pulse-line.animated span:nth-child(odd) { animation-delay: 0.15s; }
  .pulse-line.animated span:nth-child(3n) { animation-delay: 0.3s; }
  @keyframes pulse-beat {
    0%, 100% { transform: scaleY(0.7); }
    50% { transform: scaleY(1); }
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--clay); color: var(--white); }
.btn-primary:hover { background: var(--clay-dark); }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
/* on-dark ghost buttons now sit on white too — keep them visible with ink border/text */
.btn-ghost.on-dark { border-color: var(--ink); color: var(--ink); }
.btn-brass { background: var(--brass); color: var(--ink); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}
.brand span { color: var(--clay); }
.main-nav { display: flex; gap: var(--space-3); align-items: center; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--charcoal-soft);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); border-color: var(--clay); }
/* The nav link color rule above is more specific than .btn-primary alone,
   so it was silently overriding the "Book a Lesson" button's white text
   with dark text on a clay background. This restores it explicitly. */
.main-nav a.btn-primary,
.main-nav a.btn-primary:hover {
  color: var(--white);
  border-bottom: none;
}
.nav-toggle { display: none; }

/* ---------- Hero (now white, not a dark band) ---------- */
.hero {
  background: var(--white);
  color: var(--charcoal);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: center;
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}
.hero .eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--clay-dark);
  margin-bottom: var(--space-2);
}
.hero h1 { color: var(--ink); }
.hero p.lead {
  color: var(--charcoal-soft);
  font-size: 1.1rem;
  max-width: 42ch;
}
.hero-cta { display: flex; gap: var(--space-2); margin-top: var(--space-3); flex-wrap: wrap; }
.hero-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 280px;
  gap: 4px;
  padding: var(--space-3);
  background: var(--off-white);
  border-radius: var(--radius);
}
.hero-visual span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--brass), var(--clay));
  transform-origin: bottom;
}
/* irregular heights so it reads as a waveform, not a bar chart */
.hero-visual span:nth-child(1) { height: 30%; }
.hero-visual span:nth-child(2) { height: 60%; }
.hero-visual span:nth-child(3) { height: 42%; }
.hero-visual span:nth-child(4) { height: 85%; }
.hero-visual span:nth-child(5) { height: 50%; }
.hero-visual span:nth-child(6) { height: 100%; }
.hero-visual span:nth-child(7) { height: 38%; }
.hero-visual span:nth-child(8) { height: 70%; }
.hero-visual span:nth-child(9) { height: 55%; }
.hero-visual span:nth-child(10) { height: 90%; }
.hero-visual span:nth-child(11) { height: 45%; }
.hero-visual span:nth-child(12) { height: 65%; }
.hero-visual span:nth-child(13) { height: 35%; }
.hero-visual span:nth-child(14) { height: 78%; }
.hero-visual span:nth-child(15) { height: 48%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-visual span { animation: pulse-tall 2.6s ease-in-out infinite; }
  .hero-visual span:nth-child(odd) { animation-delay: 0.2s; }
  .hero-visual span:nth-child(3n) { animation-delay: 0.4s; }
}
@keyframes pulse-tall {
  0%, 100% { transform: scaleY(0.7); }
  50% { transform: scaleY(1); }
}

/* ---------- Sections ---------- */
section { padding: var(--space-5) 0; }
.section-heading { max-width: 60ch; margin-bottom: var(--space-4); }
.section-heading .eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--clay);
  margin-bottom: var(--space-1);
  display: block;
}

/* section-dark renamed in spirit to "section-tinted" — a very light
   off-white band instead of a dark one, so it still reads as a
   distinct section without ever hiding text */
.section-dark {
  background: var(--off-white);
  color: var(--charcoal);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-dark h2, .section-dark h3 { color: var(--ink); }
.section-dark p { color: var(--charcoal-soft); }

/* ---------- Grids / Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--clay); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin-bottom: 0; font-size: 0.94rem; }

.service-card, .level-card {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.service-card h3, .level-card h3 { color: var(--clay-dark); }

/* ---------- Tables (fees) ---------- */
.fees-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.fees-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  background: var(--white);
}
table.fees-table th, table.fees-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--charcoal);
}
table.fees-table th {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: var(--charcoal-soft);
  background: var(--off-white);
}
table.fees-table td.price {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--clay-dark);
}

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: var(--space-2); }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--charcoal);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: 0.85rem; color: var(--charcoal-soft); }
.form-status {
  margin-top: var(--space-2);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.success { background: rgba(124,154,130,0.18); color: #33513a; }
.form-status.error { background: rgba(168,92,50,0.14); color: var(--clay-dark); }

/* ---------- Fee finder (interactive) ---------- */
.fee-finder {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}
.fee-result {
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: var(--off-white);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  color: var(--charcoal);
}
.fee-result .amount { font-size: 1.6rem; color: var(--clay-dark); font-weight: 500; }

/* ---------- Testimonials ---------- */
.testimonial-card { background: var(--off-white); border-left: 3px solid var(--brass); padding: var(--space-3); border-radius: var(--radius); }
.testimonial-card .quote { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
.testimonial-card .who { font-size: 0.85rem; color: var(--charcoal-soft); margin-top: var(--space-2); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2); }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--off-white); border: 1px solid var(--line); }
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; }
.gallery-item .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(23,48,47,0.85));
  color: var(--white);
  font-size: 0.82rem;
}

/* ---------- Footer (now white, not a dark band) ---------- */
.site-footer {
  background: var(--white);
  color: var(--charcoal-soft);
  padding: var(--space-4) 0 var(--space-3);
  border-top: 1px solid var(--line);
}
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-4); }
.site-footer h4 { color: var(--ink); font-size: 0.95rem; margin-bottom: var(--space-2); }
.site-footer a { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--charcoal-soft); }
.site-footer a:hover { color: var(--clay-dark); }
.footer-bottom {
  max-width: var(--max-w);
  margin: var(--space-3) auto 0;
  padding: var(--space-2) var(--space-3) 0;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  color: var(--charcoal-soft);
}

/* ---------- Page header (interior pages) — now white ---------- */
.page-header {
  background: var(--white);
  color: var(--charcoal);
  padding: var(--space-4) 0 var(--space-3);
  border-bottom: 1px solid var(--line);
}
.page-header h1 { color: var(--ink); font-size: clamp(2rem, 4vw, 2.8rem); }
.page-header p { color: var(--charcoal-soft); max-width: 60ch; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.loading-text, .empty-text, .error-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  padding: var(--space-2) 0;
}
.error-text { color: var(--clay-dark); }
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  background: var(--off-white);
  color: var(--charcoal-soft);
  border: 1px solid var(--line);
}
.badge.status-new { background: rgba(201,161,92,0.2); color: var(--clay-dark); border-color: rgba(201,161,92,0.4); }
.badge.status-contacted { background: rgba(124,154,130,0.2); color: #33513a; border-color: rgba(124,154,130,0.4); }
.badge.status-closed { background: var(--off-white); color: var(--charcoal-soft); }