﻿/* ==========================================================================
   Dr. Xantipphy — main stylesheet (v2, rose)
   1. Tokens & themes     5. Intro & header     9. Consultation
   2. Base                6. Hero              10. Letter
   3. Type & utilities    7. About             11. Notes
   4. Controls            8. Care              12. Contact & footer
                                               13. Motion states
   ========================================================================== */

/* 1. Tokens & themes ------------------------------------------------------ */

:root {
  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --fs-hero: clamp(2.6rem, 1.5rem + 3.9vw, 4.75rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  --fs-h3: clamp(1.1rem, 1.04rem + .25vw, 1.25rem);
  --fs-lead: clamp(1.08rem, 1.02rem + .3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: .875rem;

  --pad: clamp(1.25rem, 4.5vw, 4.5rem);
  --gap: clamp(1rem, 2.2vw, 2rem);
  --max: 80rem;
  --space: clamp(5rem, 10vw, 8.5rem);
  --header-h: 5.25rem;
  --header-h-compact: 4rem;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 28px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);

  /* Light — blush paper, plum ink, one rose */
  color-scheme: light;
  --bg: #FDF7F8;
  --soft: #FAEEF1;
  --surface: #FFFFFF;
  --tint: #F7E1E7;
  --tint-2: #F1CFD8;
  --ink: #2A1A21;
  --ink-2: #5B4750;
  --muted: #7A6570;
  --rule: #EEDCE1;
  --rule-strong: #DDBFC8;
  --accent: #C2456B;
  --btn: #3A1F2B;
  --btn-ink: #FFFFFF;
  --on-accent: #FFFFFF;
  --focus: #C2456B;
  --selection: #F4CFDA;
  --shadow: 0 24px 60px -36px rgb(120 40 70 / .35);

  --intro-bg: #1B1216;
  --intro-ink: #F7EAEE;
  --intro-muted: #A08A94;
}

:root[data-theme="dark"] {
  /* Dark — plum night, warm rose. Designed, not inverted. */
  color-scheme: dark;
  --bg: #161013;
  --soft: #1C1418;
  --surface: #221920;
  --tint: #2B1C23;
  --tint-2: #3A2630;
  --ink: #F7EAEE;
  --ink-2: #D3BEC6;
  --muted: #A38D97;
  --rule: #33242B;
  --rule-strong: #4E3942;
  --accent: #F08DAB;
  --btn: #F08DAB;
  --btn-ink: #1C1216;
  --on-accent: #1C1216;
  --focus: #F08DAB;
  --selection: #5A2E3E;
  --shadow: 0 24px 60px -36px rgb(0 0 0 / .6);

  --intro-bg: #100B0D;
}

@media (max-width: 59.99rem) {
  :root { --header-h: 4.25rem; --header-h-compact: 3.75rem; }
}

/* 2. Base ----------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
h2, h3, .lead { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 600; }

::selection { background: var(--selection); color: var(--ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .6s ease, color .6s ease, border-color .6s ease, fill .6s ease, stroke .6s ease !important;
}
.theme-anim .theme-toggle__half { transition: transform .8s var(--ease-out) !important; }

.intro-on body, .menu-open body { overflow: hidden; }

/* 3. Type & utilities ----------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left));
}

.section { position: relative; padding-block: var(--space); }
.section--tint { background: var(--soft); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.h2 {
  margin-top: 1rem;
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.028em;
}

/* The signature: one word per heading set in a rose serif italic. */
.h2 em, .hero__title em, .glance__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -.01em;
  color: var(--accent);
}

.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }
.prose { color: var(--ink-2); }
.prose p + p { margin-top: 1em; }
.fine-print { font-size: .78rem; line-height: 1.6; color: var(--muted); }

