/*
 * εὖ-thera styles, refactored against Apple's HIG (dickwu/apple-design-skill) and
 * Apple's fluid-interface practice (emilkowalski/apple-design).
 *
 * Layers: the content layer uses opaque surfaces or a thick standard material;
 * Liquid Glass (web approximation) appears only on the floating functional
 * layer: the nav bar, the mobile menu and modal sheets.
 *
 * Shape system: controls are full pills; materials, glass and sheets are 28px;
 * images, inputs and phone slides are square.
 */

/* ---------- Tokens: named by role, with light, dark and increased-contrast values ---------- */
:root {
  color-scheme: light dark;
  --bg: #fcfcfc;
  --bg-2: #f1f2f2;
  --label: #202124;                       /* 15.6:1 on --bg */
  --label-2: #5f6065;                     /* 6.2:1 on --bg, 5.6:1 on --bg-2 */
  --separator: rgba(32, 33, 36, .12);
  --field-line: rgba(32, 33, 36, .34);
  --fill: #202124;                        /* primary action */
  --on-fill: #fcfcfc;
  --fill-hover: #3c3d42;
  --danger: #b3261e;                      /* 6.3:1 on --bg */
  --material: rgba(252, 252, 252, .9);    /* thick standard material, content layer */
  --glass: rgba(252, 252, 252, .68);      /* Liquid Glass regular, small bars */
  --glass-thick: rgba(252, 252, 252, .86);/* Liquid Glass regular, text-heavy sheets */
  --glass-edge: rgba(255, 255, 255, .6);
  --scrim: rgba(20, 21, 23, .5);
  --shadow: rgba(32, 33, 36, .14);
  --map-filter: grayscale(1) contrast(.92) brightness(1.03);
  --img-filter: none;

  /* Always-dark surfaces (hero, phone screen) keep these in both appearances */
  --night: #202124;
  --night-2: #2b2c30;
  --day: #fcfcfc;

  --font: "Commissioner", system-ui, sans-serif;
  --ease: cubic-bezier(.32, .72, 0, 1);   /* Apple-style ease-out */
  --nav-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161718;
    --bg-2: #1e1f21;
    --label: #ececed;                     /* softened white, 15.3:1 */
    --label-2: #a3a4a9;                   /* 7.2:1 on --bg, 6.7:1 on --bg-2 */
    --separator: rgba(255, 255, 255, .12);
    --field-line: rgba(255, 255, 255, .32);
    --fill: #ececed;
    --on-fill: #161718;
    --fill-hover: #c9c9cc;
    --danger: #f2b8b5;                    /* 11:1 on --bg */
    --material: rgba(30, 31, 33, .9);
    --glass: rgba(30, 31, 33, .62);
    --glass-thick: rgba(30, 31, 33, .86);
    --glass-edge: rgba(255, 255, 255, .14);
    --scrim: rgba(0, 0, 0, .6);
    --shadow: rgba(0, 0, 0, .45);
    --map-filter: grayscale(1) invert(1) brightness(.82) contrast(.88);
    --img-filter: brightness(.9);         /* soften bright photos in Dark Mode */
  }
}
/* TEMPORARY review toggle (main.js): an explicit choice wins over the system setting */
:root[data-theme="dark"] {
  --bg: #161718;
  --bg-2: #1e1f21;
  --label: #ececed;                     /* softened white, 15.3:1 */
  --label-2: #a3a4a9;                   /* 7.2:1 on --bg, 6.7:1 on --bg-2 */
  --separator: rgba(255, 255, 255, .12);
  --field-line: rgba(255, 255, 255, .32);
  --fill: #ececed;
  --on-fill: #161718;
  --fill-hover: #c9c9cc;
  --danger: #f2b8b5;                    /* 11:1 on --bg */
  --material: rgba(30, 31, 33, .9);
  --glass: rgba(30, 31, 33, .62);
  --glass-thick: rgba(30, 31, 33, .86);
  --glass-edge: rgba(255, 255, 255, .14);
  --scrim: rgba(0, 0, 0, .6);
  --shadow: rgba(0, 0, 0, .45);
  --map-filter: grayscale(1) invert(1) brightness(.82) contrast(.88);
  --img-filter: brightness(.9);         /* soften bright photos in Dark Mode */
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-contrast: more) {
  :root {
    --label-2: #3f4044;
    --separator: rgba(32, 33, 36, .45);
    --field-line: #202124;
    --material: #fcfcfc;
    --glass: rgba(252, 252, 252, .96);
    --glass-thick: #fcfcfc;
    --glass-edge: rgba(32, 33, 36, .5);
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --label-2: #d2d2d5;
    --separator: rgba(255, 255, 255, .45);
    --field-line: #ececed;
    --material: #1e1f21;
    --glass: rgba(22, 23, 24, .97);
    --glass-thick: #1e1f21;
    --glass-edge: rgba(255, 255, 255, .5);
  }
}
@media (prefers-contrast: more) {
  :root[data-theme="dark"] {
    --label-2: #d2d2d5;
    --separator: rgba(255, 255, 255, .45);
    --field-line: #ececed;
    --material: #1e1f21;
    --glass: rgba(22, 23, 24, .97);
    --glass-thick: #1e1f21;
    --glass-edge: rgba(255, 255, 255, .5);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Lenis smooth scroll (its recommended base rules); main.js only enables it for
   wheel input on pointer devices, never on touch or under reduced motion */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;          /* 17px at default, scales with the reader's text size */
  line-height: 1.6;
  color: var(--label);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

/* Tracking and leading are size-specific: tight for display, neutral for body */
h1, h2, h3 { margin: 0 0 .5em; font-weight: 350; }
h1 { line-height: 1.04; letter-spacing: -.03em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -.025em; }
h3 { font-size: 1.35rem; line-height: 1.25; font-weight: 450; letter-spacing: -.012em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(88px, 12vw, 168px) 0; }
/* Uppercasing is done in main.js (greekUpper) so Greek accents are dropped correctly */
.eyebrow { font-size: .8rem; letter-spacing: .14em; margin-bottom: 1.4em; font-weight: 500; }
.muted { color: var(--label-2); }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; font-size: .95rem; white-space: nowrap; }
/* Stand-alone links (section headings) get a 44px tap area; links inside text stay inline */
.section__head .link, .journal__controls .link { display: inline-flex; align-items: center; min-height: 44px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Buttons and press feedback ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 48px; padding: 0 30px; border-radius: 999px; border: 1px solid transparent;
  font: 500 .95rem var(--font); text-decoration: none; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn--light { background: var(--day); color: var(--night); }          /* always over the dark hero */
.btn--light:hover { background: transparent; color: var(--day); border-color: var(--day); }
.btn--primary { background: var(--fill); color: var(--on-fill); }
.btn--primary:hover { background: var(--fill-hover); }
.btn--ghost { background: transparent; color: var(--label); border-color: var(--separator); }
.btn--ghost:hover { border-color: var(--label); }
.btn[hidden] { display: none; }

/* Feedback lands on press, instantly */
.btn:active, .chip:active, .day:active, .round-btn:active, .slide__cta:active, .social a:active, .modal__close:active {
  transform: scale(.97); transition: transform 100ms ease-out;
}
.post:active { transform: scale(.985); transition: transform 100ms ease-out; }

/*
 * ---------- Nav ----------
 * Over the hero: an open, transparent bar aligned with the page.
 * Once scrolled: a compact Liquid Glass capsule, centred and sized to its
 * content, that drops in from above (transform + opacity only).
 */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, calc((100% - 1200px) / 2), env(safe-area-inset-right)) 0 max(16px, calc((100% - 1200px) / 2), env(safe-area-inset-left));
  color: var(--day);
}
.nav.is-scrolled {
  top: 10px; left: 0; right: 0; margin-inline: auto;
  width: max-content; max-width: calc(100% - 20px); height: 56px;
  justify-content: flex-start; gap: clamp(12px, 3vw, 40px);
  padding: 0 7px 0 22px; border-radius: 999px;
  color: var(--label);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  /* Tinted hairline so the capsule still has an edge over white content */
  border: 1px solid color-mix(in srgb, var(--label) 9%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 10px 30px var(--shadow), 0 1px 3px color-mix(in srgb, var(--label) 6%, transparent);
  animation: navDrop .55s var(--ease) both;
}
.nav:not(.is-scrolled) { animation: navFade .35s ease both; }
@keyframes navDrop { from { opacity: 0; transform: translateY(-18px) scale(.96); } }
@keyframes navFade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .nav.is-scrolled { animation: navFade .2s ease both; }
}

