:root {
  --ink: #173247;
  --text: #435761;
  --paper: #fffaf1;
  --tint: #edf5f2;
  --line: #cfdbd9;
  --accent: #c95f4c;
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 75px; }
body {
  position: relative;
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(78, 127, 143, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 127, 143, .10) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }
h1 { max-width: 760px; margin-bottom: 1.5rem; font-size: clamp(3.4rem, 7vw, 6.2rem); }
h2 { margin-bottom: 1.25rem; font-size: clamp(2.35rem, 4vw, 3.8rem); }
h3 { font-size: 1.2rem; }
.wrap { width: min(90%, var(--max)); margin-inline: auto; }
.eyebrow { margin-bottom: 1rem; color: var(--accent); font-size: .73rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.site-header { position: sticky; z-index: 20; top: 0; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(5%, calc((100% - var(--max)) / 2)); background: rgba(255,253,248,.96); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; text-decoration: none; }
.brand strong { font-family: var(--sans); font-size: .9rem; }
nav { display: flex; align-items: center; gap: 1.8rem; }
nav a { color: var(--ink); font-size: .82rem; font-weight: 600; text-decoration: none; }
nav a:hover { color: var(--accent); }
.nav-enquire { padding: .55rem 1rem; color: white; background: var(--ink); border-radius: 3px; }
.nav-enquire:hover { color: white; background: #24475f; }
.menu-button { display: none; padding: .4rem; color: var(--ink); background: none; border: 0; font: 600 .85rem var(--sans); cursor: pointer; }

.hero { min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; padding-top: 6rem; padding-bottom: 6rem; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(3.2rem, 5.8vw, 5.4rem); }
.hero-text { max-width: 650px; color: var(--text); font-size: 1.1rem; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.button { display: inline-block; padding: .85rem 1.25rem; color: white; background: var(--ink); border: 0; border-radius: 3px; font: 600 .85rem var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { background: #24475f; }
.plain-link { padding: 0; color: var(--ink); background: none; border: 0; font: 600 .85rem var(--sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.hero-testimonials { min-width: 0; padding: 1.6rem; background: rgba(255, 253, 248, .9); border: 1px solid var(--line); box-shadow: 8px 8px 0 rgba(207, 219, 217, .65); }
.testimonial-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.testimonial-topline .eyebrow { margin: 0; }
.testimonial-controls { display: flex; gap: .35rem; }
.testimonial-controls button { width: 31px; height: 31px; padding: 0; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 50%; font: 600 .9rem var(--sans); cursor: pointer; }
.testimonial-controls button:hover, .testimonial-controls button:focus-visible { color: white; background: var(--ink); border-color: var(--ink); }
.testimonial-window { height: clamp(300px, 30vw, 340px); overflow: hidden; }
.testimonial-track { height: 100%; transition: transform .55s cubic-bezier(.22,.7,.25,1); }
.hero-testimonial { height: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; margin: 0; padding: 2rem 0 1.2rem; background: transparent; border: 0; }
.hero-testimonial p { margin: 0; overflow-wrap: anywhere; text-wrap: pretty; font: 500 clamp(1.05rem, 1.35vw, 1.35rem)/1.38 var(--serif); }
.hero-testimonial footer { color: var(--text); font-size: .7rem; font-weight: 600; }
.testimonial-status { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; color: var(--text); font-size: .62rem; font-weight: 700; }
.status-line { height: 2px; overflow: hidden; background: var(--line); }
.status-line i { display: block; width: 33.333%; height: 100%; background: var(--accent); transition: transform .55s cubic-bezier(.22,.7,.25,1); }

.section { padding-top: 7rem; padding-bottom: 7rem; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; }
.tutor-photo-frame {
  width: min(340px, 100%);
  aspect-ratio: 1;
  margin-top: 2.5rem;
  padding: 7px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(23, 50, 71, .10);
}
.tutor-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.body-copy { padding-top: 2.2rem; color: var(--text); }
.edit-note { margin-top: 2rem; padding: 1rem; color: var(--text); background: var(--tint); border-left: 3px solid var(--accent); font-size: .8rem; }
.tutor-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.tutor-facts li { display: flex; flex-direction: column; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.tutor-facts li:nth-child(odd) { padding-right: 1rem; border-right: 1px solid var(--line); }
.tutor-facts li:nth-child(even) { padding-left: 1rem; }
.tutor-facts strong { color: var(--ink); font: 500 1.5rem var(--serif); }
.tutor-facts span { font-size: .7rem; }
.section-tinted {
  background-color: rgba(237, 245, 242, .82);
  background-image:
    linear-gradient(rgba(78, 127, 143, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 127, 143, .10) 1px, transparent 1px);
  background-size: 28px 28px;
}
.section-heading { display: flex; justify-content: space-between; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { max-width: 430px; margin-bottom: .3rem; color: var(--text); }
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.rate-card { padding: 2.2rem; background: var(--paper); border: 1px solid var(--line); }
.rate-card .level { color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rate-card h3 { margin-bottom: .6rem; }
.rate-card > p:not(.level) { min-height: 80px; color: var(--text); font-size: .88rem; }
.price { display: flex; align-items: baseline; gap: .6rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.price strong { font: 500 2.5rem var(--serif); }
.price span { color: var(--text); font-size: .75rem; }
.lesson-details { display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; color: var(--text); font-size: .76rem; }

.section-dark { color: white; background: var(--ink); }
.enquiry-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; }
.enquiry-layout > div:first-child > p:not(.eyebrow) { color: #cad6dc; }
.contact-summary { margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,.22); }
.contact-summary p { display: flex; justify-content: space-between; margin: 0; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.22); font-size: .78rem; }
.contact-summary span { color: #afc0c8; }
.form-panel { padding: 2.5rem; color: var(--ink); background: var(--paper); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; margin-bottom: 1.2rem; font-size: .74rem; font-weight: 700; }
input, select, textarea { width: 100%; margin-top: .4rem; padding: .8rem; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 2px; font: 400 .85rem var(--sans); }
input:focus, select:focus, textarea:focus { outline: 2px solid #9fb9c0; outline-offset: 1px; }
textarea { resize: vertical; }
.error { display: none; margin-top: .2rem; color: #aa3927; font-size: .65rem; }
label.invalid .error { display: block; }
label.invalid input, label.invalid select, label.invalid textarea { border-color: #aa3927; }
.form-note { margin: .8rem 0 0; color: var(--text); font-size: .65rem; }
.success { padding: 5rem 1rem; text-align: center; }
.success h3 { font: 500 2rem var(--serif); }
.success p { color: var(--text); }

.site-footer { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; color: var(--text); font-size: .72rem; }
.site-footer p { margin: 0; }

@media (max-width: 760px) {
  html { scroll-padding-top: 68px; }
  .site-header { height: 68px; }
  .menu-button { display: block; }
  nav { position: absolute; top: 68px; left: 0; right: 0; display: none; padding: 1rem 5% 1.4rem; background: var(--paper); border-bottom: 1px solid var(--line); }
  nav.open { display: grid; }
  nav a { padding: .5rem 0; }
  .nav-enquire { padding: .5rem 0; color: var(--ink); background: none; }
  .hero, .two-column, .enquiry-layout { grid-template-columns: 1fr; }
  .hero { min-height: 0; gap: 4rem; padding-top: 5rem; padding-bottom: 5rem; }
  .hero-testimonials { width: min(100%, 480px); }
  .testimonial-window { height: 320px; }
  .section { padding-top: 5rem; padding-bottom: 5rem; }
  .body-copy { padding-top: 0; }
  .tutor-photo-frame { width: min(300px, 82vw); margin-top: 2rem; }
  .section-heading { display: block; }
  .section-heading h2 { margin-bottom: 1rem; }
  .rate-grid { grid-template-columns: 1fr; }
  .rate-card > p:not(.level) { min-height: auto; }
  .lesson-details { flex-wrap: wrap; justify-content: flex-start; }
  .lesson-details span { width: calc(50% - .5rem); }
  .form-panel { padding: 1.5rem; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding-top: 2.5rem; padding-bottom: 2.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 3.35rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .lesson-details span { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