.section-head { max-width: 40rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__intro { margin-top: 1.25rem; color: var(--ink-2); }

.ph { color: var(--accent); text-decoration: underline dotted 1px; text-underline-offset: .18em; }

.tag {
  display: inline-block;
  margin-left: .4rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: var(--tint);
  font-size: .6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  vertical-align: .2em;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: .75rem; left: .75rem;
  z-index: 200;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: var(--fs-small);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* Placeholder frames for photographs not yet added */
.ph-media {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .25rem;
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  background: var(--tint);
  color: var(--ink-2);
}
.ph-media__label { font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
.ph-media__path { font-size: .68rem; color: var(--muted); overflow-wrap: anywhere; }

.hero__media > img, .letter__media > img, .contact__media > img { margin-inline: auto; }

/* A cut-out portrait stand-in: an arch standing on the section floor */
.ph-media--cutout {
  width: min(78%, 26rem);
  height: auto;
  aspect-ratio: 3 / 4;
  margin-inline: auto;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 999px 999px 0 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px dashed var(--rule-strong);
  border-bottom: 0;
}

/* 4. Controls ------------------------------------------------------------- */

.arrow { flex: none; width: 1.3rem; height: auto; transition: transform .55s var(--ease-out); }

.link {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .6s var(--ease-out), color .3s;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; color: var(--accent); }

/* Pill button: rose rises from below and leaves through the top. */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  min-height: 3.25rem;
  padding: .8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .005em;
  text-decoration: none;
  transition: color .45s var(--ease-out), border-color .45s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform .6s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:hover, .btn:focus-visible { color: var(--on-accent); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(4px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost::before { background: var(--tint-2); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--ink); border-color: var(--tint-2); }

.btn--sm { min-height: 2.6rem; padding: .5rem 1.2rem; font-size: .82rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  transition: color .3s, background-color .3s;
}
.theme-toggle:hover { color: var(--ink); background: var(--tint); }
.theme-toggle__half { transform-box: view-box; transform-origin: 8px 8px; transition: transform .8s var(--ease-out); }
.theme-toggle:hover .theme-toggle__half { transform: rotate(24deg); }
[data-theme="dark"] .theme-toggle__half { transform: rotate(180deg); }
[data-theme="dark"] .theme-toggle:hover .theme-toggle__half { transform: rotate(204deg); }
.theme-toggle--text { width: auto; height: auto; padding: .4rem .6rem; border-radius: 999px; font-size: var(--fs-small); }

/* 5. Intro & header ------------------------------------------------------- */

.intro { display: none; }

.intro-on .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 5rem var(--pad);
  overflow: hidden;
  background: var(--intro-bg);
  color: var(--intro-ink);
  clip-path: inset(0 0 0 0);
  outline: none;
}

.intro__ambient {
  position: absolute;
  inset: -25%;
  background: radial-gradient(closest-side, rgb(240 141 171 / .09), rgb(240 141 171 / .03) 45%, rgb(240 141 171 / 0) 100%);
  animation: drift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate3d(-7%, -5%, 0); }
  to   { transform: translate3d(7%, 6%, 0); }
}

.intro__corner {
  position: absolute;
  top: max(1.75rem, env(safe-area-inset-top));
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--intro-muted);
  animation: fade-in 1.4s var(--ease-out) .6s both;
}
.intro__corner--left { left: var(--pad); }
.intro__corner--right { right: var(--pad); }
.intro .ph { color: inherit; }

.intro__stage { position: relative; display: grid; width: min(100%, 40rem); }
.intro__lines, .intro__finale { grid-area: 1 / 1; align-self: center; }

.intro__line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 1.05rem + 1.4vw, 2.15rem);
  line-height: 1.35;
  text-wrap: balance;
  opacity: 0;
  transform: translate3d(0, .6em, 0);
  transition: opacity 1.8s var(--ease-out), transform 1.8s var(--ease-out);
}
.intro__line + .intro__line { margin-top: .9em; padding-left: 2.2em; }
.intro__line.is-in { opacity: 1; transform: none; }
.intro__line.is-in.is-dim { opacity: .34; }
.intro.is-name .intro__line { opacity: 0; transform: translate3d(0, -.5em, 0); transition-duration: 1.2s; }

.intro__finale { opacity: 0; transition: opacity 1.4s var(--ease-out) .3s; pointer-events: none; }
.intro.is-name .intro__finale { opacity: 1; pointer-events: auto; }