/* Content fades softly where it meets the bar, instead of a hard divider */
.scroll-edge {
  position: fixed; inset: 0 0 auto; height: 84px; z-index: 49; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 80%, transparent), transparent);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  opacity: 0; transition: opacity .4s var(--ease);
}
.scrolled .scroll-edge { opacity: 1; }

.nav__brand { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.logo { display: block; color: inherit; }
.logo--mark { height: 26px; width: calc(26px * 470 / 106); }
.nav.is-scrolled .logo--mark { height: 22px; width: calc(22px * 470 / 106); }
.nav__links { display: flex; gap: 4px; align-items: center; font-size: .94rem; font-weight: 500; }
/* Links get a soft pill on hover; the current section keeps it, like a selected tab */
.nav__links a { padding: 10px 14px; border-radius: 999px; text-decoration: none; transition: background .25s var(--ease); }
.nav__links a:not(.nav__cta):hover { background: rgba(255, 255, 255, .14); }
.nav.is-scrolled .nav__links a:not(.nav__cta):hover { background: color-mix(in srgb, var(--label) 6%, transparent); }
.nav.is-scrolled .nav__links a.is-active:not(.nav__cta) { background: color-mix(in srgb, var(--label) 9%, transparent); }
.nav__cta { display: inline-flex; align-items: center; min-height: 44px; margin-left: 8px; border: 1px solid currentColor; padding: 0 20px !important; }
.nav__cta:hover { background: rgba(255, 255, 255, .14); }
/* In the capsule the booking link is the one filled action */
.nav.is-scrolled .nav__cta { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.nav.is-scrolled .nav__cta:hover { background: var(--fill-hover); }
/* Nav order: brand · links · (temporary) theme toggle · mobile menu button */
.nav__links { order: 1; margin-left: auto; }
.nav__theme {
  order: 2; margin-left: 6px; width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 0; background: none; color: inherit; cursor: pointer; transition: background .25s var(--ease);
}
.nav__theme:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.nav__theme svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Shows the appearance it switches to: moon in light, sun in dark */
.nav__theme .icon-sun { display: none; }
:root[data-theme="dark"] .nav__theme .icon-sun { display: block; }
:root[data-theme="dark"] .nav__theme .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav__theme .icon-sun { display: block; }
  :root:not([data-theme="light"]) .nav__theme .icon-moon { display: none; }
}
/* Brief cross-fade when the appearance changes, instead of a hard brightness jump */
.theme-fade, .theme-fade *, .theme-fade *::before, .theme-fade *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease !important;
}
.nav__toggle { order: 3; display: none; background: none; border: 0; width: 44px; height: 44px; margin-right: -10px; cursor: pointer; color: inherit; position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  /* Mobile menu: a glass panel that grows from the toggle and retracts the same way */
  .nav__links {
    position: fixed; inset: calc(var(--nav-h) - 4px) 12px auto; flex-direction: column; gap: 0; align-items: stretch;
    padding: 8px 20px 16px; border-radius: 28px; color: var(--label);
    background: var(--glass-thick);
    -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
    border: 1px solid var(--glass-edge); box-shadow: 0 18px 40px var(--shadow);
    transform-origin: calc(100% - 24px) 0; transform: scale(.94); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .25s var(--ease);
  }
  .nav__links a { padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--separator); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a:hover, .nav.is-scrolled .nav__links a:hover, .nav.is-scrolled .nav__links a.is-active { background: none; }
  .nav__cta, .nav.is-scrolled .nav__cta { margin: 0; border: 0; border-radius: 0; min-height: 0; padding: 14px 0 !important; background: none; color: inherit; font-weight: 600; }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  /* Compact capsule on phones: logo and menu button; the glass makes it the containing
     block, so the menu panel is placed relative to the capsule */
  .nav.is-scrolled { gap: 4px; padding: 0 10px 0 20px; justify-content: flex-start; min-width: 240px; }
  .nav__theme { margin-left: auto; }
  .nav.is-scrolled .nav__links {
    position: absolute; inset: calc(100% + 8px) auto auto 50%;
    width: min(340px, calc(100vw - 24px)); margin-left: calc(min(340px, calc(100vw - 24px)) / -2);
    transform-origin: 50% 0;
  }
}

