/* ═══════════════════════════════════════════════════
   MediSmith — Medical & Therapy Centre
   ═══════════════════════════════════════════════════ */

/* Palette sampled directly from the medismith logo board:
   cream #DFCBB8 · gold #A87A38 · charcoal #272521.
   The deep green is drawn from the practice photography. */
:root{
  --ink:        #101E17;   /* page — deep forest */
  --ink-2:      #16281E;   /* raised surfaces */
  --ink-3:      #1C3327;   /* hover */
  --ink-deep:   #0B1610;   /* nav scrim, footer */

  --line:       rgba(223,203,184,.16);
  --line-soft:  rgba(223,203,184,.09);

  --cream:      #EDE3D7;   /* body text on green */
  --cream-dim:  rgba(237,227,215,.66);
  --cream-faint:rgba(237,227,215,.55);

  --sand:       #DFCBB8;   /* the logo board cream */
  --sand-lt:    #F0E7DC;

  --gold:       #C08D45;   /* logo gold, lifted for dark ground */
  --gold-soft:  #D6A65E;
  --gold-true:  #A87A38;   /* logo gold as sampled — decorative use */
  --gold-ink:   #6B4A1C;   /* darkened gold — text on the cream band (AA) */

  --ease: cubic-bezier(.22,.61,.36,1);
  --max: 1240px;
}

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

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

body{
  margin:0;
  background:var(--ink);
  color:var(--cream);
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-weight:300;
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3{ margin:0; font-weight:400; }

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

/* film grain */
.grain{
  position:fixed; inset:0; z-index:9999; pointer-events:none; opacity:.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── reveal ───────────────────────────────────────── */
.reveal{
  opacity:0; transform:translateY(26px);
  transition:opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal[data-delay="1"]{ transition-delay:.10s }
.reveal[data-delay="2"]{ transition-delay:.20s }
.reveal[data-delay="3"]{ transition-delay:.30s }
.reveal.in{ opacity:1; transform:none; }

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto }
  .reveal{ opacity:1; transform:none; transition:none }
  *{ animation:none !important }
}

/* ═══ NAV ══════════════════════════════════════════ */
.nav{
  position:fixed; top:0; left:0; right:0; z-index:100;
  display:flex; align-items:center; gap:2rem;
  padding:1.15rem clamp(1.1rem,4vw,3rem);
  transition:background .45s var(--ease), padding .45s var(--ease), border-color .45s var(--ease);
  border-bottom:1px solid transparent;
}
.nav.stuck,.nav.menu-open{
  background:rgba(223,203,184,.88);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom-color:var(--line-soft);
  padding-top:.8rem; padding-bottom:.8rem;
}
/* an open menu needs an opaque bar — the panel below it is solid */
.nav.menu-open{ background:rgba(223,203,184,.98) }

.nav__brand{
  display:flex; align-items:center; gap:.7rem;
  font-family:'Cormorant Garamond',serif; font-size:1.95rem; letter-spacing:.01em;
  margin-right:auto;
}
.nav__mark{ width:30px; height:30px; color:var(--gold-true); flex:none }
.nav__links{ display:flex; align-items:center; gap:2rem; }

/* ── hamburger ─────────────────────────────────────
   Hidden above the mobile breakpoint; the bars morph into a cross. */
.nav__toggle{
  display:none; order:3; width:44px; height:44px; padding:0;
  align-items:center; justify-content:center;
  background:none; border:0; cursor:pointer; color:#12211A;
}
.nav__burger{ position:relative; display:block; width:22px; height:1.5px; background:currentColor }
.nav__burger::before,.nav__burger::after{
  content:''; position:absolute; left:0; height:1.5px; background:currentColor;
}
.nav__burger,
.nav__burger::before,
.nav__burger::after{
  border-radius:2px;
  transition:transform .35s var(--ease), width .35s var(--ease), background-color .2s linear;
}
.nav__burger::before{ top:-7px; width:22px }
.nav__burger::after{ top:7px; width:14px }
.nav__toggle[aria-expanded="true"] .nav__burger{ background:transparent }
.nav__toggle[aria-expanded="true"] .nav__burger::before{ transform:translateY(7px) rotate(45deg) }
.nav__toggle[aria-expanded="true"] .nav__burger::after{ transform:translateY(-7px) rotate(-45deg); width:22px }
.nav__links a{
  font-size:.74rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--cream-dim); position:relative; padding-block:.25rem;
  transition:color .3s var(--ease);
}
.nav__links a::after{
  content:''; position:absolute; left:0; bottom:0; height:1px; width:0;
  background:var(--gold); transition:width .4s var(--ease);
}
.nav__links a:hover{ color:var(--cream) }
.nav__links a:hover::after{ width:100% }