.intro__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.4rem, 1.8rem + 6.6vw, 7.75rem);
  line-height: .95;
  letter-spacing: -.03em;
}
.intro__mask { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.intro__mask > span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  transition: transform 1.7s var(--ease-out) calc(.35s + var(--i) * .2s);
}
.intro__mask:first-child { font-size: .3em; font-style: italic; letter-spacing: 0; margin-bottom: .35em; color: #F08DAB; }
.intro.is-name .intro__mask > span { transform: none; }

.intro__enter {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: clamp(2.5rem, 7vh, 4rem);
  padding: .75rem 0;
  border: 0;
  background: none;
  color: var(--intro-ink);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s var(--ease-out), visibility 0s 1.2s;
}
.intro__enter-line {
  width: 4rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-out) .25s;
}
.intro.is-invite .intro__enter { opacity: 1; visibility: visible; transition-delay: 0s; }
.intro.is-invite .intro__enter-line { transform: scaleX(1); }
.intro.is-invite .intro__enter:hover .intro__enter-line,
.intro.is-invite .intro__enter:focus-visible .intro__enter-line { transform: scaleX(1.6); transition-delay: 0s; transition-duration: .8s; }
.intro__enter:focus-visible, .intro__skip:focus-visible { outline-color: var(--intro-ink); }

.intro__skip {
  position: absolute;
  right: var(--pad);
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  padding: .6rem 0;
  border: 0;
  background: none;
  color: var(--intro-muted);
  font-size: .78rem;
  animation: fade-in 1s var(--ease-out) 1s both;
  transition: color .3s;
}
.intro__skip:hover { color: var(--intro-ink); }

.intro.is-leaving { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease-in-out) .3s; pointer-events: none; }
.intro.is-leaving .intro__stage { opacity: 0; transform: translate3d(0, -2.5rem, 0); transition: opacity .7s var(--ease-out), transform 1.1s var(--ease-out); }
.intro.is-leaving .intro__corner, .intro.is-leaving .intro__skip { opacity: 0; transition: opacity .4s; animation: none; }

@keyframes fade-in { from { opacity: 0; } }

@media (max-width: 47.99rem) {
  .intro__line + .intro__line { padding-left: 1.2em; }
  .intro__skip { left: var(--pad); right: auto; }
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: opacity 1s var(--ease-out) .9s, transform 1s var(--ease-out) .9s, background-color .45s, border-color .45s;
}
.site-header__inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); transition: height .55s var(--ease-out); }
.site-header.is-compact { background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom-color: var(--rule); }
.site-header.is-compact .site-header__inner { height: var(--header-h-compact); }
.menu-open .site-header { background: var(--bg); }

.brand { display: inline-flex; align-items: baseline; gap: .4rem; margin-right: auto; text-decoration: none; white-space: nowrap; }
.brand__name { font-family: var(--serif); font-style: italic; font-size: 1.75rem; font-weight: 400; line-height: 1; letter-spacing: -.02em; color: var(--accent); }
.brand__suffix { font-size: .62rem; font-weight: 700; letter-spacing: .16em; color: var(--ink-2); transition: transform .5s var(--ease-out); }
.brand:hover .brand__suffix { transform: translateX(3px); }

.nav__list { display: flex; gap: clamp(1.25rem, 2.3vw, 2.25rem); }
.nav__link {
  position: relative;
  display: block;
  padding: .45rem 0;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .35s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: .05rem;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform .45s var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current] { color: var(--ink); }
.nav__link[aria-current]::after, .nav__link:hover::after { transform: scale(1); }