/* ---------- Hero: left-aligned over a darkened photo (dark in both appearances) ---------- */
.hero {
  position: relative; min-height: 100dvh; display: flex; align-items: flex-end;
  background: var(--night); color: var(--day); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; background: var(--night) center / cover no-repeat; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  /* Dense enough that white text passes AA even over a bright uploaded photo */
  background: linear-gradient(180deg, rgba(32,33,36,.7) 0%, rgba(32,33,36,.66) 10%, rgba(32,33,36,.5) 30%, rgba(32,33,36,.72) 50%, rgba(32,33,36,.92) 100%);
}
.hero__inner { position: relative; padding-bottom: clamp(64px, 12vh, 128px); }
.hero__title { font-size: clamp(2.5rem, 5.6vw, 4.8rem); font-weight: 350; max-width: 15ch; margin-bottom: .45em; }
.hero__sub { font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.9); max-width: 46ch; margin-bottom: 2.4em; }
.hero .eyebrow { color: rgba(255,255,255,.9); }

/* Short landscape screens (phones held sideways): tighter hero so the call to action stays on the first screen */
@media (max-height: 460px) and (orientation: landscape) {
  .hero__inner { padding-bottom: 24px; }
  .hero .eyebrow { margin-bottom: .8em; }
  .hero__title { font-size: clamp(1.8rem, 9vh, 2.4rem); margin-bottom: .35em; }
  .hero__sub { margin-bottom: 1.2em; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__bg { animation: heroDrift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    @keyframes heroDrift { from { transform: scale(1.06); } to { transform: translateY(14%) scale(1.06); } }
  }
}

/* Hero copy arrives once, in sequence */
.load { opacity: 0; transform: translateY(16px); animation: loadIn 1s var(--ease) forwards; }
.load:nth-child(2) { animation-delay: .08s; }
.load:nth-child(3) { animation-delay: .16s; }
.load:nth-child(4) { animation-delay: .24s; }
@keyframes loadIn { to { opacity: 1; transform: none; } }

/* ---------- Intro ---------- */
.intro__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 9vw, 140px); align-items: center; }
.intro__portrait { margin: 0; aspect-ratio: 4 / 5; background: var(--bg-2); overflow: hidden; }
.intro__portrait img, .post__img img, .slide__img img { filter: var(--img-filter); }
.intro__portrait img { width: 100%; height: 100%; object-fit: cover; }
.intro__body { max-width: 52ch; }
.intro__body p { font-size: 1.1rem; }
.tags { list-style: none; padding: 0; margin: 2.2em 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .9rem; color: var(--label-2); }
@media (max-width: 760px) { .intro__grid { grid-template-columns: 1fr; } .intro__portrait { max-width: 420px; } }