/* ═══ BUTTONS ══════════════════════════════════════ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  padding:.82rem 1.5rem; border-radius:2px; cursor:pointer;
  font-size:.72rem; letter-spacing:.15em; text-transform:uppercase; font-weight:500;
  border:1px solid var(--line); background:transparent; color:var(--cream);
  transition:background .35s var(--ease), color .35s var(--ease),
             border-color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover{ transform:translateY(-2px) }
.btn--gold{ background:var(--gold); border-color:var(--gold); color:#0E1B14 }
.btn--gold:hover{ background:var(--gold-soft); border-color:var(--gold-soft) }
.btn--ghost:hover{ border-color:var(--gold); color:var(--gold) }
.btn[aria-disabled="true"]{ opacity:.45; pointer-events:none }
.ico{ width:15px; height:15px; flex:none }

.nav__cta{ padding:.62rem 1.1rem }
/* between the mobile menu and full width there is no room for the CTA */
@media (max-width:900px) and (min-width:769px){ .nav__cta{ display:none } }
@media (max-width:860px) and (min-width:769px){
  .nav__links{ gap:1.3rem }
  .nav__links a{ font-size:.68rem }
}

/* ═══ MOBILE NAV — dropdown ════════════════════════
   Below 768px the links collapse behind the hamburger, which frees the
   whole left side for a properly sized logo. */
@media (max-width:768px){
  .nav__toggle{ display:inline-flex }

  /* the mark stays at its base 30px here; only the wordmark steps down */
  .nav__brand{ font-size:1.8rem; gap:.55rem }

  .nav__links{
    position:absolute; top:100%; left:0; right:0;
    flex-direction:column; align-items:stretch; gap:0;
    padding:.2rem clamp(1.1rem,4vw,3rem) 1.2rem;
    background:var(--sand);
    border-bottom:1px solid rgba(18,33,26,.16);
    box-shadow:0 26px 44px -28px rgba(18,33,26,.55);

    visibility:hidden; opacity:0; transform:translateY(-10px);
    pointer-events:none;   /* nothing tappable while it fades out */
    transition:opacity .32s var(--ease), transform .32s var(--ease),
               visibility 0s linear .32s;
  }
  .nav__links.open{
    visibility:visible; opacity:1; transform:none;
    pointer-events:auto;
    transition-delay:0s, 0s, 0s;
  }

  .nav__links a{
    font-size:.8rem; letter-spacing:.16em; padding:1.15rem 0;
    border-bottom:1px solid rgba(18,33,26,.12);
  }
  .nav__links a::after{ display:none }
  .nav__links a::before{ left:0; right:0 }

  .nav__cta{
    display:flex; margin-top:1.15rem; width:100%;
    padding:.95rem 1.1rem; border-bottom:0;
  }
}

@media (max-width:380px){
  .nav{ padding-left:.9rem; padding-right:.9rem }
  .nav__brand{ font-size:1.6rem }
  .nav__mark{ width:26px; height:26px }
}

