/* Body By Kylie
   Palette and type are declared once here. Do not add new colours mid-file. */

:root {
  --plaster: #EFEBE4;   /* page background, from the treatment room walls */
  --sand: #CDB79E;      /* hairlines and quiet accents */
  --espresso: #1F1A17;  /* ink, dark section */
  --ink-muted: #5E554D; /* secondary text on light */
  --ink-quiet: #8F8377; /* inactive large type only */
  --sand-muted: #B9AE9F; /* secondary text on dark */

  --display: "Italiana", "Times New Roman", serif;
  --body: "Jost", "Century Gothic", sans-serif;

  --gutter: clamp(20px, 4.5vw, 72px);
  --header-h: 72px;
  --section-y: clamp(72px, 11vw, 168px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--plaster);
  color: var(--espresso);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(44px, 6.4vw, 104px); }
h2 { font-size: clamp(34px, 4.4vw, 72px); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 12px 16px;
  background: var(--espresso);
  color: var(--plaster);
}
.skip-link:focus { top: 12px; }

/* ---------- Shared pieces ---------- */

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid var(--espresso);
  background: var(--espresso);
  color: var(--plaster);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
@media (hover: hover) {
  .button:hover { background: transparent; color: var(--espresso); }
  .button--light:hover { background: transparent; color: var(--plaster); }
}

.button--small { min-height: 44px; padding: 0 20px; }

.button--light {
  border-color: var(--plaster);
  background: var(--plaster);
  color: var(--espresso);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--sand);
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  transition: text-decoration-color 0.3s var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; }

.wordmark {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled { background: var(--plaster); border-bottom-color: var(--sand); }

/* Home page header: sits over the hero photo, wordmark in the centre. */
.site-header--hero { transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease); }
.site-header--hero:not(.is-scrolled) { color: var(--plaster); }
.site-header--hero .site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.site-header--hero .site-nav { justify-self: end; margin-left: 0; }
.site-header--hero .site-nav a,
.site-header__book { color: inherit; }
.site-header__book {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  white-space: nowrap;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
  padding-inline: var(--gutter);
}

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  margin-left: auto;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  transition: color 0.3s var(--ease);
}
.site-nav a:hover { color: var(--espresso); }

/* ---------- Hero ----------
   One photo, the full screen, with the headline set low over it. */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  height: 100svh;
  min-height: 560px;
  max-height: 1200px;
  margin-top: calc(var(--header-h) * -1);
  overflow: hidden;
  background: var(--espresso);
  color: var(--plaster);
  text-align: center;
}

.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 21%;
}
/* Darkens the photo so the light type reads. The photo itself stays sharp. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(31 26 23 / 0.62), rgb(31 26 23 / 0) 58%),
    linear-gradient(to bottom, rgb(31 26 23 / 0.34), rgb(31 26 23 / 0) 22%),
    rgb(31 26 23 / 0.16);
}

.hero__text {
  position: relative;
  padding: 0 var(--gutter) clamp(48px, 9svh, 104px);
}
.hero__text h1 { font-size: clamp(48px, 8vw, 136px); }
.hero__sub {
  margin-top: clamp(14px, 1.6vw, 24px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
/* The three services sit on one line with a dot between them. */
.hero__sub span + span::before { content: "\00B7"; margin-inline: 1.1em 1.4em; }

/* The one orchestrated moment: the hero settles in on load. */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img { animation: settle 1.6s var(--ease) both; }
  .hero__text { animation: rise 1s var(--ease) 0.2s both; }
}
@keyframes settle {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Intro ---------- */

.intro {
  display: grid;
  justify-items: center;
  gap: clamp(28px, 3vw, 44px);
  padding: var(--section-y) var(--gutter);
  text-align: center;
}
.intro__statement {
  max-width: 24em;
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 1.22;
  text-wrap: balance;
}

/* ---------- Photo panels ----------
   Photos are never framed. Each one fills half the page, edge to edge,
   and the halves alternate sides from one section to the next. */

.treatments__grid,
.approach__grid,
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.treatments__body,
.approach__body,
.about__body {
  padding: var(--section-y) var(--gutter);
}
.treatments__body,
.about__body { padding-left: clamp(32px, 6vw, 104px); }
.about__body { align-self: center; }
.approach__body { padding-right: clamp(32px, 6vw, 104px); }

.approach__media,
.about__media {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}
.approach__media img,
.about__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

/* The Treatments label is the section heading, set small. */
.section__head .eyebrow { font-family: var(--body); line-height: 1.65; }

/* ---------- Treatments (the signature) ---------- */

.treatments__stage {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: min(calc(100svh - var(--header-h)), 960px);
  overflow: hidden;
}
.treatments__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}
.treatments__stage img.is-active { opacity: 1; }

.treatments__list {
  margin-top: clamp(32px, 4vw, 64px);
  border-top: 1px solid var(--sand);
}

