/* Home Key Music Academy */

:root {
  --cream: #FAF8F3;
  --cream-mid: #F3EDE2;
  --border: rgb(28 53 87 / 0.12);
  --border-strong: rgb(28 53 87 / 0.5);
  --gold: #C9A96E;
  --gold-dark: #8A6628;
  --gold-light: #F5E9D4;
  --navy: #1C3557;
  --navy-mid: #264A76;
  --text: #24282E;
  --text-mid: #4A4F57;
  --white: #FFFFFF;
  --error: #A32020;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1120px;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(28 53 87 / 0.06), 0 12px 32px rgb(28 53 87 / 0.10);
  --shadow-sm: 0 1px 2px rgb(28 53 87 / 0.05), 0 4px 12px rgb(28 53 87 / 0.05);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-mid); }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--gold-light); color: var(--navy); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
:focus-visible { outline: 3px solid var(--navy-mid); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--white); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-block; font: 700 1rem var(--sans); text-decoration: none; text-align: center;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 2px 8px rgb(138 102 40 / 0.25); }
.btn-gold:hover { background: #BB9755; background: color-mix(in oklch, var(--gold), black 9%); color: var(--navy); box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 6px 16px rgb(138 102 40 / 0.3); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-lg { padding: 16px 30px; font-size: 1.0625rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(250 248 243 / 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 20px rgb(28 53 87 / 0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark { flex: none; display: block; }
.brand-mark img { width: auto; height: 54px; }
.brand-text { font: 600 1.25rem var(--serif); line-height: 1.1; }
.brand-text span { display: block; font: 700 0.7rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--navy); text-decoration: none; font-weight: 700; font-size: 0.97rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn)[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; padding: 12px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 24px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--cream-mid); }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head .eyebrow::after { content: ""; display: block; width: 36px; height: 2px; background: var(--gold); margin: 12px auto 0; border-radius: 2px; }
.eyebrow { font: 700 0.78rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--text-mid); }

/* Hero */
.hero { padding: 56px 0 72px; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-mid) 100%); background: radial-gradient(60rem 36rem at 82% 35% in oklch, oklch(0.94 0.045 85 / 0.9), transparent 70%), linear-gradient(180deg, var(--cream) 0%, var(--cream-mid) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; }
.hero-points li { padding-left: 30px; position: relative; margin-bottom: 8px; font-weight: 700; color: var(--navy); }
.hero-points li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 9px; border-left: 3px solid var(--gold-dark); border-bottom: 3px solid var(--gold-dark); transform: rotate(-45deg); }
.hero-jump { display: none; margin-top: 24px; }

.form-card { background: var(--white); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; }
.form-card h2 { font-size: 1.45rem; margin-bottom: 4px; }
.form-card > p { color: var(--text-mid); font-size: 0.98rem; margin-bottom: 18px; }
.form-card > p.form-note { margin: 14px 0 0; }
.cal-embed { min-height: 420px; width: 100%; }
.scheduler-card { margin-top: 32px; padding: 12px; }
.portal-card { max-width: 480px; margin: 32px auto 0; min-height: 260px; }
.book-facts { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.book-facts li { position: relative; padding-left: 26px; }
.book-facts li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 12px; height: 7px; border-left: 2px solid var(--gold-dark); border-bottom: 2px solid var(--gold-dark); transform: rotate(-45deg); }
.cal-fallback { color: var(--text-mid); font-size: 0.95rem; }

/* Trust strip under the hero */
.trust { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-item { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--navy); font-size: 0.98rem; line-height: 1.3; }
.trust-item .icon { flex-shrink: 0; color: var(--gold-dark); width: 26px; height: 26px; }

/* Gentle reveal as sections scroll in. Only when JavaScript is running. */
.js .reveal { opacity: 0; translate: 0 14px; transition: opacity 0.5s ease, translate 0.5s ease; }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

/* Page banner (inner pages) */
.banner { padding: 64px 0 52px; background: var(--cream-mid); background: radial-gradient(50rem 20rem at 50% 0% in oklch, oklch(0.94 0.045 85 / 0.8), transparent 70%), var(--cream-mid); border-bottom: 1px solid var(--border); text-align: center; }
.banner p { max-width: 640px; margin: 0 auto; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; color: var(--navy); margin-bottom: 5px; }
.optional { font-weight: 400; color: var(--text-mid); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--text); background: var(--white);
  border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-mid); outline: 3px solid rgba(38, 74, 118, 0.25); outline-offset: 0; }