/* ═══ THE CREAM GROUND ═════════════════════════════
   The nav, hero and disciplines band sit on the logo board's cream.
   Re-pointing the text tokens here re-tints everything inside in one
   move. Sections on a dark ground just use the root tokens. */
.nav,.hero,.disciplines{
  --cream:      #12211A;
  --cream-dim:  rgba(18,33,26,.78);
  --cream-faint:rgba(18,33,26,.68);
  --gold:       var(--gold-ink);
  --line:       rgba(18,33,26,.18);
  --line-soft:  rgba(18,33,26,.11);
  color:#12211A;
}
.hero,.disciplines{ background:var(--sand) }

/* on cream, a gold-filled button needs light type */
.hero .btn--gold,.disciplines .btn--gold{ color:#F0E7DC }

/* ═══ TOUCH TARGETS ════════════════════════════════
   WCAG 2.5.5 asks for 44x44. Inline links grow an invisible ::before
   rather than real padding, so the layout is untouched. */
.nav__brand{ min-height:44px; min-width:44px }
.btn{ min-height:44px }
.nav__links a::before,
.hero__addr::before,
.modal__tel::before,
.modal__email::before{
  content:''; position:absolute; left:-8px; right:-8px;
  top:50%; height:44px; transform:translateY(-50%);
}
.hero__addr,.modal__tel,.modal__email{ position:relative }

/* ═══ HERO ═════════════════════════════════════════ */
.hero{
  min-height:100vh;          /* fallback for browsers without svh */
  min-height:100svh; display:grid; place-items:center;
  padding:8rem clamp(1.1rem,5vw,3rem) 5rem; position:relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(107,74,28,.09), transparent 60%),
    radial-gradient(90% 60% at 50% 100%, rgba(107,74,28,.06), transparent 65%),
    var(--sand);
}
.hero::after{
  content:''; position:absolute; left:50%; bottom:0; width:1px; height:14vh;
  background:linear-gradient(var(--line), transparent);
}
.hero__inner{ max-width:820px; text-align:center; }

.hero__logoimg{ max-width:420px; margin:0 auto 2rem; display:none }
.hero__logoimg.ok{ display:block }
.hero__logofallback.hide{ display:none }

.hero__cross{ width:56px; height:56px; color:var(--gold-true); margin:0 auto 1.6rem }
.hero__wordmark{
  font-family:'Cormorant Garamond',serif; font-weight:400;
  font-size:clamp(3.6rem,13vw,8.5rem); line-height:.9; letter-spacing:-.015em;
  color:#12211A;   /* dark wordmark on cream, exactly as the logo board sets it */
}
.hero__rule{
  display:flex; flex-direction:column; align-items:center; gap:.25rem;
  margin:1.6rem 0 0; position:relative;
  font-size:clamp(.6rem,1.9vw,.78rem); letter-spacing:.28em; text-transform:uppercase;
  color:var(--cream-dim);
}
.hero__rule::before,.hero__rule::after{
  content:''; position:absolute; top:.45em; width:clamp(18px,5vw,54px); height:1px; background:var(--gold-true);
}
.hero__rule::before{ right:calc(100% + 1rem) }
.hero__rule::after{ left:calc(100% + 1rem) }
.hero__rule .af{ color:var(--cream-faint) }
/* the flanking gold rules run past the viewport on narrow screens */
@media (max-width:640px){ .hero__rule::before,.hero__rule::after{ display:none } }

/* On a small phone the hero already runs past the fold, which puts the
   scroll cue below it where nobody sees it. Reclaim the space instead. */
@media (max-width:600px){
  .hero{ padding:7rem 1.1rem 3rem }
  .hero__scroll{ display:none }
  .hero__lede{ margin-top:2rem }
}

/* A phone held sideways has ~375px of height. At full size the hero runs to
   twice the viewport and you land on a cropped wordmark, so compress it. */