.site-header__tools { display: flex; align-items: center; gap: .6rem; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .7rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: .875rem;
  font-weight: 500;
}
.menu-toggle__icon { position: relative; width: 1.25rem; height: .5rem; }
.menu-toggle__icon span { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .55s var(--ease-out), top .55s var(--ease-out); }
.menu-toggle__icon span:first-child { top: 0; }
.menu-toggle__icon span:last-child { top: 100%; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span { top: 50%; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:first-child { transform: rotate(45deg) scaleX(.85); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:last-child { transform: rotate(-45deg) scaleX(.85); }

@media (max-width: 59.99rem) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .brand__name { font-size: 1.55rem; }
}
@media (max-width: 29.99rem) {
  .header-cta { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  overflow-y: auto;
  padding-top: var(--header-h);
  background: var(--bg);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .75s var(--ease-in-out);
}
.mobile-menu.is-open { clip-path: inset(0); }
.mobile-menu__inner { display: flex; flex-direction: column; min-height: 100%; padding-block: 2rem max(2rem, env(safe-area-inset-bottom)); }
.mobile-menu__list { border-top: 1px solid var(--rule); }
.mobile-menu__list li {
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translate3d(0, 1.25rem, 0);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.mobile-menu.is-open li { opacity: 1; transform: none; transition-delay: calc(.2s + var(--i) * .055s); }
.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1rem 0 .85rem;
  font-size: clamp(1.8rem, 1.3rem + 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-decoration: none;
}
.mobile-menu__list a[aria-current] { color: var(--accent); }
.mobile-menu__num { font-size: .72rem; font-weight: 600; color: var(--accent); }
.mobile-menu__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 3rem; }

/* 6. Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--soft);
}

/* The diagonal block behind the portrait */
.hero__shape {
  position: absolute;
  inset: 0 auto 0 0;
  width: 60%;
  background: var(--tint);
  clip-path: polygon(0 10%, 100% 100%, 0 100%);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  min-height: min(46rem, calc(100svh - var(--header-h) - 9rem));
}

.hero__media { grid-column: 1 / 7; align-self: end; }
.hero__media > img { width: auto; max-height: min(44rem, calc(100svh - var(--header-h) - 8rem)); object-fit: contain; }
.hero__media .ph-media--cutout { width: min(80%, 26rem); }

.hero__text { grid-column: 7 / 13; align-self: center; padding-block: clamp(2rem, 6vh, 4rem); }
.hero__title {
  margin-top: 1.25rem;
  font-size: var(--fs-hero);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero__title em { display: inline-block; }
.hero__lede { margin-top: 1.5rem; max-width: 34rem; font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 2.25rem; }

/* "At a glance" — real facts, not invented statistics */
.glance {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  margin-top: -1px;
  padding: 1.5rem clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.glance__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.glance__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.glance__list > div { padding: .25rem 1.5rem; border-left: 1px solid var(--rule); }
.glance dt { font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.glance dd { margin-top: .15rem; font-weight: 600; font-size: .95rem; }

@media (max-width: 63.99rem) {
  .hero__shape { width: 100%; clip-path: polygon(0 55%, 100% 100%, 0 100%); }
  .hero__grid { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__text { order: 1; padding-block: clamp(2rem, 7vw, 3.5rem) 2.5rem; }
  .hero__media { order: 2; align-self: stretch; }
  .hero__media > img { max-height: 30rem; }
  .glance { grid-template-columns: 1fr; gap: 1rem; }
  .glance__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
  .glance__list > div { padding: 0 1rem 0 0; border-left: 0; }
}
@media (max-width: 35.99rem) {
  .hero__actions .btn { flex: 1 1 100%; }
}

/* 7. About ---------------------------------------------------------------- */

.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.about__text { grid-column: 1 / 7; }
.about__text .prose { margin-top: 1.5rem; max-width: 34rem; }
.about__actions { margin-top: 2.25rem; }

.about__figure { position: relative; grid-column: 8 / 13; }
.about__circle { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--tint); }
.about__circle > img, .about__circle > .ph-media { width: 100%; height: 100%; object-fit: cover; }
.about__circle > .ph-media { align-items: center; justify-content: center; text-align: center; }
.about__ring {
  position: absolute;
  inset: -4% -6% 6% 4%;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: .35;
  transition: transform 1.4s var(--ease-out);
}
.about__figure:hover .about__ring { transform: rotate(-8deg) translate(-2%, 2%); }
.about__figure::after {
  content: "";
  position: absolute;
  top: 12%; right: 1%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 63.99rem) {
  .about__text { grid-column: 1 / -1; }
  .about__figure { grid-column: 3 / 11; grid-row: 1; margin-bottom: 3.5rem; }
}
@media (max-width: 47.99rem) {
  .about__figure { grid-column: 2 / 12; }
}

/* 8. Care ----------------------------------------------------------------- */

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service {
  padding: 2rem clamp(1.25rem, 2vw, 2rem) 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  transition: background-color .5s var(--ease-out), border-color .5s, transform .6s var(--ease-out);
}
.service__icon {
  display: inline-grid;
  place-items: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--accent);
  transition: background-color .5s var(--ease-out), color .5s, transform .6s var(--ease-out), border-color .5s;
}
.service__icon .icon { width: 1.6rem; height: 1.6rem; }
.service__title { margin-top: 1.5rem; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.service__text { margin-top: .5rem; color: var(--ink-2); font-size: .95rem; }

@media (hover: hover) {
  .service:hover { background: var(--surface); border-color: var(--rule); transform: translateY(-3px); }
  .service:hover .service__icon { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(-6deg); }
}

@media (max-width: 63.99rem) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 35.99rem) {
  .services { grid-template-columns: 1fr; gap: 0; }
  .service { display: grid; grid-template-columns: auto 1fr; column-gap: 1.25rem; padding: 1.25rem 0; border-radius: 0; border-bottom: 1px solid var(--rule); }
  .service__icon { grid-row: span 2; width: 3.25rem; height: 3.25rem; }
  .service__title { margin-top: .35rem; }
}

/* 9. Consultation --------------------------------------------------------- */

.consult__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
.consult__figure { position: relative; grid-column: 1 / 6; }
.consult__frame { aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--tint); }
.consult__frame > img, .consult__frame > .ph-media { width: 100%; height: 100%; object-fit: cover; transition: transform 1.3s var(--ease-out); }
@media (hover: hover) { .consult__figure:hover .consult__frame > img { transform: scale(1.03); } }
.consult__badge {
  position: absolute;
  right: -1.25rem;
  bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.25rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: .85rem;
  font-weight: 600;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--tint); animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px var(--tint); } }

.consult__text { grid-column: 7 / 13; }
.consult__text .lead { margin-top: 1.25rem; }

.steps { margin-top: 2.25rem; }
.step { display: grid; grid-template-columns: 4.5rem 1fr; align-items: start; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  transition: color .5s var(--ease-out);
}
.step:hover .step__num { color: var(--accent); }
.step__title { font-size: 1.02rem; font-weight: 600; }
.step p { font-size: .95rem; color: var(--ink-2); }

.consult__cta { margin-top: 2.25rem; }
.consult__text .fine-print { margin-top: 1.5rem; max-width: 34rem; }

@media (max-width: 63.99rem) {
  .consult__figure { grid-column: 1 / 11; margin-bottom: 3.5rem; }
  .consult__badge { right: -1rem; }
  .consult__text { grid-column: 1 / -1; }
}
@media (max-width: 35.99rem) {
  .consult__figure { grid-column: 1 / -1; margin-right: 1.25rem; }
  .step { grid-template-columns: 3.5rem 1fr; }
  .consult__cta .btn { width: 100%; }
}

/* 10. Letter -------------------------------------------------------------- */

.letter { overflow: hidden; background: var(--soft); padding-bottom: 0; }
.letter__shape {
  position: absolute;
  inset: 0 0 0 auto;
  width: 55%;
  background: var(--tint);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.letter__grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.letter__body { grid-column: 1 / 7; padding-bottom: var(--space); }
.letter__card {
  margin-top: 2rem;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.08rem + .3vw, 1.3rem);
  line-height: 1.6;
}
.letter__card p + p { margin-top: .9em; }
.letter__salutation { font-style: italic; color: var(--accent); }
.letter__sign { margin-top: 2rem; }
.pulse { width: 9.5rem; height: auto; overflow: visible; }
.pulse path { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.js .pulse path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s var(--ease-in-out) .5s; }
.js .letter__card.is-in .pulse path { stroke-dashoffset: 0; }
.letter__closing { margin-top: 1rem; font-style: italic; color: var(--ink-2); }
.letter__signature { font-size: 1.5rem; }
.letter__date { margin-top: .5rem; font-family: var(--sans); font-size: .78rem; color: var(--muted); }

.letter__media { grid-column: 8 / 13; align-self: end; }
.letter__media > img { max-height: 40rem; width: auto; object-fit: contain; }

@media (max-width: 63.99rem) {
  .letter__shape { width: 100%; clip-path: polygon(100% 60%, 100% 100%, 0 100%); }
  .letter__body { grid-column: 1 / -1; padding-bottom: 3rem; }
  .letter__media { grid-column: 1 / -1; }
  .letter__media > img { max-height: 28rem; }
}

/* 11. Notes --------------------------------------------------------------- */

.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 3.5rem); }
.note { position: relative; display: grid; grid-template-columns: clamp(7rem, 12vw, 10.5rem) 1fr; gap: 1.5rem; align-items: center; }
.note__thumb { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--tint); }
.note__thumb > img, .note__thumb > .ph-media { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.note__thumb .ph-media { padding: .9rem; }
.note__thumb .ph-media__path { display: none; }
.note__meta { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.note__title { margin-top: .4rem; font-size: 1.1rem; font-weight: 600; line-height: 1.35; letter-spacing: -.015em; transition: color .35s; }
.note__title a { text-decoration: none; }
.note__title a::after { content: ""; position: absolute; inset: 0; }
.note__desc { margin-top: .35rem; font-size: .9rem; color: var(--ink-2); }
.note__read { display: inline-flex; align-items: center; gap: .55rem; margin-top: .75rem; font-size: .82rem; font-weight: 600; color: var(--accent); }

@media (hover: hover) {
  .note:hover .note__thumb > img, .note:hover .note__thumb > .ph-media { transform: scale(1.05); }
  .note:hover .note__title { color: var(--accent); }
  .note:hover .note__read .arrow { transform: translateX(4px); }
}
.note:focus-within { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: var(--r); }
.note:focus-within a:focus-visible { outline: none; }

@media (max-width: 63.99rem) { .notes-grid { grid-template-columns: 1fr; } }
@media (max-width: 35.99rem) { .note { grid-template-columns: 6rem 1fr; gap: 1rem; align-items: start; } }

/* 12. Contact & footer ---------------------------------------------------- */

.contact { overflow: hidden; background: var(--bg); padding-bottom: 0; }
.contact__shape {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  background: var(--tint);
  clip-path: polygon(0 20%, 100% 100%, 0 100%);
}
.contact__grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
.contact__media { grid-column: 1 / 6; align-self: end; }
.contact__media > img { max-height: 44rem; width: auto; object-fit: contain; }
.contact__panel { grid-column: 7 / 13; padding-bottom: var(--space); }
.contact__intro { margin-top: 1rem; color: var(--ink-2); max-width: 32rem; }

.form {
  display: grid;
  gap: 1.1rem;
  margin-top: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.form__notice { padding: .75rem 1rem; border-radius: var(--r-sm); background: var(--soft); font-size: .82rem; color: var(--ink-2); }
.form__notice strong { color: var(--accent); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .8rem; font-weight: 600; color: var(--ink); }
.field label span { font-weight: 400; color: var(--muted); }
.field input:not([type="checkbox"]), .field textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 1rem;
  resize: vertical;
  transition: border-color .3s, box-shadow .3s;
}
.field input:not([type="checkbox"]):focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field--check { grid-template-columns: auto 1fr; align-items: center; gap: .7rem; }
.field--check input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.field--check label { font-weight: 400; color: var(--ink-2); }
.form__actions .btn { width: 100%; }
.form__status { padding: .9rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--accent); font-size: .9rem; }

@media (max-width: 63.99rem) {
  .contact__shape { width: 100%; clip-path: polygon(0 75%, 100% 100%, 0 100%); }
  .contact__panel { grid-column: 1 / -1; grid-row: 1; padding-bottom: 3rem; }
  .contact__media { grid-column: 1 / -1; grid-row: 2; }
  .contact__media > img { max-height: 28rem; }
}
@media (max-width: 35.99rem) { .form__row { grid-template-columns: 1fr; } }

.site-footer { padding-block: clamp(3.5rem, 7vw, 5rem) max(2rem, env(safe-area-inset-bottom)); background: var(--soft); border-top: 1px solid var(--rule); font-size: .9rem; color: var(--ink-2); }
.footer__grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr; gap: 2.5rem var(--gap); }
.footer__brand { margin-bottom: .75rem; font-family: var(--serif); font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--accent); }
.footer__brand span { font-family: var(--sans); font-style: normal; font-size: .7rem; font-weight: 700; letter-spacing: .16em; color: var(--ink-2); }
.footer__id p:last-child { max-width: 24rem; }
.footer__head { margin-bottom: .9rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.footer__col li + li { margin-top: .4rem; }
.footer__legal { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2.5rem; margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); font-size: .78rem; line-height: 1.6; color: var(--muted); }
.footer__legal strong { color: var(--ink-2); }
.footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 2rem; font-size: .8rem; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.footer__links .theme-toggle--text { font-size: .8rem; }

