:root {
  --paper: #f5f1e8;
  --paper-deep: #ebe5d8;
  --ink: #183b32;
  --ink-soft: #52645d;
  --forest: #173f35;
  --forest-light: #28594b;
  --clay: #b85f3f;
  --clay-dark: #93472f;
  --sage: #dce4d7;
  --white: #fffdf8;
  --line: #d4d0c4;
  --display: Georgia, "Times New Roman", serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 70px rgba(20, 45, 38, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 4px; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: currentColor; stroke: none; }
.brand span { font-family: var(--display); font-size: 25px; line-height: 1; letter-spacing: -0.5px; }
.brand em { font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a { font-size: 14px; font-weight: 650; text-decoration: none; text-underline-offset: 5px; }
.main-nav a:hover { text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr); gap: clamp(48px, 8vw, 110px); align-items: center; padding-block: 64px 72px; }
.eyebrow { margin: 0 0 18px; color: var(--clay-dark); font-size: 11px; font-weight: 750; letter-spacing: 0.18em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; }
h1 { max-width: 720px; margin-bottom: 24px; font-size: clamp(54px, 6.2vw, 88px); line-height: 0.98; letter-spacing: -0.055em; }
.hero-intro { max-width: 530px; margin-bottom: 30px; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; border: 1px solid transparent; border-radius: 2px; padding: 12px 22px; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color 160ms ease, color 160ms ease, transform 160ms ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--forest); color: var(--white); }
.button-primary:hover { background: var(--forest-light); }
.button:disabled { background: #a6aaa3; color: #fff; cursor: not-allowed; transform: none; }
.hero-note { margin: 18px 0 0; color: var(--ink-soft); font-size: 12px; }
.hero-note span { margin-inline: 8px; color: var(--clay); }

.next-class { position: relative; min-height: 430px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 32px; background: var(--forest); color: var(--white); }
.sprig { position: absolute; width: 230px; height: 288px; top: -12px; right: -30px; fill: none; stroke: #6f8c79; stroke-width: 1.2; stroke-linecap: round; opacity: 0.55; }
.sprig circle { fill: #6f8c79; stroke: none; }
.panel-label { position: relative; margin: 0; color: #d9e2d8; font-size: 11px; font-weight: 700; letter-spacing: 0.17em; text-transform: uppercase; }
.next-date { position: relative; margin: 24px 0 34px; font-family: var(--display); font-size: 22px; }
.next-details { position: relative; }
.next-details h2 { max-width: 280px; margin-bottom: 8px; font-size: 38px; line-height: 1.08; letter-spacing: -0.035em; }
.next-details p { margin-bottom: 6px; color: #d9e2d8; font-size: 14px; }
.next-details .next-spots { margin: 18px 0; color: var(--white); font-size: 12px; font-weight: 700; }
.button-light { width: 100%; background: var(--white); color: var(--forest); }
.button-light:hover { background: var(--sage); }
.button-light:disabled { background: #91a098; color: #eef1eb; }

.schedule-section { padding-block: 68px 76px; background: var(--white); border-block: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2, .studio-intro h2 { margin: 0; font-size: clamp(38px, 4vw, 54px); line-height: 1.05; letter-spacing: -0.04em; }
.schedule-note { margin: 0 0 5px; color: var(--ink-soft); font-size: 12px; text-align: right; }
.filter-bar { display: flex; align-items: center; gap: 22px; padding-block: 16px; border-block: 1px solid var(--line); }
.filter-label { flex: 0 0 auto; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { min-height: 38px; border: 1px solid transparent; border-radius: 30px; padding: 7px 15px; background: transparent; color: var(--ink-soft); font-size: 13px; cursor: pointer; }
.filter-button:hover { border-color: var(--line); color: var(--ink); }
.filter-button[aria-pressed="true"] { background: var(--sage); color: var(--forest); font-weight: 700; }
.results-status { margin: 22px 0 10px; color: var(--ink-soft); font-size: 12px; }
.class-list { border-top: 1px solid var(--ink); }
.class-row { display: grid; grid-template-columns: 112px minmax(190px, 1.35fr) minmax(180px, 1fr) 100px 132px; gap: 24px; align-items: center; padding: 25px 0; border-bottom: 1px solid var(--line); }
.class-date { display: flex; align-items: baseline; gap: 9px; }
.class-date strong { font-family: var(--display); font-size: 38px; font-weight: 400; line-height: 1; }
.class-date span { color: var(--ink-soft); font-size: 11px; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.08em; }
.class-name { margin: 0 0 3px; font-family: var(--display); font-size: 24px; font-weight: 400; line-height: 1.2; }
.class-instructor, .class-duration { margin: 0; color: var(--ink-soft); font-size: 13px; }
.class-time { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.spots { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.spots::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5e8064; }
.spots.low { color: var(--clay-dark); }
.spots.low::before { background: var(--clay); }
.spots.full::before { background: #888; }
.book-button { width: 100%; min-height: 44px; border: 1px solid var(--forest); background: transparent; color: var(--forest); font-size: 13px; font-weight: 700; cursor: pointer; }
.book-button:hover { background: var(--forest); color: var(--white); }
.book-button:disabled { border-color: var(--line); color: #7c817c; background: transparent; cursor: not-allowed; }
.empty-state { padding: 48px 24px; text-align: center; border-bottom: 1px solid var(--line); }
.empty-state h3 { margin-bottom: 6px; font-family: var(--display); font-size: 26px; font-weight: 400; }
.empty-state p { color: var(--ink-soft); }
.text-button { border: 0; padding: 4px 0; background: none; color: var(--clay-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.studio-section { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(48px, 8vw, 110px); padding-block: 80px; }
.studio-intro h2 { max-width: 390px; }
.studio-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.studio-points article { border-top: 1px solid var(--ink); padding-top: 18px; }
.point-number { color: var(--clay-dark); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; }
.studio-points h3 { margin: 28px 0 10px; font-family: var(--display); font-size: 22px; font-weight: 400; line-height: 1.2; }
.studio-points p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.site-footer { background: var(--forest); color: var(--white); }
.footer-inner { min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 0; color: #c7d3ca; font-size: 12px; }
.footer-inner > a:last-child { font-size: 13px; font-weight: 700; text-underline-offset: 5px; }

.booking-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 3px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.booking-dialog::backdrop { background: rgba(13, 35, 29, 0.68); backdrop-filter: blur(3px); }
.dialog-shell { position: relative; padding: 40px; }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.dialog-close:hover { background: var(--paper-deep); }
.dialog-close svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.dialog-shell .eyebrow { margin-bottom: 10px; }
.dialog-shell h2 { margin-bottom: 22px; padding-right: 24px; font-size: 40px; line-height: 1.1; letter-spacing: -0.035em; }
.booking-class { margin-bottom: 26px; padding: 18px 20px; border-left: 3px solid var(--clay); background: var(--paper-deep); }
.booking-class h3 { margin: 0 0 4px; font-family: var(--display); font-size: 23px; font-weight: 400; }
.booking-class p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.field input { width: 100%; min-height: 50px; border: 1px solid #aaa99f; border-radius: 2px; padding: 11px 13px; background: var(--white); color: var(--ink); }
.field input::placeholder { color: #777d77; }
.field input:focus { border-color: var(--forest); outline: 3px solid rgba(184, 95, 63, 0.25); outline-offset: 1px; }
.submit-button { width: 100%; margin-top: 4px; }
.privacy-note { margin: 13px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; text-align: center; }
.form-error { margin: 0 0 14px; padding: 10px 12px; background: #f4dfd6; color: #7d3525; font-size: 13px; }
.confirmation { text-align: center; }
.confirmation-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: var(--sage); }
.confirmation-mark svg { width: 32px; height: 32px; fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.confirmation h2 { padding: 0; margin-bottom: 12px; }
.confirmation > p:not(.eyebrow):not(.privacy-note):not(.reference) { color: var(--ink-soft); }
.confirmation-details { margin: 24px 0 16px; padding: 18px; border-block: 1px solid var(--line); text-align: left; }
.confirmation-details strong { display: block; margin-bottom: 4px; font-family: var(--display); font-size: 22px; font-weight: 400; }
.confirmation-details span { display: block; color: var(--ink-soft); font-size: 13px; }
.reference { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.confirmation .button { width: 100%; margin-top: 24px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 330px; gap: 40px; }
  h1 { font-size: 58px; }
  .class-row { grid-template-columns: 90px 1.2fr 1fr 110px; gap: 18px; }
  .class-row .spots { grid-column: 3; grid-row: 2; }
  .class-row .book-button { grid-column: 4; grid-row: 1 / span 2; }
  .studio-section { grid-template-columns: 1fr; gap: 42px; }
  .studio-intro h2 { max-width: 550px; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 36px, 560px); }
  .header-inner { min-height: 70px; gap: 12px; }
  .brand { gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand span { font-size: 21px; }
  .main-nav { gap: 16px; }
  .main-nav a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 34px; padding-block: 36px 40px; }
  .eyebrow { margin-bottom: 13px; }
  h1 { margin-bottom: 18px; font-size: clamp(47px, 14vw, 64px); }
  .hero-intro { margin-bottom: 24px; font-size: 16px; }
  .hero-note { margin-top: 14px; }
  .next-class { min-height: 350px; padding: 26px; }
  .next-date { margin: 18px 0 26px; }
  .next-details h2 { font-size: 34px; }
  .sprig { width: 190px; right: -45px; }
  .schedule-section { padding-block: 44px 50px; }
  .section-heading { display: block; margin-bottom: 24px; }
  .section-heading h2, .studio-intro h2 { font-size: 40px; }
  .schedule-note { margin-top: 14px; text-align: left; }
  .filter-bar { display: block; padding-block: 14px; }
  .filter-label { display: block; margin-bottom: 9px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding: 0 18px 5px; scrollbar-width: thin; }
  .filter-button { flex: 0 0 auto; min-height: 42px; }
  .results-status { margin-top: 18px; }
  .class-row { grid-template-columns: 70px 1fr; gap: 14px 18px; padding: 24px 0; }
  .class-date { grid-row: 1 / span 2; align-self: start; display: block; }
  .class-date strong { display: block; font-size: 36px; }
  .class-date span { display: block; margin-top: 4px; }
  .class-main { grid-column: 2; }
  .class-name { font-size: 23px; }
  .class-time-block { grid-column: 2; }
  .class-row .spots { grid-column: 2; grid-row: auto; }
  .class-row .book-button { grid-column: 2; grid-row: auto; margin-top: 2px; }
  .studio-section { gap: 34px; padding-block: 52px; }
  .studio-points { grid-template-columns: 1fr; gap: 28px; }
  .studio-points h3 { margin-top: 12px; }
  .footer-inner { min-height: 0; flex-direction: column; align-items: flex-start; padding-block: 32px; gap: 18px; }
  .dialog-shell { padding: 34px 24px 26px; }
  .dialog-shell h2 { font-size: 35px; }
  .dialog-close { top: 12px; right: 12px; }
}

@media (max-width: 360px) {
  .shell { width: calc(100% - 28px); }
  .main-nav { gap: 12px; }
  .main-nav a:last-child { display: none; }
  h1 { font-size: 45px; }
  .filters { margin-inline: -14px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