@media (max-height:540px) and (orientation:landscape){
  .hero{ min-height:0; padding:6rem clamp(1.1rem,5vw,3rem) 3rem }
  .hero__cross{ width:34px; height:34px; margin-bottom:.9rem }
  .hero__wordmark{ font-size:clamp(2.4rem,8.5vw,4.4rem) }
  .hero__rule{ margin-top:.9rem }
  .hero__lede{ margin-top:1.3rem; font-size:.95rem; line-height:1.6 }
  .hero__meta{ margin-top:1rem }
  .hero__scroll{ display:none }
  .hero::after{ display:none }
}

.hero__lede{
  margin:2.8rem auto 0; max-width:56ch;
  font-size:clamp(1rem,2.1vw,1.18rem); color:var(--cream-dim); line-height:1.85;
}
.hero__meta{
  margin-top:2rem; display:flex; align-items:center; justify-content:center;
  gap:1rem; flex-wrap:wrap;
  font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--cream-faint);
}
.hero__addr{ border-bottom:1px solid var(--line); padding-bottom:2px; transition:color .3s,border-color .3s }
.hero__addr:hover{ color:var(--gold); border-color:var(--gold) }
.dot{ width:3px; height:3px; border-radius:50%; background:var(--gold-true) }

.hero__scroll{
  display:block; width:1px; height:56px; margin:4rem auto 0;
  background:var(--line); position:relative; overflow:hidden;
}
.hero__scroll span{
  position:absolute; inset:0; background:var(--gold-true);
  animation:trickle 2.4s var(--ease) infinite;
}
@keyframes trickle{
  0%{ transform:translateY(-100%) } 60%,100%{ transform:translateY(100%) }
}

/* ═══ SECTION SHARED ═══════════════════════════════ */
.team,.disciplines,.visit{ padding:clamp(5rem,11vw,9rem) clamp(1.1rem,5vw,3rem) }

/* ═══ SECTION 1 — the black stage ══════════════════
   Cards are unchanged; the ground drops to black and a gold spotlight
   tracks the cursor across the grid. Both are pointer-only and both
   stand down under prefers-reduced-motion. */
.team{ position:relative; background:#000; isolation:isolate }
.team::before{
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background:radial-gradient(460px circle at var(--mx,50%) var(--my,30%),
             rgba(192,141,69,.11), transparent 68%);
  opacity:0; transition:opacity .6s var(--ease);
}
.team.is-live::before{ opacity:1 }
.team .section__head,.team .grid{ position:relative; z-index:1 }

/* a hairline that draws itself in under the section title */
.team .section__title{ position:relative; padding-bottom:1.1rem }
.team .section__title::after{
  content:''; position:absolute; left:0; bottom:0; height:1px; width:0;
  background:linear-gradient(90deg,var(--gold),transparent);
  transition:width 1.2s var(--ease) .3s;
}
.team .section__head.in .section__title::after{ width:min(320px,60%) }
.section__head{ max-width:var(--max); margin:0 auto clamp(3rem,6vw,4.5rem) }
.eyebrow{
  margin:0 0 1rem; font-size:.7rem; letter-spacing:.28em; text-transform:uppercase;
  color:var(--gold); display:flex; align-items:center; gap:.85rem;
}
.eyebrow::after{ content:''; height:1px; width:56px; background:var(--line) }
.section__title{
  font-family:'Cormorant Garamond',serif;
  font-size:clamp(2.2rem,5.6vw,4rem); line-height:1.05; letter-spacing:-.01em;
  max-width:16ch;
}
.section__sub{
  margin:1.4rem 0 0; max-width:52ch; color:var(--cream-dim);
  font-size:clamp(.95rem,1.7vw,1.05rem);
}

/* ═══ GRID / CARDS ═════════════════════════════════ */
.grid{
  max-width:var(--max); margin:0 auto;
  display:grid; gap:clamp(1rem,2.2vw,1.8rem);
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
}
/* Nine practitioners: pinned to three columns on desktop so they fall as a
   clean 3x3, the way the practice's own board reads. Left to auto-fill, a
   wide screen makes four columns and strands a single card on the last row. */
@media (min-width:1000px){ .grid{ grid-template-columns:repeat(3,1fr) } }

/* the cards stay green panels standing on the cream ground, so the
   portrait scrim and its overlaid type keep working as before */
.card{
  --cream:      #EDE3D7;
  --cream-dim:  rgba(237,227,215,.72);
  --cream-faint:rgba(237,227,215,.68);
  --gold:       #C08D45;
  --line:       rgba(223,203,184,.16);
  --line-soft:  rgba(223,203,184,.09);

  position:relative; cursor:pointer; overflow:hidden; color:var(--cream);
  background:var(--ink-2); border:1px solid var(--line-soft);
  transition:border-color .5s var(--ease), transform .5s var(--ease),
             background .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover,.card:focus-visible{ box-shadow:0 22px 55px -24px rgba(192,141,69,.45) }

/* cursor tilt — the card leans a few degrees toward the pointer */
.card:hover,.card:focus-visible{
  transform:perspective(900px)
            rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))
            translateY(-6px);
}
.card.is-tilt{
  transition:transform .12s linear, border-color .5s var(--ease),
             background .5s var(--ease), box-shadow .5s var(--ease);
}
.card:hover,.card:focus-visible{
  border-color:rgba(192,141,69,.55); background:var(--ink-3);
}
.card:focus-visible{ outline:1px solid var(--gold); outline-offset:3px }

