:root {
  --paper: #f8f6f2;
  --sand: #efeae1;
  --ink: #152a3a;
  --ink-deep: #0f202d;
  --ink-soft: #46535f;
  --muted: #727c86;
  --line: #ddd6ca;
  --radius: 10px;
  --wrap: 1200px;
  --gutter: 32px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

section[id] { scroll-margin-top: 72px; }

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.btn:hover { background: var(--ink-deep); }
.btn--small { min-height: 44px; padding: 10px 18px; font-size: 15px; }

.link {
  display: inline-block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--line);
  transition: text-decoration-color 0.2s ease;
}
.link:hover { text-decoration-color: var(--ink); }

.show-sm { display: none; }

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 246, 242, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__inner { display: flex; align-items: center; gap: 40px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand__name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { padding: 12px 4px; font-size: 15px; color: var(--ink-soft); text-decoration: none; transition: color 0.2s ease; }
.nav a:hover { color: var(--ink); }

/* hero */
.hero { padding: 64px 0 96px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 72px;
  align-items: center;
}
.hero h1 {
  margin: 20px 0 28px;
  font-size: clamp(48px, 6.6vw, 92px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.lead { max-width: 33ch; font-size: 21px; line-height: 1.5; font-weight: 350; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.degrees {
  max-width: 520px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hero__photo { justify-self: end; width: 100%; max-width: 460px; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }

/* facts */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 36px 28px; border-left: 1px solid var(--line); }
.fact:first-child { padding-left: 0; border-left: 0; }
.fact__value { font-size: 23px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; }
.fact__label { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--muted); }

/* sections */
.section { padding: 120px 0; }
.section--sand { background: var(--sand); }

.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  column-gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.head .eyebrow { grid-column: 1; }
.head h2 { grid-column: 1; }
.head__note { grid-column: 2; grid-row: 1 / span 2; align-self: end; color: var(--ink-soft); font-size: 17px; line-height: 1.6; }

h2 {
  margin-top: 16px;
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 18ch;
}

/* treatments */
.treat {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 72px;
}
.treat li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.treat li:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
.treat__n { padding-top: 5px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.treat h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.3; }
.treat p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

/* about */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 88px;
  align-items: start;
}
.about__photo { position: sticky; top: 104px; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 50%; border-radius: var(--radius); }
.about__text > p:not(.eyebrow) { margin-top: 20px; max-width: 58ch; color: var(--ink-soft); }
.about__text h2 { margin-bottom: 12px; }
.sub { margin: 48px 0 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.quals { margin: 0; }
.quals div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.quals div:last-child { border-bottom: 1px solid var(--line); }
.quals dt { font-size: 15px; font-weight: 500; letter-spacing: 0.03em; }
.quals dd { margin: 0; font-size: 16px; color: var(--ink-soft); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }

/* contact */
.contact { padding: 120px 0 104px; background: var(--ink); color: #fff; }
.head--light .eyebrow { color: rgba(255, 255, 255, 0.6); }
.head--light .head__note { color: rgba(255, 255, 255, 0.72); }
.places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 72px; }
.place { padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.place__role { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.place h3 { margin-top: 12px; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.place__where { margin-top: 4px; color: rgba(255, 255, 255, 0.72); }
.place__phone {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 0;
  transition: border-color 0.2s ease;
  font-variant-numeric: tabular-nums;
}
.place__phone:hover { border-color: #fff; }
.contact__note { margin-top: 64px; font-size: 15px; color: rgba(255, 255, 255, 0.6); }

/* footer */
.foot { background: var(--ink-deep); color: rgba(255, 255, 255, 0.72); padding: 32px 0; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.brand--foot img { width: 40px; height: 40px; }
.brand--foot span { font-size: 15px; font-weight: 500; line-height: 1.35; color: #fff; }
.brand--foot small { font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, 0.55); }
.foot__small { max-width: 52ch; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.5); }

/* tablet */
@media (max-width: 960px) {
  .top__inner { gap: 24px; }
  .nav { gap: 14px; }
  .hero__grid { gap: 40px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .treat { column-gap: 40px; }
  .about { gap: 48px; }
  .places { column-gap: 48px; }
}

@media (max-width: 860px) {
  :root { --gutter: 24px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .hero { padding: 48px 0 72px; }
  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .lead { font-size: 19px; }
  .facts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 28px 24px 28px 0; border-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .fact:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .section { padding: 88px 0; }
  .head { grid-template-columns: 1fr; margin-bottom: 44px; }
  .head__note { grid-column: 1; grid-row: auto; margin-top: 16px; max-width: 46ch; }
  .contact { padding: 88px 0 80px; }
}

/* small tablet and large phone: stack the columns */
@media (max-width: 700px) {
  .nav { display: none; }
  .top__inner { justify-content: space-between; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { justify-self: start; max-width: 520px; }
  .treat { grid-template-columns: 1fr; }
  .treat li:nth-last-child(2) { border-bottom: 0; }
  .about { grid-template-columns: 1fr; }
  .about__photo { position: static; max-width: 520px; }
  .about__photo img { aspect-ratio: 3 / 2; object-position: 50% 50%; }
  .places { grid-template-columns: 1fr; }
}

/* phone */
@media (max-width: 600px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .brand img { width: 40px; height: 40px; }
  .brand__name { font-size: 16px; }
  .top__inner { height: 64px; gap: 16px; }
  section[id] { scroll-margin-top: 64px; }
  .hero { padding: 32px 0 56px; }
  .hero h1 { margin: 16px 0 20px; }
  .lead { font-size: 18px; }
  .hero__actions { margin-top: 32px; }
  .degrees { margin-top: 36px; font-size: 13px; }
  .fact { padding: 22px 16px 22px 0; }
  .fact:nth-child(even) { padding-left: 16px; }
  .fact__value { font-size: 19px; }
  .fact__label { font-size: 14px; }
  .section { padding: 72px 0; }
  .treat li { grid-template-columns: 44px minmax(0, 1fr); padding: 24px 0; }
  .treat h3 { font-size: 19px; }
  .sub { margin-top: 40px; }
  .quals div { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .gallery { gap: 24px 12px; }
  .gallery figcaption { margin-top: 8px; font-size: 13px; line-height: 1.4; }
  .place h3 { font-size: 24px; }
  .contact { padding: 72px 0 64px; }
  .contact__note { margin-top: 48px; }
}

/* small phones (iPhone SE first generation, 320 px) */
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .top__inner { gap: 10px; }
  .brand { gap: 10px; }
  .brand img { width: 36px; height: 36px; }
  .brand__name { font-size: 15px; }
  .btn--small { padding: 10px 14px; gap: 8px; }
  .lead { font-size: 17px; }
}