.section__head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 680px; }
.section__head p { margin: 0; }
.section__head--row { display: flex; justify-content: space-between; align-items: baseline; max-width: none; gap: 24px; }
.section__head--row h2 { margin: 0; }

/*
 * ---------- Services ----------
 * A full-width row of four columns divided by hairlines (2 × 2 on tablets,
 * stacked on phones). Each column's line icon draws in when it scrolls into view
 * (.is-visible from the reveal observer), staggered by --d.
 */
.svc-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--separator); }
.svc { display: flex; flex-direction: column; padding: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 36px) 8px; border-right: 1px solid var(--separator); transition-delay: var(--d, 0ms); }
.svc:first-child { padding-left: 0; }
.svc:last-child { padding-right: 0; border-right: 0; }
.svc h3 { margin: 28px 0 10px; }
.svc > p { color: var(--label-2); margin: 0; flex: 1; max-width: 34ch; }
.svc__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 28px; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .9rem; }

@media (max-width: 1000px) {
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc { padding: 32px 28px 32px; }
  .svc:nth-child(odd) { padding-left: 0; }
  .svc:nth-child(even) { padding-right: 0; border-right: 0; }
  .svc:nth-child(-n + 2) { border-bottom: 1px solid var(--separator); }
}
@media (max-width: 600px) {
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .svc, .svc:nth-child(odd), .svc:nth-child(even) { padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--separator); }
  .svc:last-child { border-bottom: 0; }
  .svc h3 { margin-top: 20px; }
  .svc__foot { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}