.card__media{
  position:relative; aspect-ratio:4/5; overflow:hidden;
  background:linear-gradient(160deg,#1E3428,#0E1B14);
  display:grid; place-items:center;
}
.card__media img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top;
  filter:grayscale(1) contrast(1.05) brightness(.92);
  transition:filter .8s var(--ease), transform 1.1s var(--ease);
}
.card:hover .card__media img{ filter:grayscale(0) contrast(1) brightness(1); transform:scale(1.05) }
.card__media::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(11,22,16,.9) 0%, rgba(11,22,16,.15) 45%, transparent 75%);
}
.card__initials{
  font-family:'Cormorant Garamond',serif; font-size:3.4rem; letter-spacing:.06em;
  color:rgba(192,141,69,.32);
}
.card__media .card__initials{ position:relative; z-index:1 }
.card__media.has-img .card__initials{ display:none }

.card__body{ position:relative; z-index:2; margin-top:-4.6rem; padding:0 1.35rem 1.5rem }
.card__role{
  display:inline-block; font-size:.6rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--gold); margin-bottom:.5rem;
}
.card__name{
  font-family:'Cormorant Garamond',serif; font-size:1.65rem; line-height:1.15; color:var(--cream);
}
.card__practice{
  display:block; margin-top:.45rem;
  font-size:.7rem; letter-spacing:.14em; text-transform:uppercase; color:var(--cream-faint);
}
.card__plus{
  position:absolute; top:1rem; right:1rem; z-index:3;
  width:34px; height:34px; border:1px solid var(--line); border-radius:50%;
  opacity:0; transform:scale(.8);
  transition:opacity .4s var(--ease), transform .4s var(--ease), border-color .4s var(--ease);
}
.card__plus::before,.card__plus::after{
  content:''; position:absolute; top:50%; left:50%; background:var(--gold);
  transform:translate(-50%,-50%);
}
.card__plus::before{ width:11px; height:1px }
.card__plus::after{ width:1px; height:11px }
.card:hover .card__plus,.card:focus-visible .card__plus{
  opacity:1; transform:scale(1); border-color:rgba(192,141,69,.5);
}

/* ═══ SECTION 2 — DISCIPLINES, the cream band ══════
   Reversed: the page comes back up into the logo board's own colours
   between the black grid and the green visit block. */