.treatment {
  padding: clamp(24px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--sand);
}
.treatment h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 56px);
  line-height: 1.08;
  color: var(--ink-quiet);
  transition: color 0.4s var(--ease);
}
.treatment.is-active h3 { color: var(--espresso); }
.treatment p {
  max-width: 44ch;
  margin-top: 12px;
  color: var(--ink-muted);
}
.treatment p + p,
.treatment__more p { margin-top: 8px; }
.treatment__actions { display: flex; align-items: center; gap: 28px; margin-top: 8px; }
.treatment .treatment__actions .text-link { margin-top: 0; }
/* Phones only: the button that opens the rest of a long description. */
.treatment__toggle { display: none; }
/* The button that plays a treatment's video. */
.treatment__watch { display: none; }
.js .treatment__watch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.treatment__watch::before {
  content: "";
  margin-right: 0.8em;
  border-block: 4.5px solid transparent;
  border-left: 7px solid currentColor;
}
/* The device name under a treatment name. */
.treatment .treatment__device {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.treatment .treatment__device + p { margin-top: 12px; }
.treatment .text-link { margin-top: 8px; }
.treatment__photo { display: none; }

/* ---------- How it works ---------- */

.approach__body h2 { margin-top: 20px; }

.steps {
  margin-top: clamp(32px, 4vw, 56px);
  counter-reset: step;
  border-top: 1px solid var(--sand);
}
.steps li {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  padding: 24px 0;
  border-bottom: 1px solid var(--sand);
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 28px;
  color: var(--ink-muted);
}
.steps h3 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
}
.steps p {
  grid-column: 2;
  max-width: 42ch;
  margin-top: 4px;
  color: var(--ink-muted);
}

/* ---------- About ---------- */

.about__body h2 { margin-top: 20px; }
.about__body > p:not(.eyebrow) {
  max-width: 46ch;
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: clamp(17px, 1.4vw, 20px);
}
.about__body .button { margin-top: 40px; }

/* ---------- Contact and footer ---------- */

.contact {
  background: var(--espresso);
  color: var(--plaster);
  padding: var(--section-y) var(--gutter) 32px;
}
.contact .eyebrow { color: var(--sand-muted); }

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
}
.contact__lead h2 { margin-top: 20px; }
.contact__lead > p:not(.eyebrow) {
  max-width: 40ch;
  margin-top: 24px;
  color: var(--sand-muted);
  font-size: clamp(17px, 1.4vw, 20px);
}
.contact__lead .button { margin-top: 40px; }

.contact__details { border-top: 1px solid var(--ink-muted); }
.contact__details > div {
  display: grid;
  grid-template-columns: 9em minmax(0, 1fr);
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-muted);
}
.contact__details a {
  text-decoration-color: var(--ink-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.3s var(--ease);
}
.contact__details a:hover { text-decoration-color: currentColor; }
.contact__details dt {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 28px;
  text-transform: uppercase;
  color: var(--sand-muted);
}

.contact__base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: var(--section-y);
  font-size: 14px;
  color: var(--sand-muted);
}
.contact__base .wordmark { color: var(--plaster); }

/* ---------- Video viewer ----------
   Fills the screen in the dark footer colour. The video is sized to fit
   whatever space is left, square or tall. */

.viewer {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 0 var(--gutter) 24px;
  border: 0;
  background: var(--espresso);
  color: var(--plaster);
}
.viewer[open] {
  display: grid;
  grid-template-rows: var(--header-h) minmax(0, 1fr) 44px;
  justify-items: center;
  align-items: center;
  gap: 12px;
}
.viewer::backdrop { background: var(--espresso); }
.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
.viewer .eyebrow { color: var(--sand-muted); }
.viewer__button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--ink-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 8px;
  cursor: pointer;
  transition: text-decoration-color 0.3s var(--ease);
}
.viewer__button:hover { text-decoration-color: currentColor; }
.viewer__button[hidden] { display: none; }
.viewer__video {
  display: block;
  width: min(100%, 720px, calc((100svh - var(--header-h) - 92px) * var(--w, 1) / var(--h, 1)));
  aspect-ratio: var(--w, 1) / var(--h, 1);
  background: var(--espresso);
}
@media (prefers-reduced-motion: no-preference) {
  .viewer[open] { animation: rise 0.4s var(--ease) both; }
}

/* ---------- Phone and small tablet layout (860px wide and under) ----------
   Everything in this block only applies on small screens. It is grouped in
   the same order as the page: header, hero, intro, treatments, how it works,
   about, contact. */