/* Line icons: drawn strokes plus one motion per icon that says something about the service */
.svc__icon { width: 56px; height: 56px; overflow: visible; color: var(--label); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.svc:hover .svc__icon { transform: translateY(-3px); }
.svc__icon .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.svc__icon .halo { stroke: var(--separator); transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(.8); }
.svc__icon .pair-l, .svc__icon .pair-r { opacity: 0; }
.svc__icon .pop { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.6); }
.svc__icon .bar { fill: currentColor; stroke: none; opacity: 0; transform-box: fill-box; transform-origin: bottom; transform: scaleY(.3); }

.svc.is-visible .draw { animation: iconDraw 1.1s var(--ease) forwards; animation-delay: calc(var(--d, 0ms) + var(--s, 0ms) + 150ms); }
.svc.is-visible .halo { animation: iconSettle 1.4s var(--ease) forwards; animation-delay: calc(var(--d, 0ms) + 500ms); }        /* a calm space opens around one person */
.svc.is-visible .pair-l { animation: pairLeft 1.1s var(--ease) forwards; animation-delay: calc(var(--d, 0ms) + 150ms); }      /* two people move toward each other */
.svc.is-visible .pair-r { animation: pairRight 1.1s var(--ease) forwards; animation-delay: calc(var(--d, 0ms) + 150ms); }
.svc.is-visible .pop { animation: iconSettle .7s var(--ease) forwards; animation-delay: calc(var(--d, 0ms) + 750ms); }        /* someone appears on the screen */
.svc.is-visible .bar { animation: iconCharge .5s var(--ease) forwards; animation-delay: calc(var(--d, 0ms) + 650ms + var(--b) * 260ms); }  /* energy recharges */

@keyframes iconDraw { to { stroke-dashoffset: 0; } }
@keyframes iconSettle { to { opacity: 1; transform: none; } }
@keyframes pairLeft { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }
@keyframes pairRight { from { opacity: 0; transform: translateX(7px); } to { opacity: 1; transform: none; } }
@keyframes iconCharge { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .svc__icon .draw { stroke-dashoffset: 0; }
  .svc__icon .halo, .svc__icon .pair-l, .svc__icon .pair-r, .svc__icon .pop, .svc__icon .bar { opacity: 1; transform: none; }
  .svc.is-visible .svc__icon * { animation: none !important; }
}

/* Session timer: the ring draws while the minutes count up (.is-counting set in main.js) */
.timer { display: flex; align-items: center; gap: .6em; font-size: .92rem; color: var(--label-2); }
.timer__icon { width: 2.1em; height: 2.1em; flex: none; fill: none; stroke-linecap: round; }
.timer__knob { stroke: var(--label); stroke-width: 2; }
.timer__track { stroke: var(--separator); stroke-width: 2; }
.timer__ring {
  stroke: var(--label); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100;
  transform: rotate(-90deg); transform-origin: 18px 21px;
}
.is-counting .timer__ring { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease); }
.is-counting .timer__knob { animation: knobPress .5s var(--ease); }
@keyframes knobPress { 50% { transform: translateY(1.5px); } }
.timer__num { font-weight: 500; color: var(--label); font-variant-numeric: tabular-nums; display: inline-block; min-width: 2ch; text-align: right; }
@media (prefers-reduced-motion: reduce) { .timer__ring { stroke-dashoffset: 0; } }

