:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #637083;
  --line: #d9e0e7;
  --paper: #fbfaf7;
  --white: #ffffff;
  --sage: #5e7667;
  --sage-dark: #344c40;
  --gold: #c5914a;
  --blue: #335c81;
  --rose: #9b5d5f;
  --shadow: 0 18px 50px rgba(29, 40, 52, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1b67a0;
  outline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(217, 224, 231, 0.8);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--sage-dark);
  color: var(--white);
  font-size: 0.8rem;
}

nav {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  font-size: 0.95rem;
  font-weight: 700;
}

nav a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: min(760px, calc(92vh - 68px));
  display: flex;
  align-items: end;
  overflow: hidden;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  inset: -25% 0 auto;
  width: 100%;
  height: 125%;
  object-fit: cover;
  object-position: center top;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(17, 24, 32, 0.82), rgba(17, 24, 32, 0.52) 45%, rgba(17, 24, 32, 0.12));
}

.hero-content {
  position: relative;
  width: min(760px, 100%);
  padding: 0 clamp(20px, 6vw, 80px) clamp(72px, 12vh, 120px);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: #f4c573;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-title {
  max-width: 820px;
  text-wrap: initial;
}

.hero-title span {
  display: block;
}

.hero-title span + span {
  margin-top: 0.12em;
}

.hero-title span:last-child {
  white-space: nowrap;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.95rem, 3.4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  line-height: 1.22;
}

p {
  margin-top: 0;
}

.hero-copy {
  width: min(620px, 100%);
  margin: 24px 0 30px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions,
.form-row,
.with-action,
footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.not-found {
  display: grid;
  min-height: 100vh;
  max-width: 720px;
  align-content: center;
  justify-items: start;
  margin: 0 auto;
  padding: clamp(32px, 8vw, 96px);
}

.not-found h1 {
  color: var(--sage-dark);
  font-size: clamp(2.5rem, 8vw, 5rem);
}

.not-found p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.1rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button.primary {
  background: var(--gold);
  color: #15100a;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.button.small {
  min-height: 36px;
  padding: 0 12px;
  background: var(--sage-dark);
  color: var(--white);
}

.button.wide {
  width: 100%;
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 4vw, 54px);
  scroll-margin-top: 88px;
}

.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.split,
.rates-layout,
.app-layout,
.tidycal-layout {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
}

.split,
.rates-layout,
.app-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: start;
}

.intro-band,
.application-band {
  background: var(--white);
}

.teacher-layout {
  display: grid;
  grid-template-columns: clamp(180px, 36vw, 418px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 88px);
}

.teacher-photo-frame {
  position: relative;
  grid-row: span 2;
  padding: 0 18px 18px 0;
}

.teacher-photo-frame::after {
  position: absolute;
  z-index: 0;
  inset: 18px 0 0 18px;
  border-radius: 8px;
  background: #e3ece5;
  content: "";
}

.teacher-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 28%;
  box-shadow: var(--shadow);
}

.teacher-layout > .quick-facts {
  margin-top: 32px;
}