@media (max-width: 860px) {
  /* Phone: header */
  :root { --header-h: 64px; }

  .site-nav { display: none; }
  .site-header__inner { justify-content: space-between; gap: 16px; }
  .wordmark { font-size: 16px; letter-spacing: 0.14em; }
  .button--small { padding: 0 14px; font-size: 11px; letter-spacing: 0.14em; }

  .site-header--hero .site-header__inner { display: flex; }
  .site-header--hero .wordmark { order: -1; }

  /* Phone: hero */
  .hero__media img { object-position: 46% 30%; }
  .hero__sub { display: grid; gap: 6px; }
  .hero__sub span + span::before { content: none; }

  /* Phone: every two-column section becomes one column */
  .treatments__grid,
  .approach__grid,
  .about__grid,
  .contact__grid { grid-template-columns: minmax(0, 1fr); }

  /* Phone: intro. After the hero, the phone layout runs in alternating
     light and dark bands. */
  .intro { padding-bottom: 0; }

  .treatments__body { padding: 64px 0 0; }
  .approach__body { padding: 64px var(--gutter); }

  /* Phone: treatments. Five photo panels stacked flush, edge to edge, with the
     name and description set over each photo. A panel grows taller if its
     description is long. */
  .treatments__stage { display: none; }
  .treatments__body .section__head { padding-inline: var(--gutter); text-align: center; }
  .treatments__body .section__head h2 { margin-inline: auto; }
  .treatments__list { display: flex; flex-direction: column; margin-top: 40px; border-top: 0; }
  .treatment {
    position: relative;
    display: grid;
    align-content: end;
    justify-items: start;
    min-height: 110vw;
    padding: 72px var(--gutter) 28px;
    border-bottom: 0;
    overflow: hidden;
    isolation: isolate;
    color: var(--plaster);
  }
  .treatment__photo {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
    object-position: var(--pos, 50% 50%);
  }
  /* Darkens each photo so the light type reads. */
  .treatment::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(to top, rgb(31 26 23 / 0.82), rgb(31 26 23 / 0.45) 45%, rgb(31 26 23 / 0) 82%),
      rgb(31 26 23 / 0.12);
  }
  .treatment h3,
  .treatment.is-active h3 { color: var(--plaster); font-size: clamp(32px, 9vw, 44px); }
  .treatment p { max-width: 32ch; margin-top: 8px; color: var(--plaster); font-size: 16px; line-height: 1.5; }
  .treatment .treatment__device { margin-top: 8px; font-size: 12px; }
  .treatment .treatment__device + p { margin-top: 8px; }
  .treatment .text-link { margin-top: 6px; text-decoration-color: var(--plaster); }
  /* A long description shows its first paragraph. "More" opens the rest: the
     panel grows, and the photo darkens further so every line reads. */
  .treatment { transition: padding-top 0.5s var(--ease); }
  .treatment::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgb(31 26 23 / 0.86), rgb(31 26 23 / 0.72) 70%, rgb(31 26 23 / 0) 100%);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
  }
  .treatment.is-open { padding-top: 130px; }
  .treatment.is-open::before { opacity: 1; }
  .js .treatment__more {
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 0.5s var(--ease), visibility 0s 0.5s;
  }
  .js .treatment.is-open .treatment__more { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
  .treatment__more > div { min-height: 0; overflow: hidden; }
  .treatment__actions { margin-top: 6px; }
  /* More and Watch sit above the panel-wide booking link, with room to tap. */
  .js .treatment__toggle,
  .js .treatment__watch {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .treatment__toggle::after { content: "+"; position: relative; top: -2px; margin-left: 0.2em; font-size: 17px; font-weight: 300; letter-spacing: 0; line-height: 1; }
  .treatment__toggle[aria-expanded="true"]::after { content: "\2212"; }
  /* The whole panel is the link, not just the word. */
  .treatment .text-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
  .text-link__extra {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* Phone: how it works. Dark band, centred, no photo. */
  .approach { background: var(--espresso); color: var(--plaster); text-align: center; }
  .approach .eyebrow { color: var(--sand-muted); }
  .approach__media { display: none; }
  .steps { border-top: 0; }
  .steps li { display: block; padding: 18px 0; border-bottom: 0; }
  .steps li::before { display: block; color: var(--sand-muted); }
  .steps p { margin-inline: auto; color: var(--sand-muted); }

  /* Phone: about. One full-width photo with the heading set over it, text beneath. */
  .about__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto auto;
    padding: 0 0 64px;
  }
  .about__media { grid-column: 1; grid-row: 1 / 4; min-height: 0; aspect-ratio: 4 / 5; }
  .about__media img { object-position: 60% 20%; }
  /* Darkens the photo so the light type reads. */
  .about__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to top, rgb(31 26 23 / 0.82), rgb(31 26 23 / 0.4) 38%, rgb(31 26 23 / 0) 72%),
      rgb(31 26 23 / 0.12);
  }
  .about__body { display: contents; }
  .about__body .eyebrow,
  .about__body h2 {
    position: relative;
    z-index: 1;
    grid-column: 1;
    padding-inline: var(--gutter);
    color: var(--plaster);
  }
  .about__body .eyebrow { grid-row: 2; }
  .about__body h2 { grid-row: 3; margin-top: 12px; padding-bottom: 28px; font-size: clamp(36px, 10vw, 52px); }
  .about__body > p:not(.eyebrow) { margin-top: 28px; padding-inline: var(--gutter); }
  .about__body .button { justify-self: start; margin: 32px var(--gutter) 0; }

  /* Phone: contact */
  .contact__grid { align-items: start; }

}

@media (max-width: 420px) {
  .button__extra { display: none; }
  .button--small { padding: 0 20px; }
}

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