/* ---------- Journal: full-height section, horizontally scrolling row of articles ---------- */
.journal { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.journal__controls { display: flex; align-items: center; gap: 10px; }
.journal__controls .link { margin-right: 14px; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--separator); background: transparent;
  color: var(--label); font: 400 1.1rem var(--font); cursor: pointer; transition: border-color .25s, opacity .25s, transform .3s var(--ease);
}
.round-btn:hover { border-color: var(--label); }
.round-btn:disabled { opacity: .35; cursor: default; border-color: var(--separator); }
/* Two columns with the brand separator between them; stacked on narrow screens */
.journal__split { display: grid; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1fr); gap: clamp(32px, 4.5vw, 72px); align-items: start; }
.journal .section__head { margin-bottom: 32px; }
.journal h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
.journal__divider {
  position: relative; align-self: stretch; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--separator) 12%, var(--separator) 88%, transparent);
}
.journal__mark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--separator); color: var(--label-2);
}
.journal__mark svg { width: 22px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (max-width: 900px) {
  .journal__split { grid-template-columns: minmax(0, 1fr); }   /* minmax(0) lets the article row scroll instead of widening the page */
  .journal__divider { width: auto; height: 1px; margin: 8px 0; background: linear-gradient(to right, transparent, var(--separator) 12%, var(--separator) 88%, transparent); }
}

/* Articles row: snaps per card; the far edge fades to show it continues */
.posts {
  display: flex; gap: clamp(16px, 2vw, 24px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 4px 0 8px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
}
.posts::-webkit-scrollbar { display: none; }
.post {
  flex: 0 0 min(300px, 80%); scroll-snap-align: start; min-width: 0;
  cursor: pointer; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit;
  display: flex; flex-direction: column; justify-content: flex-start;   /* buttons centre content by default */
  transition: transform .3s var(--ease);
}
.post__img { aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; margin-bottom: 20px; }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .post__img img { transform: scale(1.04); }
.post__meta { font-size: .85rem; letter-spacing: .01em; color: var(--label-2); margin-bottom: .5em; }
.post h3 { transition: opacity .3s; }
.post:hover h3 { opacity: .7; }
.post p { color: var(--label-2); font-size: .98rem; margin: 0; }
/* Latest Instagram posts: 3 × 2 square grid */
.insta { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.insta a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--bg-2); transition: transform .3s var(--ease); }
.insta img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); transition: transform 1s var(--ease), opacity .3s; }
.insta a:hover img { transform: scale(1.05); opacity: .9; }
.insta a:active { transform: scale(.97); transition: transform 100ms ease-out; }

@media (max-width: 560px) {
  .journal__controls .round-btn { display: none; }   /* swipe on touch screens */
  .journal__controls .link { margin-right: 0; }
}

/* ---------- Contact: desaturated map behind a thick standard material (content layer) ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; background: var(--bg-2); }
.contact__map { position: absolute; inset: 0; z-index: 0; background: var(--bg-2); }
.contact__map .leaflet-tile-pane { filter: var(--map-filter); }
.contact__map .leaflet-control-attribution { font: 10px var(--font); background: rgba(252,252,252,.8); color: #5f6065; }
.contact__map .leaflet-control-attribution a { color: inherit; }
.contact > .container { position: relative; z-index: 1; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.contact__aside { padding: clamp(24px, 4vw, 48px); }
.contact__aside > p { max-width: 42ch; }
.contact__details { margin: 2.4em 0 0; display: grid; gap: 18px; }
.contact__details dt { font-size: .85rem; color: var(--label-2); }
.contact__details dd { margin: 0; }
.contact__details .link { margin-left: .4em; font-size: .9rem; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

/* Thick material: near-opaque so text reads like it does on a solid surface */
.material {
  border-radius: 28px;
  background: var(--material);
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--separator);
  box-shadow: 0 20px 50px var(--shadow);
}