.quick-facts,
.rate-table,
.form-panel,
.schedule-panel,
.tidycal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.quick-facts div,
.rate-table div {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.quick-facts div:last-child {
  border-right: 0;
}

.quick-facts strong,
.quick-facts span {
  display: block;
}

.quick-facts strong,
.rate-table strong {
  color: var(--sage-dark);
}

.quick-facts span {
  margin-top: 8px;
  color: var(--muted);
}

.section-heading {
  width: min(720px, 100%);
  margin-bottom: 36px;
}

.section-heading p:last-child {
  margin-bottom: 0;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.lesson-card {
  min-height: 240px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.icon-pill {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 50%;
  background: #eaf0eb;
  color: var(--sage-dark);
  font-size: 1.3rem;
  font-weight: 800;
}

.rates-band {
  background: #edf2f4;
}

.rates-layout {
  align-items: center;
}

.rate-table {
  width: min(100%, 440px);
  justify-self: end;
}

.pay-band {
  background: var(--white);
}

.pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: clamp(28px, 8vw, 104px);
}

.payment-placeholder {
  color: var(--muted);
  font-size: 0.92rem;
}

.payment-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f6;
  box-shadow: var(--shadow);
}

.paypal-qr {
  display: block;
  width: min(280px, 100%);
  height: auto;
  border-radius: 4px;
  background: var(--white);
}

.rate-table div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 26px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.rate-table div:last-child {
  border-bottom: 0;
}

.form-panel,
.schedule-panel {
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d2dc;
  border-radius: 6px;
  padding: 12px 13px;
  background: var(--white);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.form-panel {
  display: grid;
  gap: 16px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--sage-dark);
  font-weight: 700;
}

.form-message.is-error {
  color: #8c2f39;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-note a,
footer a {
  text-underline-offset: 3px;
}

.scheduler-band {
  background: #f6f1ea;
}

.tidycal-layout {
  grid-template-columns: minmax(260px, 0.45fr) minmax(480px, 1fr);
  align-items: start;
}

.booking-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding-left: 20px;
  color: var(--muted);
}

.booking-steps li::marker {
  color: var(--sage-dark);
  font-weight: 800;
}

.availability-note {
  display: grid;
  gap: 5px;
  margin: 0 0 22px;
  padding: 16px;
  border-radius: 8px;
  background: #eef4ef;
}

.availability-note span {
  color: var(--muted);
}

.tidycal-card {
  overflow: hidden;
  padding: 20px;
}

.booking-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.booking-type-tab {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 13px;
  background: #f7f8f6;
  color: var(--sage-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.booking-type-tab.is-active,
.booking-type-tab[aria-selected="true"] {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
  color: var(--white);
}

.tidycal-embed-block {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.tidycal-embed-block:first-of-type {
  border-top: 0;
}

.tidycal-embed-block p {
  margin: 0 0 18px;
  color: var(--muted);
}

.booking-panel {
  height: var(--booking-visible-height, 700px);
  overflow: hidden;
  background: var(--white);
}

.tidycal-embed {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 700px;
}

.scheduler-fallback {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.scheduler-fallback a {
  color: var(--sage-dark);
  font-weight: 700;
}

footer {
  justify-content: center;
  padding: 28px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .section {
    scroll-margin-top: 120px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .split,
  .rates-layout,
  .app-layout,
  .pay-layout,
  .tidycal-layout,
  .lesson-grid,
  .quick-facts {
    grid-template-columns: 1fr;
  }

  .quick-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rate-table {
    width: 100%;
    justify-self: stretch;
  }

  .quick-facts div:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: min(700px, calc(92vh - 106px));
  }

  .tidycal-card {
    order: 1;
  }

  .schedule-panel {
    order: 2;
  }
}

@media (max-width: 680px) {
  .teacher-layout {
    grid-template-columns: clamp(110px, 34vw, 220px) minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(18px, 4vw, 28px);
    row-gap: 28px;
  }

  .teacher-copy {
    display: contents;
  }

  .teacher-heading {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .teacher-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .teacher-bio {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 0;
  }

  .teacher-photo-frame {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding: 0 12px 12px 0;
  }

  .teacher-photo-frame::after {
    inset: 12px 0 0 12px;
  }

  .teacher-photo {
    aspect-ratio: 1 / 1;
    object-position: center 22%;
  }

  .teacher-layout > .quick-facts {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0;
  }
}

@media (max-width: 560px) {

  .hero-title span:last-child {
    font-size: 0.85em;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(17, 24, 32, 0.86), rgba(17, 24, 32, 0.38));
  }

  .form-row.two {
    grid-template-columns: 1fr;
  }

  .tidycal-card {
    padding: 14px;
  }

  .tidycal-embed {
    min-height: 640px;
  }

  .booking-panel {
    height: var(--booking-visible-height, 640px);
  }
}
