:root {
  --paper: #fffdf8;
  --linen: #f7f0e4;
  --sage-soft: #e8f0e3;
  --mist: #d9eef0;
  --petal: #f8dfd6;
  --gold-soft: #f3df9a;
  --pine: #294d35;
  --moss: #6d8054;
  --clay: #d66543;
  --clay-dark: #b84e31;
  --ink: #243127;
  --muted: #687164;
  --line: #e6dac7;
  --shadow: 0 22px 70px rgba(52, 68, 42, 0.14);
  --display: "Book Antiqua", "Palatino Linotype", Georgia, serif;
  --body: "Trebuchet MS", "Segoe UI", sans-serif;
  color-scheme: light;
  scroll-behavior: smooth;
}

html {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(41, 77, 53, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(41, 77, 53, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 54px 54px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 20;
  width: auto;
  height: auto;
  padding: 10px 14px;
  margin: 0;
  clip: auto;
  border-radius: 8px;
  background: var(--pine);
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(230, 218, 199, 0.8);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 174px;
}

.brand-mark {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 19px);
  grid-template-rows: repeat(2, 19px);
  gap: 2px;
  width: 42px;
  height: 42px;
  transform: rotate(45deg);
}

.brand-mark span {
  border-radius: 19px 3px 19px 3px;
  background: var(--moss);
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
  background: var(--clay);
}

.brand-name {
  color: var(--pine);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  line-height: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
}

.nav-links a {
  position: relative;
  color: #1f2b23;
  font-size: 14px;
  font-weight: 800;
}

.nav-links a::after {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--clay);
  content: "";
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.nav-cta,
.button-primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 14px 28px rgba(214, 101, 67, 0.24);
}

.button-secondary {
  border-color: var(--clay);
  background: #fff9f1;
  color: var(--clay-dark);
}