/* Map pin marks the practice; it pulses three times, then rests */
.map-pin { border-radius: 50%; background: var(--label); box-shadow: 0 0 0 4px var(--bg); }
.map-pin::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid var(--label); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .map-pin::after { animation: pinRing 2.4s var(--ease) 3; }
  @keyframes pinRing { 0% { transform: scale(.4); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
}

/* Reduced transparency: every material and glass surface turns opaque */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --material: var(--bg); --glass: var(--bg); --glass-thick: var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --material: var(--bg); --glass: var(--bg); --glass-thick: var(--bg); }
  .material, .nav, .nav__links, .modal__panel, .scroll-edge { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.social { display: flex; gap: 12px; }
.social a {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--separator);
  display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.social a:hover { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Forms (contact wizard and booking) ---------- */
.wizard { background: var(--bg); padding: clamp(24px, 4vw, 52px); }
.wizard.material { background: var(--material); }
.wizard__progress { height: 2px; background: var(--separator); margin-bottom: 12px; border-radius: 2px; overflow: hidden; }
.wizard__progress span { display: block; height: 100%; width: 25%; background: var(--label); transition: width .6s var(--ease); }
.wizard__count { font-size: .85rem; letter-spacing: .01em; color: var(--label-2); margin-bottom: 28px; }
.wizard fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.wizard__step { display: none; }
.wizard__step.is-active { display: block; animation: stepIn .45s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wizard__step.is-active { animation: fadeIn .2s ease; } @keyframes fadeIn { from { opacity: 0; } } }
.wizard legend { font-size: 1.6rem; font-weight: 400; line-height: 1.2; letter-spacing: -.018em; margin-bottom: .4em; padding: 0; }
.wizard__label { font-size: .9rem; margin: 28px 0 12px; color: var(--label-2); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  font: 500 .92rem var(--font); min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--separator); background: transparent; color: var(--label);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .3s var(--ease);
}
.chip:hover { border-color: var(--label); }
.chip[aria-pressed="true"] { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.chip:disabled { cursor: not-allowed; text-decoration: line-through; color: var(--label-2); border-style: dashed; }
.chip:disabled:hover { border-color: var(--separator); }
.field { display: block; margin-bottom: 22px; }
.field span { display: block; font-size: .88rem; color: var(--label-2); margin-bottom: 6px; }
.field em { font-style: normal; }
.field input, .field textarea {
  width: 100%; min-height: 44px; font: 400 1rem var(--font); color: var(--label); background: transparent;
  border: 0; border-bottom: 1px solid var(--field-line); padding: 8px 0; border-radius: 0; resize: vertical;
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--label); }
.field input.is-invalid { border-color: var(--danger); }
.summary { display: grid; gap: 12px; margin: 20px 0 28px; }
.summary div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.summary dt { font-size: .88rem; color: var(--label-2); }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.check { display: flex; gap: 12px; font-size: .92rem; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--fill); }
.wizard__error { color: var(--danger); font-size: .9rem; min-height: 1.4em; margin: 16px 0 0; }
.wizard__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.wizard__nav .btn--primary { margin-left: auto; }
.wizard__done { text-align: center; padding: 48px 0; }
.wizard__done p { font-size: 1.35rem; font-weight: 400; line-height: 1.4; max-width: 380px; margin: 0 auto; }
.wizard__tick { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--label); margin: 0 auto 24px; position: relative; }
.wizard__tick::after { content: ""; position: absolute; left: 20px; top: 15px; width: 12px; height: 22px; border: solid var(--label); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.wizard.is-done .wizard__progress, .wizard.is-done .wizard__count, .wizard.is-done .wizard__nav, .wizard.is-done .wizard__error { display: none; }

/* Booking */
.booking__title { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-bottom: .8em; padding-right: 44px; }
.wizard--bare { padding: 0; background: none; }
.days {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 16px -2px 12px;
  scroll-snap-type: x proximity; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; scroll-snap-align: start; display: grid; justify-items: center; gap: 2px;
  min-width: 64px; padding: 12px 10px; border-radius: 999px; cursor: pointer;
  font: 500 .8rem var(--font); color: var(--label); background: transparent; border: 1px solid var(--separator);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .3s var(--ease);
}
.day b { font-size: 1.25rem; font-weight: 400; }
.day span { color: var(--label-2); }
.day:hover { border-color: var(--label); }
.day[aria-pressed="true"] { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.day[aria-pressed="true"] span { color: inherit; opacity: .8; }
.day:disabled { cursor: not-allowed; border-style: dashed; color: var(--label-2); }
.day:disabled b { text-decoration: line-through; }
.day:disabled:hover { border-color: var(--separator); }
#bk-slots .muted { margin: 4px 0 0; font-size: .92rem; }

/* ---------- Footer: one quiet line, no repeated logo ---------- */
.footer { background: var(--bg); color: var(--label-2); border-top: 1px solid var(--separator); padding: 20px 0 calc(20px + env(safe-area-inset-bottom)); font-size: .85rem; }
.footer__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
.footer p { margin: 0; }
.footer .footer__copy { margin-right: auto; }
.footer .social { gap: 0; margin-right: -12px; }
.footer .social a { border: 0; color: var(--label-2); }
.footer .social a:hover { background: none; color: var(--label); }
.footer .social svg { width: 15px; height: 15px; }
.footer .footer__crisis { margin: 6px auto 0; font-size: .8rem; }

/*
 * ---------- Modals: Liquid Glass sheets (functional layer) ----------
 * They grow from the control that opened them (--origin set in main.js) and
 * leave along the same path. On compact widths they become bottom sheets that
 * can be dragged down to dismiss.
 */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; visibility: hidden; transition: visibility 0s .4s; }
.modal__backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .4s var(--ease); }
.modal__panel {
  position: relative; width: min(720px, 100%); max-height: 88vh; overflow: auto; overscroll-behavior: contain;
  padding: clamp(32px, 6vw, 72px); border-radius: 28px;
  background: var(--glass-thick);
  -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 30px 80px var(--shadow);
  transform-origin: var(--origin, 50% 50%);
  opacity: 0; transform: scale(.92);
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.modal.is-open { visibility: visible; transition: none; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }
.modal__close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: none; border: 0; cursor: pointer;
  font-size: 1.8rem; line-height: 1; color: var(--label); font-weight: 300; transition: background .2s, transform .3s var(--ease);
}
.modal__close:hover { background: var(--separator); }
.modal__body p { font-size: 1.05rem; max-width: 60ch; }
.sheet-handle { display: none; }