@media (max-width: 47.99rem) {
  .footer__grid, .footer__legal { grid-template-columns: 1fr; }
  .footer__bar { flex-direction: column-reverse; align-items: flex-start; }
}

/* 13. Motion states ------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transition-property: opacity, transform, clip-path;
  transition-timing-function: var(--ease-out);
  transition-duration: 1s;
  transition-delay: var(--delay, 0s);
}
.js [data-reveal="heading"] { transform: translate3d(0, 1.25rem, 0); transition-duration: 1.2s; }
.js [data-reveal="text"]    { transform: translate3d(0, .9rem, 0); transition-delay: calc(var(--delay, 0s) + .1s); }
.js [data-reveal="meta"]    { transition-duration: .8s; }
.js [data-reveal="image"]   { transform: translate3d(0, 2rem, 0) scale(.98); transition-duration: 1.4s; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Hero choreography (after the intro, or on load) */
.js .hero__shape { transition: clip-path 1.6s var(--ease-in-out) .1s; }
.js:not(.is-ready) .hero__shape { clip-path: polygon(0 100%, 0 100%, 0 100%); }
@media (max-width: 63.99rem) { .js:not(.is-ready) .hero__shape { clip-path: polygon(0 100%, 0 100%, 0 100%); } }

.js [data-hero] { transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.js [data-hero="img"] { transition-duration: 1.6s; transition-delay: .35s; }
.js [data-hero="1"] { transition-delay: .5s; }
.js [data-hero="2"] { transition-delay: .6s; }
.js [data-hero="3"] { transition-delay: .75s; }
.js [data-hero="4"] { transition-delay: .9s; }
.js [data-hero="5"] { transition-delay: 1.15s; }
.js:not(.is-ready) [data-hero] { opacity: 0; transform: translate3d(0, 1rem, 0); }
.js:not(.is-ready) [data-hero="img"] { transform: translate3d(0, 3rem, 0); }

.js:not(.is-ready) .site-header { opacity: 0; transform: translate3d(0, -.5rem, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .intro__ambient { animation: none; }
  .intro__line, .intro.is-name .intro__line, .intro__mask > span { transform: none !important; }
  .intro.is-leaving { clip-path: none; opacity: 0; transition: opacity .7s ease; }
  .intro.is-leaving .intro__stage { transform: none; }
  .js [data-reveal], .js [data-hero] { transform: none !important; }
  .js .hero__shape { clip-path: polygon(0 10%, 100% 100%, 0 100%) !important; transition: none; }
  .js .pulse path { transition-duration: .01ms; }
  .mobile-menu { clip-path: none; opacity: 0; transition: opacity .3s; }
  .mobile-menu.is-open { opacity: 1; }
  .mobile-menu__list li { transform: none; }
  .service, .service__icon, .note__thumb > *, .consult__frame > *, .about__ring, .arrow { transition: none !important; }
  .service:hover { transform: none; }
  .status__dot { animation: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 63.99rem) {
  .js .hero__shape { clip-path: polygon(0 55%, 100% 100%, 0 100%) !important; }
}

/* A real photo in the hero / letter / contact slot: framed as an arch */
.media-arch {
  display: block;
  width: min(84%, 27rem) !important;
  max-height: none !important;
  aspect-ratio: 3 / 4;
  margin-inline: auto;
  object-fit: cover !important;
  object-position: 50% 22%;
  border-radius: 999px 999px 24px 24px;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 63.99rem) { .media-arch { width: min(78%, 22rem) !important; } }
.about__circle > img { object-position: 50% 22%; }

/* One-screen landing (all sections off) */
.soon {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1.3rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
@media (min-width: 64rem) {
  .is-single .hero {
    height: 100svh;
    min-height: 40rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: clamp(1.5rem, 4vh, 3rem);
  }
  .is-single .hero__grid { min-height: 0; flex: 1; }
  .is-single .hero__media > img.media-arch { max-height: calc(100svh - var(--header-h) - 15.5rem) !important; width: auto !important; margin-bottom: 1.5rem; }
}
@media (min-width: 64rem) and (min-height: 40rem) {
  html:has(body.is-single) { overflow: hidden; }
}

.menu-toggle[hidden] { display: none !important; }
@media (min-width: 64rem) {
  .is-single .hero__title { font-size: min(var(--fs-hero), 7.2vh); }
  .is-single .hero__lede { margin-top: min(1.5rem, 2vh); }
  .is-single .hero__actions { margin-top: min(2.25rem, 3vh); }
  .is-single .hero__grid { align-items: center; }
  .is-single .hero__media { align-self: center; }
  .is-single .hero__media > img.media-arch { max-height: calc(100svh - var(--header-h) - 14rem) !important; margin-bottom: 0; }
  .is-single .glance { margin-top: min(2rem, 3vh); }
}