.nav-cta:hover,
.button:hover {
  transform: translateY(-2px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--pine);
}

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  align-items: center;
  gap: clamp(28px, 4vw, 76px);
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 156px);
  margin: 0 auto;
  padding: clamp(34px, 7vw, 84px) 0 clamp(28px, 5vw, 62px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.trial-copy h2,
.contact-card h2 {
  margin: 0;
  color: var(--pine);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.94;
}

.hero h1 {
  max-width: 620px;
  font-size: clamp(46px, 5.6vw, 72px);
}

.hero-text {
  max-width: 520px;
  margin: 18px 0 0;
  color: #39463b;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-media {
  position: relative;
  align-self: stretch;
  min-height: 480px;
}

.hero-media::before {
  position: absolute;
  inset: 8% auto auto -8%;
  width: 36%;
  height: 74%;
  border-radius: 8px;
  background: var(--mist);
  content: "";
  transform: rotate(-3deg);
}

.hero-media img {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.hero-badge {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 16px 38px rgba(35, 49, 39, 0.15);
  backdrop-filter: blur(12px);
}

.hero-badge strong {
  color: var(--pine);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.hero-badge span {
  color: var(--muted);
  font-weight: 800;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: 0 18px 56px rgba(53, 73, 49, 0.1);
}

.principle {
  min-height: 210px;
  padding: 32px 24px;
  background: rgba(255, 253, 248, 0.94);
}

.principle svg {
  width: 36px;
  height: 36px;
  color: var(--moss);
  stroke-width: 1.6;
}

.principle h3 {
  margin: 18px 0 10px;
  color: var(--pine);
  font-family: var(--display);
  font-size: 25px;
  line-height: 1;
}

.principle p,
.section-heading p,
.age-card p,
.teacher-card p,
.review-card p,
.faq-list p,
.contact-card li {
  color: var(--muted);
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 124px) 0 0;
}

.section-tight {
  padding-top: clamp(64px, 8vw, 96px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading h2,
.trial-copy h2,
.contact-card h2 {
  font-size: clamp(40px, 5vw, 66px);
}

.section-heading p {
  max-width: 680px;
  margin: 14px 0 0;
  font-size: 18px;
}

.age-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.age-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.age-card:nth-child(2) {
  background: #fff4ee;
}

.age-card:nth-child(3) {
  background: #f5f8ed;
}

.age-card:nth-child(4) {
  background: #eef7f7;
}

.age-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.age-card div {
  padding: 20px 18px 22px;
}

.age-card span {
  color: var(--clay-dark);
  font-weight: 900;
}

.age-card h3 {
  margin: 5px 0 8px;
  color: var(--pine);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.age-card p {
  margin: 0;
}

.schedule-section {
  width: 100%;
  margin-top: clamp(72px, 10vw, 118px);
  padding: clamp(62px, 8vw, 92px) max(20px, calc((100vw - 1180px) / 2)) clamp(68px, 8vw, 96px);
  background:
    linear-gradient(120deg, rgba(232, 240, 227, 0.82), rgba(247, 240, 228, 0.72)),
    var(--linen);
}

.schedule-section .section-heading,
.schedule-wrap {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.schedule-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 18px 45px rgba(75, 89, 61, 0.09);
}

.schedule {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.schedule th,
.schedule td {
  padding: 17px 14px;
  border: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.schedule thead th {
  background: var(--pine);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.schedule tbody th {
  color: var(--pine);
  font-weight: 900;
}

.schedule td {
  color: #485346;
  font-weight: 700;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(440px, 1fr);
  gap: 28px;
  align-items: stretch;
}

.team-photo img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  border-radius: 8px;
  object-fit: cover;
}

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

.teacher-card,
.review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 16px 40px rgba(53, 73, 49, 0.08);
}

.teacher-card {
  padding: 24px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--petal);
  color: var(--clay-dark);
  font-weight: 900;
}

.teacher-card:nth-child(2) .avatar {
  background: var(--mist);
  color: #32636b;
}

.teacher-card:nth-child(3) .avatar {
  background: var(--sage-soft);
  color: var(--pine);
}

.teacher-card:nth-child(4) .avatar {
  background: var(--gold-soft);
  color: #725a19;
}

.teacher-card h3 {
  margin: 14px 0 0;
  color: var(--pine);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.teacher-card .role {
  margin: 4px 0 12px;
  color: var(--clay-dark);
  font-weight: 900;
}

.teacher-card p:last-child {
  margin: 0;
}

.trial-band {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 0.82fr);
  gap: 34px;
  align-items: center;
  margin-top: clamp(72px, 10vw, 118px);
  padding: clamp(48px, 7vw, 74px) max(20px, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.95), rgba(255, 253, 248, 0.72)),
    url("assets/waiting-room.png") right center / min(520px, 45vw) auto no-repeat,
    var(--linen);
  border-block: 1px solid var(--line);
}

.trial-copy {
  max-width: 720px;
}

.trial-copy h2 {
  max-width: 760px;
}

.trial-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.trial-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(214, 101, 67, 0.22);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--pine);
  font-weight: 900;
}

.trial-points svg {
  width: 18px;
  height: 18px;
  color: var(--clay);
}

.trial-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.95);
  box-shadow: var(--shadow);
}

.trial-form label,
.trial-form label:first-child,
.trial-form label:nth-child(3),
.trial-form button,
.form-status {
  grid-column: 1 / -1;
}

.trial-form label:nth-child(2) {
  grid-column: auto;
}

.trial-form label {
  display: grid;
  gap: 6px;
  color: var(--pine);
  font-size: 13px;
  font-weight: 900;
}

.trial-form input,
.trial-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.trial-form input:focus,
.trial-form select:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(214, 101, 67, 0.14);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--pine);
  font-weight: 900;
}

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

.review-card {
  min-height: 232px;
  padding: 26px;
}

.review-card svg {
  width: 28px;
  height: 28px;
  color: var(--clay);
}

.review-card p {
  margin: 18px 0 20px;
  font-size: 17px;
}

.review-card strong {
  color: var(--pine);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgba(42, 60, 41, 0.12);
}

.gallery-item figcaption {
  margin-top: 10px;
  color: var(--pine);
  font-weight: 900;
  text-align: center;
}

.faq-section {
  padding-bottom: clamp(70px, 10vw, 120px);
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 18px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
  color: var(--pine);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--pine);
  content: "+";
  line-height: 26px;
  text-align: center;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list p {
  margin: 0;
  padding: 0 18px 18px;
}