@media (max-width: 600px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal__panel {
    width: 100%; max-height: 92dvh; border-radius: 28px 28px 0 0; border-bottom: 0;
    padding: 40px 20px calc(28px + env(safe-area-inset-bottom));
    transform: translateY(100%); opacity: 1;
    transition: transform .45s var(--ease);
  }
  /* Drag zone along the top edge (left of the close button); main.js wires the gesture */
  .sheet-handle { display: block; position: absolute; top: 0; left: 0; right: 60px; height: 44px; z-index: 2; touch-action: none; cursor: grab; }
  /* Grabber: the sheet can be dragged down to dismiss */
  .modal__panel::before {
    content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px;
    border-radius: 3px; background: var(--label-2); opacity: .45;
  }
  .modal.is-open .modal__panel { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal__panel, .modal.is-open .modal__panel { transform: none !important; transition: opacity .2s ease; }
  .modal:not(.is-open) .modal__panel { opacity: 0; }
}

/*
 * ---------- 3D fold ----------
 * Each section unfolds gently from a top hinge as it scrolls in, and the hero
 * folds back as it scrolls out. Scrubbed by scroll where supported; one-shot via
 * IntersectionObserver otherwise (see main.js). Off under reduced motion.
 */
.section { transform-origin: 50% 0; backface-visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .section {
      animation: unfold linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 60vh;
    }
    .hero {
      transform-origin: 50% 100%;
      animation: foldAway linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
  .no-scroll-timeline .section {
    transform: perspective(1400px) rotateX(-12deg);
    opacity: .5;
    transition: transform 1s var(--ease), opacity 1s var(--ease);
  }
  .no-scroll-timeline .section.is-unfolded { transform: none; opacity: 1; }
}

@keyframes unfold {
  from { transform: perspective(1400px) rotateX(-12deg); opacity: .55; }
  to   { transform: perspective(1400px) rotateX(0deg); opacity: 1; }
}
@keyframes foldAway {
  from { transform: perspective(1600px) rotateX(0deg); }
  to   { transform: perspective(1600px) rotateX(10deg) scale(.97); filter: brightness(.7); }
}

/* Reveal on scroll: a short rise; reduced motion gets the content immediately */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .load { opacity: 1; transform: none; transition: none; animation: none; }
}
