/* ==========================================================
   THEME: colours taken from the J&S logo.
   Change them here and the whole site follows.
   ========================================================== */
:root {
  --navy: #021a48;
  --navy-mid: #0a2a66;
  --navy-deep: #010e2a;
  --gold: #e0a51b;
  --gold-light: #efc04f;
  --paper: #f5f7fb;
  --white: #ffffff;
  --ink: #14203d;
  --muted: #4d5b7a;
  --line: #dfe5f0;
  --danger: #b42318;
  --success: #17794a;

  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Newsreader", Georgia, "Times New Roman", serif;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - var(--gutter) * 2); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; color: var(--navy); margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; margin-bottom: .45em; }
h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: .5rem; }
h3 .sub { display: block; font: 500 .9rem/1.4 var(--font-body); color: var(--muted); letter-spacing: 0; margin-top: .15rem; }

.lead { font-size: 1.2rem; line-height: 1.6; max-width: 52ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.6rem;
  border-radius: 10px; border: 1.5px solid transparent; font: 600 1rem/1 var(--font-body);
  text-decoration: none; cursor: pointer; transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-sm { min-height: 42px; padding: 0 1.2rem; font-size: .95rem; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { border-color: rgba(255, 255, 255, .5); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-mid); }
.btn-whatsapp { background: #25d366; color: #052b14; gap: .55rem; }
.btn-whatsapp:hover { background: #3fe07b; }
.btn-whatsapp svg { fill: currentColor; flex: none; }
.btn[disabled] { opacity: .65; cursor: progress; }

:focus-visible { outline: 3px solid var(--navy-mid); outline-offset: 3px; }
.hero :focus-visible, .contact :focus-visible { outline-color: var(--gold); }

[hidden] { display: none !important; }

/* ---------- Announcement bar ---------- */
.announce { background: var(--gold); color: var(--navy); font-size: .95rem; }
.announce-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .2rem 1.2rem; padding-block: .6rem; }
.announce p { margin: 0; }
.announce a { color: var(--navy); font-weight: 700; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { height: 48px; width: auto; display: block; }
.brand-name { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; color: var(--navy); letter-spacing: -0.01em; }
.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; padding-block: .4rem; border-bottom: 2px solid transparent; }
.menu a:not(.btn):hover { border-bottom-color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.hero h1 { color: var(--white); font-size: clamp(2.8rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: .45em; max-width: 16ch; }
.hero .lead { color: #cfd9f0; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.2rem; }
.motto { margin: 0; font-family: var(--font-head); font-style: italic; font-size: 1.2rem; color: var(--gold); }

.hero-art { margin: 0; container-type: inline-size; }
.symbols { position: relative; aspect-ratio: 520 / 460; }
.symbols::before {
  content: ""; position: absolute; inset: 4% 2%; border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 165, 27, .16), transparent 68%);
}
.sym {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  font-family: "Newsreader", "Cambria Math", "STIX Two Math", Georgia, serif; font-size: calc(var(--s) * 1cqw); line-height: 1;
  color: rgba(255, 255, 255, .92); white-space: nowrap; user-select: none;
  rotate: calc(var(--r) * 1deg); animation: drift var(--t) ease-in-out var(--d) infinite;
}
.sym.gold { color: var(--gold); }
.sym.faint { color: rgba(255, 255, 255, .36); }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2.6cqw; } }

/* ---------- Offer ---------- */
.offer { background: var(--gold); color: var(--navy); padding-block: clamp(36px, 5vw, 60px); }
.offer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.offer h2 { margin: 0 0 .25em; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.offer-head p { margin: 0; font-size: 1.1rem; }
.offer-list { list-style: none; display: flex; gap: clamp(1.5rem, 4vw, 3rem); margin: 0; padding: 0; }
.offer-list li { display: flex; flex-direction: column; }
.offer-list strong { font: 500 clamp(1.4rem, 2.6vw, 2rem)/1.1 var(--font-head); }
.offer-list span { font-size: .98rem; margin-top: .2rem; }

/* ---------- Sections ---------- */
.band { padding-block: clamp(56px, 8vw, 104px); }
.band-paper { background: var(--paper); }
.heading { max-width: 38rem; margin-bottom: clamp(1.6rem, 3.5vw, 2.6rem); }
.heading p { color: var(--muted); font-size: 1.1rem; max-width: 50ch; }
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split .heading { margin-bottom: 0; }
.split .heading .btn { margin-top: .6rem; }

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem); }