.disciplines{ border-top:1px solid var(--line-soft) }
.disc__list{
  max-width:var(--max); margin:0 auto; padding:0; list-style:none;
  border-top:1px solid var(--line-soft);
}
.disc__list li{
  display:flex; align-items:baseline; gap:1.4rem;
  padding:1.15rem .3rem; border-bottom:1px solid var(--line-soft);
  font-family:'Cormorant Garamond',serif; font-size:clamp(1.35rem,3.4vw,2.1rem);
  color:var(--cream-dim);
  transition:color .4s var(--ease), padding-left .4s var(--ease);
}
.disc__list li:hover{ color:var(--cream); padding-left:1.2rem }
.disc__list li span{
  font-family:'Inter',sans-serif; font-size:.68rem; letter-spacing:.2em; color:var(--gold);
}

/* ═══ VISIT ════════════════════════════════════════ */
.visit{ border-top:1px solid var(--line-soft) }
.visit__grid{
  max-width:var(--max); margin:0 auto;
  display:grid; grid-template-columns:1fr 1fr; gap:clamp(2rem,5vw,4.5rem); align-items:center;
}
@media (max-width:860px){ .visit__grid{ grid-template-columns:1fr } }
.visit__addr{
  font-style:normal; margin:1.8rem 0 2.2rem; line-height:2;
  color:var(--cream-dim); font-size:1.05rem;
}
.visit__actions{ display:flex; gap:.8rem; flex-wrap:wrap }
.visit__map{
  position:relative; aspect-ratio:4/3; overflow:hidden;
  border:1px solid var(--line-soft); background:var(--ink-2);
}
.visit__map iframe{
  width:100%; height:100%; border:0; display:block;
  filter:grayscale(1) invert(.92) contrast(.88);
}
/* tint the inverted map into the brand green without touching its legibility */
.visit__map::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:#1C3327; mix-blend-mode:color; opacity:.85;
}

/* ═══ FOOTER ═══════════════════════════════════════ */
.foot{ border-top:1px solid var(--line-soft); background:#000 }
.foot__inner{
  max-width:var(--max); margin:0 auto;
  padding:3rem clamp(1.1rem,5vw,3rem);
  display:flex; align-items:center; justify-content:space-between; gap:1.5rem; flex-wrap:wrap;
}
.foot__brand{ display:flex; align-items:center; gap:.7rem; font-family:'Cormorant Garamond',serif; font-size:1.5rem }
.foot__brand em{
  font-family:'Inter',sans-serif; font-style:normal;
  font-size:.64rem; letter-spacing:.2em; text-transform:uppercase; color:var(--cream-faint);
  padding-left:.7rem; border-left:1px solid var(--line);
}
.foot__mark{ width:18px; height:18px; color:var(--gold) }
/* legal and credit stack on the right so the footer stays two columns */
.foot__meta{ display:flex; flex-direction:column; align-items:flex-end; gap:.45rem; text-align:right }
.foot__legal{ margin:0; font-size:.72rem; letter-spacing:.06em; color:var(--cream-faint) }

.foot__credit{
  margin:0; font-size:.66rem; letter-spacing:.16em; text-transform:uppercase;
  /* a byline should sit back, but .42 alpha measured 3.33:1 on black —
     the smaller size carries the hierarchy instead */
  color:var(--cream-faint);
}
.foot__credit a{
  position:relative; color:var(--cream-faint);
  border-bottom:1px solid var(--line-soft); padding-bottom:1px;
  transition:color .3s var(--ease), border-color .3s var(--ease);
}
.foot__credit a:hover,.foot__credit a:focus-visible{ color:var(--gold); border-color:var(--gold) }
.foot__credit a::before{   /* 44px tap target without moving the layout */
  content:''; position:absolute; left:-8px; right:-8px;
  top:50%; height:44px; transform:translateY(-50%);
}

@media (max-width:640px){
  .foot__meta{ align-items:flex-start; text-align:left }
}

/* ═══ MODAL ════════════════════════════════════════ */
.modal{ position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:1.2rem }
.modal[hidden]{ display:none }
.modal__scrim{
  position:absolute; inset:0; background:rgba(7,15,11,.86);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  opacity:0; transition:opacity .4s var(--ease);
}
.modal__card{
  position:relative; width:min(880px,100%);
  max-height:88vh;            /* fallback for browsers without svh */
  max-height:88svh; overflow:auto;
  display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);
  background:var(--ink-2); border:1px solid var(--line);
  opacity:0; transform:translateY(22px) scale(.985);
  transition:opacity .5s var(--ease), transform .5s var(--ease);
}
.modal.open .modal__scrim{ opacity:1 }
.modal.open .modal__card{ opacity:1; transform:none }
@media (max-width:720px){ .modal__card{ grid-template-columns:1fr } }

