:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --tint: #f3ecdf;
  --ink: #1f2a26;
  --muted: #5f6b66;
  --line: #e4dccd;
  --accent: #e0643c;
  --accent-ink: #ffffff;
  --green: #3f6b5c;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(40, 30, 20, .18);
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161b19;
    --surface: #1f2623;
    --tint: #1b211f;
    --ink: #efe9df;
    --muted: #a3ada8;
    --line: #2f3834;
    --accent: #f07a52;
    --green: #7fb39f;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
h1 em { color: var(--accent); font-style: italic; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 32px); }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tint { background: var(--tint); }
.section__sub { color: var(--muted); margin: -8px 0 32px; }
.eyebrow {
  margin: 0 0 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--small { padding: 9px 18px; font-size: .9rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--light { background: #fff; color: #1f2a26; }
.btn--block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1.1rem; cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { font: 700 1.5rem var(--serif); text-decoration: none; }
.logo span { color: var(--accent); }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav__links a:hover { color: var(--ink); }
.nav__burger { display: none; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 100px); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }
.stats { display: flex; gap: 36px; list-style: none; padding: 0; margin: 0; }
.stats strong { display: block; font: 700 1.6rem var(--serif); white-space: nowrap; }
.stats span { color: var(--muted); font-size: .9rem; }
.hero__art { position: relative; }
.canvas {
  width: 100%; border-radius: 10px; background: #fff;
  box-shadow: var(--shadow); transform: rotate(2deg);
}
.brush {
  position: absolute; width: 60%; height: 22px; left: -6%; bottom: 18%;
  background: var(--accent); border-radius: 20px 4px 20px 4px; opacity: .85;
  transform: rotate(-8deg); mix-blend-mode: multiply;
}

/* Courses */
.courses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.course {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.course:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course__cover { height: 140px; display: grid; place-items: center; font-size: 3rem; }
.course__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course__body h3 { margin: 0; font-size: 1.15rem; }
.course__body p { margin: 0; color: var(--muted); font-size: .92rem; }
.course__meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: auto; padding-top: 8px; }
.course__price { font: 700 1.2rem var(--serif); }
.tag {
  align-self: flex-start; padding: 3px 10px; border-radius: 999px;
  background: var(--tint); font-size: .75rem; font-weight: 600; color: var(--green);
}

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 28px; }
.chip {
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 .9rem var(--sans); cursor: pointer;
}
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work {
  margin: 0; background: var(--surface); border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line); cursor: zoom-in;
  transition: transform .2s, opacity .3s;
}
.work:hover { transform: scale(1.02); }
.work.is-hidden { display: none; }
.work svg, .work img { width: 100%; aspect-ratio: 1; }
.work img { object-fit: cover; object-position: center 30%; }
.work figcaption { padding: 10px 14px; font-size: .85rem; }
.work figcaption small { display: block; color: var(--muted); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 12, 11, .82); cursor: zoom-out;
}
.lightbox svg { width: min(560px, 100%); border-radius: 12px; }
.lightbox img { display: block; max-width: min(560px, 100%); max-height: 82vh; margin: 0 auto; border-radius: 12px; }
.lightbox p { color: #fff; text-align: center; margin-top: 12px; }

.before-after {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center;
  margin-top: 72px; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.before-after p { color: var(--muted); }
.ba { position: relative; aspect-ratio: 1; max-width: 420px; width: 100%; justify-self: center; border-radius: 12px; overflow: hidden; }
.ba__img { position: absolute; inset: 0; }
.ba__img svg { width: 100%; height: 100%; }
.ba__img--before { clip-path: inset(0 50% 0 0); }
.ba__label {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 6px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; font-weight: 600;
}
.ba__label--r { left: auto; right: 12px; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff;
  transform: translateX(-50%); pointer-events: none;
}
.ba__handle::after {
  content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #1f2a26;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* Calculator */
.calc { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.calc__form { display: flex; flex-direction: column; gap: 20px; }
fieldset {
  margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
legend { padding: 0 8px; margin-left: -8px; font-weight: 600; }
.calc__courses { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt span {
  display: flex; align-items: center; gap: 12px; height: 100%;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.opt i { font-style: normal; font-size: 1.5rem; }
.opt b { display: block; font-weight: 600; font-size: .95rem; }
.opt small { color: var(--muted); }
.opt input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.opt input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span {
  display: block; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
}
.seg b { display: block; font-size: .95rem; }
.seg small { color: var(--muted); font-size: .8rem; }
.seg input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.range-row { display: flex; align-items: center; gap: 18px; }
.range-row input { flex: 1; accent-color: var(--accent); }
.range-row output { min-width: 96px; font-weight: 600; text-align: right; }

.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check small { color: var(--muted); margin-left: 4px; }

.calc__summary {
  position: sticky; top: 90px;
  padding: 26px; border-radius: var(--radius);
  background: var(--ink); color: var(--bg);
}
.calc__summary h3 { margin-bottom: 16px; }
.summary__lines { list-style: none; padding: 0; margin: 0 0 12px; font-size: .92rem; }
.summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed color-mix(in srgb, var(--bg) 20%, transparent); }
.summary__lines .empty { opacity: .6; border: 0; }
.summary__discount { color: #8fd3b5; font-weight: 600; font-size: .92rem; padding: 4px 0; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 6px; }
.summary__total strong { font: 700 2rem var(--serif); }
.summary__total s { opacity: .55; margin-right: 10px; }
.summary__monthly { margin: 0 0 6px; opacity: .8; font-size: .9rem; }
.calc__summary .btn { margin-top: 14px; }
.summary__note { font-size: .8rem; opacity: .65; margin: 14px 0 0; }

/* Reviews */
.reviews__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 32px; }
.reviews__nav { display: flex; gap: 8px; }
.reviews {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 4px;
}
.reviews::-webkit-scrollbar { display: none; }
.review {
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.review__stars { color: #e7a43a; letter-spacing: 2px; }
.review p { margin: 0; flex: 1; }
.review__author { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 600;
}
.review__author small { display: block; color: var(--muted); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 12px 0 0; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer p { margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  transition: transform .3s, visibility 0s .3s;
  padding: 14px 22px; border-radius: 12px; background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow); width: max-content; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; transition: transform .3s; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1000px) {
  .courses, .gallery { grid-template-columns: repeat(2, 1fr); }
  .calc { grid-template-columns: 1fr; }
  .calc__summary { position: static; }
  .reviews { grid-auto-columns: calc((100% - 20px) / 2); }
}
@media (max-width: 800px) {
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 0; }
  .nav__login { margin-left: auto; }
  .nav__burger {
    display: flex; flex-direction: column; gap: 6px; padding: 10px;
    border: 0; background: none; cursor: pointer;
  }
  .nav__burger span { width: 22px; height: 2px; background: var(--ink); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { max-width: 380px; margin: 0 auto; }
  .before-after { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .reviews { grid-auto-columns: 88%; }
}
@media (max-width: 560px) {
  .nav__inner { gap: 12px; }
  .nav__cta { display: none; }
  .nav__burger { margin-left: -4px; }
  .courses { grid-template-columns: 1fr; }
  .calc__courses, .seg { grid-template-columns: 1fr; }
  .stats { gap: 22px; }
  .footer__inner { flex-direction: column; text-align: center; }
}