.contacts {
  display: grid;
  grid-template-columns: minmax(420px, 0.74fr) minmax(480px, 1fr);
  gap: 22px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto clamp(30px, 5vw, 58px);
}

.contact-card,
.map-card {
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.contact-card {
  padding: 34px;
}

.contact-card h2 {
  font-size: clamp(38px, 4.2vw, 58px);
}

.contact-card ul {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 24px 0 24px;
  list-style: none;
}

.contact-card li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 800;
}

.contact-card li svg {
  width: 21px;
  height: 21px;
  color: var(--clay);
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
}

.map-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(109, 128, 84, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(109, 128, 84, 0.08) 1px, transparent 1px),
    #eff6ef;
  background-size: 58px 58px;
}

.map-line {
  position: absolute;
  height: 22px;
  border-radius: 999px;
  background: #f2d597;
  box-shadow: 0 0 0 10px rgba(242, 213, 151, 0.24);
}

.map-line-a {
  left: -8%;
  top: 34%;
  width: 118%;
  transform: rotate(-7deg);
}

.map-line-b {
  left: 22%;
  top: -4%;
  width: 20%;
  height: 118%;
  transform: rotate(22deg);
}

.map-line-c {
  right: -12%;
  bottom: 19%;
  width: 78%;
  transform: rotate(18deg);
}

.map-pin {
  position: absolute;
  left: 52%;
  top: 45%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 15px;
  border-radius: 8px;
  background: var(--clay);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(214, 101, 67, 0.24);
  transform: translate(-50%, -50%);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 0 max(20px, calc((100vw - 1180px) / 2));
  background: var(--pine);
  color: #fff;
  font-weight: 900;
}

.footer a {
  color: #f6d79d;
  margin-right: 62px;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  box-shadow: 0 16px 34px rgba(214, 101, 67, 0.3);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 650ms ease var(--delay, 0ms),
    transform 650ms ease var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .nav {
    grid-template-columns: auto auto auto;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 10px);
    display: grid;
    justify-content: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf8;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .hero,
  .team-layout,
  .trial-band,
  .contacts {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .age-grid,
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .trial-band {
    background:
      linear-gradient(90deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.86)),
      url("assets/waiting-room.png") right bottom / 420px auto no-repeat,
      var(--linen);
  }
}

@media (max-width: 760px) {
  body {
    background-size: 40px 40px;
  }

  .nav {
    width: min(100% - 28px, 1180px);
    min-height: 68px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    font-size: 20px;
  }

  .nav-cta {
    display: none;
  }

  .hero,
  .section,
  .principles,
  .contacts {
    width: min(100% - 28px, 1180px);
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-media,
  .hero-media img {
    min-height: 340px;
  }

  .hero-media::before {
    display: none;
  }

  .principles,
  .age-grid,
  .teacher-grid,
  .review-grid,
  .gallery-grid,
  .faq-list {
    grid-template-columns: 1fr;
  }

  .principle {
    min-height: 0;
    padding: 24px 20px;
  }

  .section {
    padding-top: 68px;
  }

  .section-heading h2,
  .trial-copy h2,
  .contact-card h2 {
    font-size: 40px;
  }

  .team-photo img {
    min-height: 330px;
  }

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

  .trial-form label:nth-child(2) {
    grid-column: 1 / -1;
  }

  .trial-band {
    padding-right: 14px;
    padding-left: 14px;
    background:
      linear-gradient(90deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.93)),
      var(--linen);
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 104px;
  }

  .footer a {
    margin-right: 58px;
  }

  .schedule-wrap {
    overflow-x: visible;
  }

  .schedule {
    min-width: 0;
  }

  .schedule thead {
    display: none;
  }

  .schedule,
  .schedule tbody,
  .schedule tr,
  .schedule tbody th,
  .schedule td {
    display: block;
    width: 100%;
  }

  .schedule tr {
    border-bottom: 1px solid var(--line);
  }

  .schedule tr:last-child {
    border-bottom: 0;
  }

  .schedule th,
  .schedule td {
    border: 0;
    text-align: left;
  }

  .schedule tbody th {
    padding: 15px 16px;
    background: var(--pine);
    color: #fff;
  }

  .schedule td {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
  }

  .schedule td::before {
    color: var(--pine);
    content: attr(data-day);
    font-weight: 900;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