.modal__media{
  position:relative; min-height:280px; display:grid; place-items:center; overflow:hidden;
  background:linear-gradient(160deg,#1E3428,#0E1B14); border-right:1px solid var(--line-soft);
}
.modal__media img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top }
.modal__initials{ font-family:'Cormorant Garamond',serif; font-size:4rem; color:rgba(192,141,69,.32) }
.modal__media.has-img .modal__initials{ display:none }

.modal__body{ padding:clamp(1.7rem,4vw,2.8rem) }
.modal__role{ font-size:.64rem; letter-spacing:.2em; text-transform:uppercase; color:var(--gold) }
.modal__name{
  font-family:'Cormorant Garamond',serif; font-size:clamp(1.9rem,4vw,2.6rem);
  line-height:1.1; margin:.6rem 0 .3rem;
}
.modal__practice{
  margin:0; font-size:.7rem; letter-spacing:.16em; text-transform:uppercase; color:var(--cream-faint);
}
.modal__bio{ margin:1.4rem 0 1.6rem; color:var(--cream-dim); font-size:.96rem; line-height:1.85 }
.modal__bio p{ margin:0 0 .85em }
.modal__bio p:last-child{ margin-bottom:0 }
/* A wrapper carries the gap to the buttons, so a hidden email simply
   collapses instead of leaving the phone with the wrong spacing. */
.modal__contact{
  display:flex; flex-direction:column; align-items:flex-start;
  gap:.65rem; margin:0 0 1.8rem;
}
.modal__tel,.modal__email{
  font-size:.8rem; letter-spacing:.12em; color:var(--cream);
  border-bottom:1px solid var(--line); padding-bottom:2px;
  transition:color .3s,border-color .3s;
}
.modal__email{ letter-spacing:.03em; text-transform:none; word-break:break-all }
.modal__tel:hover,.modal__email:hover{ color:var(--gold); border-color:var(--gold) }
.modal__actions{ display:flex; gap:.7rem; flex-wrap:wrap }
.modal__note{ margin:1.1rem 0 0; font-size:.66rem; letter-spacing:.1em; color:var(--cream-faint) }

.modal__close{
  position:absolute; top:.8rem; right:.9rem; z-index:5;
  width:46px; height:46px; border-radius:50%; cursor:pointer;
  background:rgba(11,22,16,.6); border:1px solid var(--line);
  color:var(--cream); font-size:1.5rem; line-height:1;
  transition:color .3s,border-color .3s,transform .3s;
}
.modal__close:hover{ color:var(--gold); border-color:var(--gold); transform:rotate(90deg) }

body.locked{ overflow:hidden }

/* the media column's floor makes the dialog taller than a sideways phone */
@media (max-height:540px){
  .modal__media{ min-height:0 }
  .modal__body{ padding:1.4rem 1.5rem }
  .modal__bio{ margin:1rem 0 1.1rem; line-height:1.7 }
  .modal__tel{ margin-bottom:1.1rem }
}