/* Grade chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip {
  min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white);
  font: 500 .98rem/1 var(--font-body); color: var(--ink); cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--gold); }

/* Plain lists with a rule */
.rule-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.rule-list li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.note { margin: .9rem 0 0; padding-left: 1rem; border-left: 3px solid var(--gold); color: var(--muted); }

/* Topic columns */
.topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.topics .note { grid-column: 2 / 4; margin: 0; }
.rule-list li .d { display: block; margin-top: .15rem; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.note-caps { margin-top: 2rem; max-width: 60ch; }

/* Principles */
.principle { border-top: 2px solid var(--navy); padding-top: 1rem; }
.principle p { margin: 0; color: var(--muted); }

/* Lesson steps: staircase */
.stairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stair { display: grid; grid-template-columns: 44px 1fr; column-gap: .6rem; padding: 1rem 1.1rem; background: var(--navy); color: #fff; border-radius: var(--radius); position: relative; }
.stair .num { grid-row: span 2; font-family: "Newsreader", Georgia, serif; font-size: 1.9rem; line-height: 1; color: var(--gold); }
.stair h3 { margin: 0 0 .25rem; color: #fff; font-size: 1.05rem; }
.stair p { margin: 0; color: #cfd9f0; font-size: .95rem; line-height: 1.5; }
.stair-last { background: var(--gold); }
.stair-last .num, .stair-last h3 { color: var(--navy); }
.stair-last p { color: var(--navy-deep); }
.stair .star { display: none; }
.stairs-cta { margin: 2rem 0 0; }
@media (min-width: 1100px) {
  .stairs { grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; border-bottom: 4px solid var(--gold); }
  .stair { display: block; padding: 1.2rem 1rem; border-radius: var(--radius) var(--radius) 0 0; min-height: calc(230px + var(--i) * 40px); background: color-mix(in srgb, var(--navy) calc(100% - var(--i) * 4%), var(--navy-mid)); }
  .stair .num { display: block; font-size: 2.6rem; margin-bottom: .6rem; }
  .stair h3 { font-size: 1rem; }
  .stair p { font-size: .88rem; }
  .stair-last { background: var(--gold); }
  .stair-last .star { display: block; position: absolute; right: 14px; top: -40px; width: 34px; height: 34px; fill: var(--gold); }
}

/* ---------- FAQ ---------- */
.faq { border-top: 2px solid var(--navy); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; cursor: pointer; list-style: none;
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 500; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.7rem/1 var(--font-body); color: var(--gold); transition: transform .2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.3rem; color: var(--muted); max-width: 54ch; }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: var(--white); }
.contact h2 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact .lead { color: #cfd9f0; }
.contact-copy .btn-whatsapp { margin-top: 1.4rem; }
.details { margin: 2rem 0 0; display: grid; gap: 1.2rem; }
.details div { border-left: 3px solid var(--gold); padding-left: 1rem; }
.details dt { font-size: .9rem; color: var(--gold); font-weight: 600; }
.details dd { margin: 0; font-size: 1.15rem; }
.details a { color: var(--white); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.details a:hover { color: var(--gold-light); }

.form { background: var(--white); color: var(--ink); border-radius: 16px; padding: clamp(1.4rem, 3.5vw, 2.2rem); }
.field { display: flex; flex-direction: column; margin-bottom: 1rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--navy); }
.form input, .form select, .form textarea {
  font: inherit; color: var(--ink); background: var(--white); padding: .75em .9em; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .15s ease;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--navy); outline: 3px solid rgba(224, 165, 27, .55); outline-offset: 0; }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.error { color: var(--danger); font-size: .85rem; margin-top: .25rem; }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .4rem; }
.form-status { margin: 1rem 0 0; font-weight: 500; min-height: 1.5em; }
.form-status.ok { color: var(--success); }
.form-status.fail { color: var(--danger); }
.form-status a { color: var(--navy); font-weight: 600; }
.form-privacy { margin: .8rem 0 0; font-size: .88rem; color: var(--muted); }

/* Floating WhatsApp button */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #052b14; box-shadow: 0 8px 22px rgba(2, 26, 72, .3);
  transition: transform .18s ease, background-color .18s ease;
}
.wa-float svg { fill: currentColor; }
.wa-float:hover { background: #3fe07b; transform: scale(1.06); }
.wa-float:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding-block: 2.2rem; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.foot img { width: 200px; height: auto; display: block; mix-blend-mode: multiply; }
.foot-text { color: var(--muted); font-size: .95rem; text-align: right; }
.foot-text p { margin: 0 0 .25em; }
.foot-text .copy { margin-top: .8rem; font-size: .88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: flex-start; gap: 1rem;
    padding: 1.2rem var(--gutter) 1.6rem; background: var(--white); border-bottom: 1px solid var(--line);
  }
  .menu.is-open { display: flex; }
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .topics { grid-template-columns: 1fr 1fr; }
  .topics .note { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero-grid, .split, .contact-grid, .cols-2 { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .offer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .offer-list { flex-direction: column; gap: 1rem; }
  .foot-text { text-align: left; }
}
@media (max-width: 640px) {
  .topics { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand-name { font-size: 1.05rem; }
  .brand img { height: 40px; }
  .cols-4 { grid-template-columns: 1fr; }
  .pair, .form-actions { grid-template-columns: 1fr; }
  .wa-float { width: 54px; height: 54px; right: 16px; bottom: 16px; }
  .chip { padding: 0 .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .sym { animation: none; }
}

/* About us dialog */
.menu .nav-link { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-weight: 500; font-size: .96rem; color: var(--ink); cursor: pointer; padding: .4rem 0; }
.menu .nav-link:hover { border-bottom-color: var(--gold); }
.about { border: 0; border-radius: var(--radius); padding: 0; width: min(680px, calc(100% - 32px)); max-height: 88vh; overflow: auto; color: var(--ink); background: var(--white, #fff); }
.about::backdrop { background: rgba(1, 14, 42, .7); }
.about-inner { position: relative; padding: clamp(1.6rem, 4vw, 2.6rem); border-top: 6px solid var(--gold); }
.about h2 { margin-bottom: 1rem; }
.about p { margin: 0 0 1rem; line-height: 1.65; }
.about-close { position: absolute; top: .6rem; right: .9rem; background: none; border: 0; font-size: 2rem; line-height: 1; color: var(--navy); cursor: pointer; }

/* About photo and tutors */
.about-photo { display: block; width: 100%; max-height: 380px; object-fit: cover; object-position: center top; border-radius: 10px; margin-bottom: 1.2rem; background: #fff; }
.tutors { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.tutor { background: var(--paper); border-top: 5px solid var(--gold); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); }
.tutor h3 { margin-bottom: 1rem; color: var(--navy); }
.tutor dt { font-weight: 700; color: var(--navy); margin-top: 1rem; }
.tutor dd { margin: .25rem 0 0; color: var(--muted); line-height: 1.6; }
@media (max-width: 860px) { .tutors { grid-template-columns: 1fr; } }

.menu { gap: 1.1rem; white-space: nowrap; }
.menu .btn-sm { white-space: nowrap; }
@media (max-width: 1180px) and (min-width: 861px) { .menu { gap: .8rem; } .menu a:not(.btn), .menu .nav-link { font-size: .88rem; } }

/* Prices */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.price-card { background: var(--white, #fff); border-top: 5px solid var(--gold); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); }
.price-card h3 { color: var(--navy); margin-bottom: 1rem; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; padding: .8rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { color: var(--muted); font-weight: 600; font-size: .9rem; }
.price-table tbody th { color: var(--navy); white-space: nowrap; }
.price-table td:nth-child(2) { color: var(--navy); font-weight: 700; white-space: nowrap; }
.price-table td:last-child { color: var(--muted); }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }

.tutor-photo { display: block; width: 100%; max-width: 280px; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: center top; border-radius: 10px; margin-bottom: 1.2rem; background: #fff; }