.hp-field { position: absolute; left: -9999px; }
.form-note { font-size: 0.86rem; color: var(--text-mid); margin: 12px 0 0; text-align: center; }
.form-error { color: var(--error); font-weight: 700; font-size: 0.95rem; margin: 12px 0 0; }
.form-teacher { background: var(--gold-light); border-radius: 8px; padding: 10px 14px; font-weight: 700; color: var(--navy); font-size: 0.95rem; }
.form-success { background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--radius); padding: 24px; }
.form-success h3 { margin-bottom: 8px; }
.form-success p { margin: 0; }

/* Cards and grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 8px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--white); font: 700 1.15rem var(--serif); margin-bottom: 16px; box-shadow: 0 0 0 5px var(--gold-light); }
.icon-badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: var(--gold-light); color: var(--navy); margin-bottom: 16px; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Pricing */
.price-card { text-align: center; border-top: 3px solid var(--gold); }
.price small { font: 700 0.9rem var(--sans); color: var(--text-mid); margin-left: 4px; }
.price { font: 700 2.6rem var(--serif); color: var(--navy); line-height: 1; margin: 6px 0; }
.price-len { font-weight: 700; color: var(--gold-dark); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.price-card p:not(.price):not(.price-len) { color: var(--text-mid); font-size: 0.98rem; }
.center { text-align: center; }
.mt { margin-top: 32px; }

/* Founder and teachers */
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.split-top { align-items: start; }
.portrait-frame { --outer: 24px; --pad: 8px; padding: var(--pad); border-radius: var(--outer); background: var(--white); border: 1px solid var(--border); box-shadow: var(--shadow); }
.portrait { border-radius: calc(var(--outer) - var(--pad)); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.role { font-weight: 700; color: var(--gold-dark); margin-top: -6px; }
.facts { list-style: none; padding: 0; }
.facts li { padding: 9px 0; border-bottom: 1px solid var(--border); }

/* Towns */
.towns { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 20px; }
.towns li { background: var(--white); box-shadow: var(--shadow-sm); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; font-weight: 700; color: var(--navy); margin: 0; font-size: 0.95rem; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; transition: box-shadow 0.15s; }
.faq details:hover, .faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 18px 48px 18px 22px; font-weight: 700; color: var(--navy); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--gold-dark); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 22px 18px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* Prose pages */
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.note { background: var(--gold-light); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 0 8px 8px 0; }

/* CTA band */
.cta-band { background: var(--navy); background: linear-gradient(120deg in oklch, oklch(0.32 0.07 255), oklch(0.4 0.085 255)); color: var(--white); padding: 64px 0; }
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { margin: 0; color: #D9E1EC; max-width: 560px; }
.cta-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band .btn { flex-shrink: 0; }

/* Footer */
.site-footer { background: #14263F; color: #C9D3E0; padding: 52px 0 28px; font-size: 0.97rem; }
.site-footer a { color: #E8EDF4; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { font: 600 1.3rem var(--serif); color: var(--white); display: flex; align-items: center; gap: 12px; }
.footer-mark { width: auto; height: 56px; }
.footer-head { font-weight: 700; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem; }
.site-footer ul { list-style: none; padding: 0; }
.footer-legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 32px; padding-top: 20px; font-size: 0.88rem; }
.footer-legal p { margin: 0; }

/* Mobile call-to-action bar */
.mobile-cta { display: none; }

@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split .portrait-frame { max-width: 380px; }
  .trust-inner { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 52px 0; }
  .hero { padding: 36px 0 48px; }
  .hero-jump { display: inline-block; }

  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 16px; }

  .mobile-cta {
    display: block; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 40;
    background: var(--gold); color: var(--navy); font-weight: 700; text-align: center; text-decoration: none;
    padding: 15px; border-radius: 999px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, opacity 0.2s;
  }
  .mobile-cta.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
  .has-form .mobile-cta { display: none; }
  body { padding-bottom: 76px; }
  body.has-form { padding-bottom: 0; }
}

@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 22px 18px; }
  .brand-text { font-size: 1.1rem; }
  .brand-mark img { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
  .btn:hover { transform: none; }
  * { transition: none !important; }
}

/* "Coming soon" label next to a card heading (lessons page, instruments) */
.tag-soon { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--gold-light); color: var(--gold-dark); font: 700 0.7rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
