/* =====================================================================
   Ana Martins Beauty Clinic: design system
   Loaded after style.css and app.css. Change the tokens, not the components.

   Rules
   1. Type roles. Cormorant Garamond only for display: H1, H2, quotes, big
      figures. Everything else (card titles, questions, labels, body) is
      Montserrat, so sizes read consistently side by side.
   2. Spacing on an 8px scale: 8, 16, 24, 32, 48, 64, 96.
   3. Cards have a fixed anatomy: media, tag, title (2 lines reserved), text,
      action pinned to the bottom. Cards in a row share the same height.
   4. No two independent columns of very different heights side by side:
      balance them with useful content or stack them.
   5. Numbering (01, 02, 03) is a small label above the title, never a giant
      numeral beside it.
   6. Section titles are left-aligned on the container edge. Centred only in
      call-to-action bands and in the page header of utility pages.
   ===================================================================== */
:root {
  --fs-h1: clamp(2.5rem, 1.6rem + 3.4vw, 4.75rem);      /* 40-76 */
  --fs-h1-md: clamp(2.25rem, 1.55rem + 2.4vw, 3.75rem); /* 36-60 */
  --fs-h2: clamp(1.875rem, 1.4rem + 1.7vw, 3rem);       /* 30-48 */
  --fs-h3: 1.125rem;                                     /* 18, Montserrat 600 */
  --fs-h4: 1.0625rem;                                    /* 17, Montserrat 500 */
  --fs-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);/* 17-19 */
  --fs-body: 1rem;                                       /* 16 */
  --fs-sm: 0.9375rem;                                    /* 15 */
  --fs-xs: 0.8125rem;                                    /* 13 */
  --fs-caps: 0.75rem;                                    /* 12 */
  --lh-tight: 1.06;
  --lh-head: 1.3;
  --lh-body: 1.7;
  --lh-sm: 1.6;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --sec-y: clamp(var(--s5), 7vw, var(--s7));
  --head-gap: clamp(var(--s4), 3.5vw, var(--s5));
  --grid-gap: clamp(var(--s2), 2vw, var(--s4));
  --card-pad: var(--s3);
  --measure: 68ch;
}

/* ---------- 1. type roles ---------- */
body { line-height: var(--lh-body); }
.h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.h1--md, .dhero .h1 { font-size: var(--fs-h1-md); line-height: var(--lh-tight); }
.h2, .footer__h { font-size: var(--fs-h2); line-height: 1.1; }
.h1, .h2 { text-wrap: balance; }
/* small headings: Montserrat */
h3, .scard__body h3, .care__col h3, .info__h3, .step h2, .prose h2, .facts__t, .form-call p, .brand-card h3 {
  font-family: var(--sans); font-weight: 600; font-size: var(--fs-h3); line-height: var(--lh-head); letter-spacing: -0.005em; text-wrap: balance;
}
.prose h2 { font-size: 1.25rem; margin: var(--s5) 0 var(--s2); }
.faq__item summary, .ba-cmp figcaption, .pager__a, .member h3 { font-family: var(--sans); font-weight: 500; font-size: var(--fs-h4); line-height: 1.4; }
.member h3 { font-weight: 600; margin-top: var(--s3); }
.cat__body strong { font-family: var(--serif); }   /* large overlay titles on images stay display */
.lead { font-size: var(--fs-lead); line-height: 1.65; max-width: var(--measure); }
.step p, .info__list li, .faq__a, .faq__a p, .prose p, .prose li, .journey__txt p, .media__note, .training__txt p,
.sec__head > p:not(.eyebrow):not(.lead), .svc-cat__head p { font-size: var(--fs-body); line-height: var(--lh-body); }
.scard__txt, .care__col li, .fact dd, .brand-card__txt, .contact__list, .stat small, .callcta p, .map__ph, .cookies, .ba-hint, .ba-note, .footer__txt, .footer__cols li, .footer__cols a, .footer__cols .linkbtn {
  font-size: var(--fs-sm); line-height: var(--lh-sm);
}
.info__note, .faq__disc, .faq__src, .care__note, .tel-note, .footer__bot p, .form-msg { font-size: var(--fs-xs); line-height: 1.55; }
.eyebrow { font-size: var(--fs-caps); letter-spacing: 0.28em; line-height: 1.4; margin-bottom: var(--s2); }
.tag, .chip, .fact dt, .ba-cmp__cat, .ba-cmp__tag, .faq__src summary, .form-or, .scard__go, .svc-cat__more, .member p, .num { font-size: var(--fs-caps); }
.btn { font-size: 0.78rem; }
.btn--sm { font-size: 0.72rem; }
.footer__txt .tel-note { display: block; margin: 0 0 6px; opacity: 0.7; }

/* ---------- 2. spacing ---------- */
.sec, .steps { padding-block: var(--sec-y); }
.sec__head { margin-bottom: var(--head-gap); max-width: 720px; }
.sec__head .lead, .sec__head > p { margin-top: var(--s2); }
.phero { padding-block: clamp(var(--s5), 6vw, 88px) clamp(var(--s5), 5vw, var(--s6)); }
.phero--legal { padding-block: clamp(var(--s5), 5vw, 72px) var(--s1); }
.dhero { padding-block: clamp(var(--s3), 3.5vw, var(--s5)) clamp(var(--s5), 5vw, var(--s6)); }
.ba-page + .sec { padding-top: 0; }

/* ---------- 6. section titles on the container edge ---------- */
.sec__head--center { margin-inline: 0; text-align: left; }
.sec__head--center .eyebrow { justify-content: flex-start; }
.sec__head--center .lead { margin-inline: 0; }
.band .sec__head--center, .phero__in--center .sec__head--center { margin-inline: auto; text-align: center; }

/* ---------- 5. numbering as a small label ---------- */
.num { display: inline-flex; align-items: center; gap: 12px; font-family: var(--sans); font-weight: 600; letter-spacing: 0.24em; color: var(--gold-t); }
.num::after { content: ''; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }
.svc-cat__head { display: block; max-width: 760px; margin-bottom: var(--head-gap); }
.svc-cat__n, .step__n { display: inline-flex; align-items: center; gap: 12px; font-family: var(--sans); font-style: normal; font-weight: 600; font-size: var(--fs-caps); line-height: 1.4;
  letter-spacing: 0.24em; background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--gold-t); margin-bottom: var(--s2); }
.svc-cat__n::after, .step__n::after { content: ''; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }

/* treatment answers: three equal columns, everything starting on the same lines */
.steps__in { max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.step { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 3; gap: var(--s2); padding: var(--s3) 0 0; border-top: 1px solid rgba(134, 31, 50, 0.22); border-bottom: 0; }
.step > div { display: contents; }
.step h2 { margin: 0; }
.step__n { margin: 0; }
@media (max-width: 1024px) {
  .steps__in { grid-template-columns: 1fr; gap: 0; }
  .step { grid-row: auto; grid-template-rows: none; padding: var(--s3) 0; gap: var(--s1); }
  .step:first-child { border-top: 0; padding-top: 0; }
  .dhero { padding-bottom: var(--s4); }
  .steps { padding-top: var(--s5); }
}

/* ---------- 3. cards ---------- */
.svc-grid, .ba-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--grid-gap); }
.svc-grid > *, .ba-grid > * { flex: 0 1 calc((100% - 2 * var(--grid-gap)) / 3); min-width: 0; }
.ba-grid--1 > * { flex-basis: min(100%, 460px); }
.ba-grid--2 > * { flex-basis: min(calc((100% - var(--grid-gap)) / 2), 460px); }
.scard { display: flex; flex-direction: column; }
.scard__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1); padding: var(--card-pad); }
.scard__body .tag { align-self: flex-start; }
.scard__body h3 { margin-top: var(--s1); min-height: calc(var(--fs-h3) * var(--lh-head) * 2); display: flex; align-items: flex-start; }
.scard__txt { margin: 0; }
.scard__go { margin-top: auto; padding-top: var(--s2); }
.brand-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.brand-card__logo { height: 72px; width: 100%; }
.brand-card__txt { flex: 1; }
.member p { min-height: calc(var(--fs-caps) * 1.7 * 2); }
@media (max-width: 1024px) { .svc-grid > *, .ba-grid > *, .ba-grid--2 > * { flex-basis: calc((100% - var(--grid-gap)) / 2); } }
@media (max-width: 640px) {
  .svc-grid > *, .ba-grid > *, .ba-grid--1 > *, .ba-grid--2 > * { flex-basis: 100%; }
  .scard__body h3 { min-height: 0; }
}

/* ---------- treatment detail (rule 4): stacked blocks, no uneven side-by-side columns ---------- */
.info__grid { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
.info__main .h2 { margin-bottom: var(--s3); }
.info__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s5); margin: 0; }
.info__side { padding: 0; }
.info__side .info__h3 { margin: 0 0 var(--s2); }
.info__card { grid-column: auto; position: static; display: grid; gap: var(--s3); padding: var(--s4); }
.facts__t { color: var(--cream); font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 0; }
.facts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0 var(--s4); }
.facts__group + .facts__group { padding-top: var(--s3); border-top: 1px solid rgba(234, 202, 126, 0.22); }
.fact { border-top: 0; padding: var(--s2) 0 0; }
.fact dt { margin-bottom: var(--s1); }
.info__note { margin: 0; }
@media (max-width: 1024px) and (min-width: 641px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .facts[style*="--n:3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .info__list, .facts { grid-template-columns: 1fr; } }

/* care: three text columns separated by rules (lists of different lengths read naturally, no half-empty boxes) */
.care__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; gap: var(--s4) var(--s6); align-items: start; }
.care__grid > .care__col:nth-child(1) { grid-column: 1; grid-row: 1; }
.care__grid > .care__col:nth-child(2) { grid-column: 1; grid-row: 2; }
.care__grid > .care__col--warn { grid-column: 2; grid-row: 1 / span 2; }
.care__col { background: none; border: 0; border-top: 1px solid rgba(134, 31, 50, 0.25); border-radius: 0; padding: var(--s3) 0 0; }
.care__col h3 { margin-bottom: var(--s2); }
.care__col--warn { border-top: 2px solid var(--wine); }
.care__col--warn > p { margin-top: var(--s2); }
@media (max-width: 1024px) { .care__grid { grid-template-columns: 1fr; gap: var(--s4); } .care__grid > .care__col:nth-child(n) { grid-column: auto; grid-row: auto; } }

/* FAQ: title on the left, questions on the right */
.faq__in { max-width: calc(var(--wrap) + var(--gut) * 2); display: block; }
.faq__head { margin: 0 0 var(--head-gap); position: static; }
.faq__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s6); align-items: start; border-top: 0; }
.faq__item { border-top: 1px solid rgba(134, 31, 50, 0.2); border-bottom: 0; }
.faq__src { margin-top: var(--s4); }
.faq__head .faq__disc { margin-top: var(--s2); text-align: left; }
.faq__item summary { padding: var(--s3) 0; }
.faq__a { padding: 0 var(--s6) var(--s3) 0; }
@media (max-width: 1024px) { .faq__list { grid-template-columns: 1fr; } .faq__item:last-child { border-bottom: 1px solid rgba(134, 31, 50, 0.2); } }

/* ---------- contact blocks (rule 4): the info column is balanced with the map ---------- */
.contact__grid { align-items: stretch; }
.contact__info { display: flex; flex-direction: column; }
.contact__info .map { margin-top: var(--s4); flex: 1; min-height: 220px; aspect-ratio: auto; }
.contact__info .map.is-loaded iframe { position: absolute; inset: 0; }
.map { aspect-ratio: auto; min-height: 220px; }
.map.is-loaded { min-height: 320px; }
.how { display: grid; gap: var(--s3); margin-top: var(--s4); counter-reset: how; }
.how li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s2); align-items: start; }
.how li::before { counter-increment: how; content: counter(how, decimal-leading-zero); font-weight: 600; font-size: var(--fs-caps); letter-spacing: 0.2em; color: var(--gold-t); padding-top: 4px; }
.how strong { display: block; font-weight: 600; font-size: var(--fs-body); margin-bottom: 2px; }
.how span { font-size: var(--fs-sm); line-height: var(--lh-sm); }

/* ---------- clinic gallery: closed mosaic ---------- */
.masonry { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 19vw, 270px); gap: var(--grid-gap); margin-top: 0; }
.masonry__item, .masonry__item.tall, .masonry__item.wide { aspect-ratio: auto; height: 100%; margin: 0; }
.masonry__item img { width: 100%; height: 100%; object-fit: cover; }
.masonry__item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.masonry__item:nth-child(2) { grid-row: span 2; }
@media (max-width: 1024px) {
  .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 30vw, 240px); }
  .masonry__item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .masonry__item:nth-child(2) { grid-row: span 1; }
}
@media (max-width: 640px) { .masonry { grid-auto-rows: 44vw; } }

/* ---------- small fixes ---------- */
.mosaic__item:nth-child(7) img, .mosaic__item:nth-child(8) img { object-position: center 25%; }
.dhero__btns .btn--text { padding-inline: 4px; }

/* ---------- final alignment fixes ---------- */
.step:last-child { border-bottom: 0; }
.sec__head .orn { display: none; }

/* ---------- treatment results: own band, full width whatever the number of results ---------- */
.sec.results { background: var(--cream-2); }
.results__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--head-gap); }
.results__head .sec__head { margin-bottom: 0; }
.results__head .results__all { margin: 0; flex: none; }
.results .ba-grid { max-width: none; margin: 0; display: grid; gap: var(--grid-gap); justify-content: stretch; }
.results .ba-grid > * { flex: none; }
.results .ba-grid--1 { grid-template-columns: 1fr; }
.results .ba-grid--1 .ba-cmp__stage { aspect-ratio: 16 / 7; }
.results .ba-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.results .ba-grid--2 .ba-cmp__stage { aspect-ratio: 4 / 3; }
.results .ba-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .results .ba-grid--1 .ba-cmp__stage { aspect-ratio: 4 / 3; }
  .results .ba-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results .ba-grid--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .results .ba-grid--3 > :last-child:nth-child(odd) .ba-cmp__stage { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .results__head { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .results .ba-grid--2, .results .ba-grid--3 { grid-template-columns: 1fr; }
  .results .ba-grid .ba-cmp__stage, .results .ba-grid--3 > :last-child:nth-child(odd) .ba-cmp__stage { aspect-ratio: 4 / 5; }
}

/* ---------- header: a floating pill (hidden while scrolling down, back when scrolling up) ---------- */
body::before { background: transparent; }
.site-header {
  position: sticky; top: 12px; z-index: 60;
  width: min(calc(var(--wrap) + var(--gut) * 2), calc(100% - 32px)); margin: 12px auto 0; height: 64px;
  padding-inline: var(--s3) 10px; border-radius: 999px;
  background: rgba(134, 31, 50, 0.92); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 18px 40px -24px rgba(58, 12, 22, 0.55), inset 0 0 0 1px rgba(234, 202, 126, 0.16);
  transition: transform 0.55s var(--ease), box-shadow 0.4s, background 0.4s;
}
.site-header.is-stuck { background: rgba(134, 31, 50, 0.94); box-shadow: 0 22px 48px -22px rgba(58, 12, 22, 0.7), inset 0 0 0 1px rgba(234, 202, 126, 0.2); }
.site-header.is-hidden { transform: translateY(calc(-100% - 24px)); }
.site-header .brand img { width: 128px; }
.site-header .nav-cta { padding: 12px 24px; }
@media (max-width: 1024px) {
  .site-header { top: 10px; margin-top: 10px; width: calc(100% - 20px); height: 56px; padding-inline: 8px; }
  .site-header .brand img { width: 108px; }
  .site-header .nav-cta { padding: 9px 18px; }
}

/* ---------- footer: brand + four equal columns, newsletter strip, bottom line ---------- */
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: var(--s5) var(--s4); padding-block: var(--s7) var(--s6); position: relative; z-index: 1; }
.footer__logo { display: inline-block; }
.footer__logo img { width: 176px; height: auto; }
.footer__claim { margin-top: var(--s3); max-width: 30ch; font-size: var(--fs-sm); line-height: var(--lh-sm); opacity: 0.8; }
.footer__social { display: flex; gap: var(--s1); margin-top: var(--s3); }
.footer__social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(234, 202, 126, 0.35); color: var(--gold); transition: background 0.3s, color 0.3s; }
.footer__social a:hover { background: var(--gold); color: var(--wine-x); transform: none; }
.footer__t { margin-bottom: var(--s2); }
.footer address { font-style: normal; }
.footer__txt { opacity: 0.9; }
.footer__txt + .footer__txt { margin-top: var(--s2); }
.footer__more { display: inline-block; margin-top: var(--s2); font-size: var(--fs-caps); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.footer__more:hover { color: var(--cream); }
.footer__list { display: grid; gap: 10px; }
.footer__list li, .footer__list a, .footer__list .linkbtn { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.footer__list a:hover { transform: none; }
.footer__list--tel li { display: grid; }
.footer__list--tel li + li { margin-top: 4px; }
.footer__list .tel-note { display: block; margin: 0; opacity: 0.6; }
.footer__news { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s3) var(--s6); align-items: center; padding-block: var(--s4); border-top: 1px solid rgba(234, 202, 126, 0.18); position: relative; z-index: 1; }
.footer__news-txt .footer__t { margin-bottom: var(--s1); }
.footer__news-txt p:last-child { font-size: var(--fs-sm); opacity: 0.8; }
.footer__news .news__row { display: flex; gap: var(--s1); align-items: center; }
.footer__news .news__row input { flex: 1; min-width: 0; }
.footer__news .check { margin-top: var(--s1); }
.footer__bot { display: flex; justify-content: space-between; gap: var(--s2); padding-block: var(--s3); border-top: 1px solid rgba(234, 202, 126, 0.18); font-size: var(--fs-xs); opacity: 0.7; position: relative; z-index: 1; }
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: var(--s6) var(--s5); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__news { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .footer__col:nth-of-type(2), .footer__col:nth-of-type(3) { grid-column: 1 / -1; }
  .footer__bot { flex-direction: column; gap: 4px; }
}

/* footer refinements */
.footer .footer__social { display: flex; flex-wrap: wrap; gap: var(--s1); }
.footer .footer__social li { display: block; }
.footer__logo { margin: 0; line-height: 0; }
.footer__grid { grid-template-columns: 1.35fr 1fr 1.3fr 0.8fr 1fr; }
.footer__list--tel a[href^="mailto"] { overflow-wrap: anywhere; }
.footer__news, .footer__bot { border-top: 0; }
.footer__news::before, .footer__bot::before { content: ''; position: absolute; top: 0; left: var(--gut); right: var(--gut); height: 1px; background: rgba(234, 202, 126, 0.18); }
@media (max-width: 1024px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- tags (goals and areas): one vocabulary, every tag is a link ---------- */
.tags-block { display: grid; gap: var(--s3); }
.tags-row .info__h3 { margin-bottom: var(--s1); }
.tagx-list { display: flex; flex-wrap: wrap; gap: var(--s1); }
.tagx { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.02em;
  background: var(--wine); color: var(--cream); border: 1px solid var(--wine); transition: background 0.3s, color 0.3s; }
.tagx:hover { background: transparent; color: var(--wine); }
.tagx--zone { background: transparent; color: var(--wine); border-color: rgba(134, 31, 50, 0.35); }
.tagx--zone:hover { background: var(--wine); color: var(--cream); }

/* ---------- services: goal and area filters ---------- */
@media (min-width: 641px) { .filterbar__in { flex-wrap: wrap; row-gap: var(--s2); } }
.filterbar__in > * { min-width: 0; max-width: 100%; }
.facets { display: flex; gap: var(--s2); flex-wrap: wrap; }
.facet { display: grid; gap: 2px; }
.facet span { font-size: var(--fs-caps); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-t); }
.facet select { font: inherit; font-size: var(--fs-sm); color: var(--wine); background: transparent; border: 0; border-bottom: 1px solid rgba(134, 31, 50, 0.35);
  padding: 6px 24px 6px 0; appearance: none; -webkit-appearance: none; cursor: pointer; min-width: 190px;
  background-image: linear-gradient(45deg, transparent 50%, var(--wine) 50%), linear-gradient(135deg, var(--wine) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
@media (max-width: 640px) { .facets { width: 100%; } .facet { flex: 1; } .facet select { min-width: 0; width: 100%; } }

/* ---------- header search button ---------- */
.nav-search { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--gold); background: transparent; border: 1px solid rgba(234, 202, 126, 0.3); cursor: pointer; transition: background 0.3s, color 0.3s; }
.nav-search:hover { background: rgba(234, 202, 126, 0.15); color: var(--cream); }
@media (min-width: 1025px) { .site-header { grid-template-columns: auto 1fr auto auto; } }
@media (max-width: 1024px) {
  .site-header { grid-template-columns: 48px 1fr 40px auto; column-gap: 6px; }
  .site-header .burger { grid-column: 1; grid-row: 1; justify-self: start; margin: 0; }
  .site-header .brand { grid-column: 2; grid-row: 1; justify-self: center; }
  .nav-search { grid-column: 3; grid-row: 1; justify-self: end; width: 40px; height: 40px; margin: 0; border: 0; }
  .site-header .nav-cta { display: inline-flex; grid-column: 4; grid-row: 1; justify-self: end; }
}

/* ---------- search dialog ---------- */
html.srch-open { overflow: hidden; }
.srch { position: fixed; inset: 0; z-index: 90; background: rgba(40, 8, 15, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; align-items: start; justify-items: center; padding: clamp(16px, 8vh, 96px) 16px 16px; }
.srch[hidden] { display: none; }
.srch__panel { width: min(720px, 100%); max-height: min(78vh, 760px); display: flex; flex-direction: column; background: var(--cream); border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(40, 8, 15, 0.7); overflow: hidden; }
.srch__bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid rgba(134, 31, 50, 0.15); color: var(--wine); }
.srch__bar input { flex: 1; min-width: 0; font: inherit; font-size: 1.0625rem; color: var(--wine); background: transparent; border: 0; outline: 0; padding: 10px 0; }
.srch__close { font: inherit; font-size: var(--fs-caps); letter-spacing: 0.1em; color: var(--wine); background: rgba(134, 31, 50, 0.08); border: 0; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.srch__body { overflow: auto; padding: var(--s3); }
.srch__h { font-size: var(--fs-caps); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-t); margin-bottom: var(--s2); }
.srch__chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.srch__list { display: grid; gap: 4px; }
.srch__list a { display: grid; grid-template-columns: 56px 1fr; gap: var(--s2); align-items: center; padding: 10px; border-radius: 14px; transition: background 0.2s; }
.srch__list a:hover, .srch__list a:focus-visible { background: rgba(134, 31, 50, 0.07); }
.srch__list img, .srch__ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--cream-2); }
.srch__list small { display: block; font-size: var(--fs-caps); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-t); }
.srch__list strong { display: block; font-weight: 600; font-size: var(--fs-body); color: var(--wine); }
.srch__list em { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: var(--fs-xs); opacity: 0.8; }
.srch__empty { font-size: var(--fs-sm); }
.srch__empty a { text-decoration: underline; }
.srch__bar input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ---------- header: the "Am" mark is always in the pill; the mobile menu opens from the menu button ---------- */
.has-brandmark .brand { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 1024px) {
  .menu { clip-path: circle(0 at 41px 38px); padding-top: 96px; }
  .menu.is-open { clip-path: circle(150% at 41px 38px); }
  .menu nav a { font-size: clamp(1.9rem, 8.5vw, 3rem); }
}

/* ---------- themed dropdown (enhances the native <select>, which stays for forms and accessibility) ---------- */
.sel { position: relative; }
.sel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.sel__btn { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; font: inherit; font-size: var(--fs-sm); text-align: left;
  color: var(--wine); background: transparent; border: 0; border-bottom: 1px solid rgba(134, 31, 50, 0.35); padding: 8px 2px; cursor: pointer; }
.field--s .sel__btn { font-size: var(--fs-body); padding: 22px 2px 10px; }
.sel__btn.is-placeholder { color: rgba(134, 31, 50, 0.7); }
.sel__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.sel__btn::after { content: ''; flex: none; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform 0.3s var(--ease); }
.sel.is-open .sel__btn::after { transform: translateY(2px) rotate(-135deg); }
.sel.is-error .sel__btn { border-color: #c0392b; }
.sel__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); min-width: 240px; max-height: min(340px, 50vh); overflow: auto; overscroll-behavior: contain;
  padding: 6px; background: #fffaf4; border: 1px solid rgba(134, 31, 50, 0.12); border-radius: 16px; box-shadow: 0 24px 50px -24px rgba(61, 13, 24, 0.45);
  opacity: 0; transform: translateY(-6px); visibility: hidden; transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s; }
.sel.is-open .sel__list { opacity: 1; transform: none; visibility: visible; }
.sel.is-up .sel__list { top: auto; bottom: calc(100% + 6px); }
.sel__group { padding: 12px 12px 4px; font-size: var(--fs-caps); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-t); }
.sel__opt { position: relative; padding: 10px 36px 10px 12px; border-radius: 10px; font-size: var(--fs-sm); line-height: 1.4; color: var(--wine); cursor: pointer; }
.sel__opt.is-active { background: rgba(134, 31, 50, 0.08); }
.sel__opt[aria-selected="true"] { font-weight: 600; }
.sel__opt[aria-selected="true"]::after { content: ''; position: absolute; right: 14px; top: 50%; width: 6px; height: 11px; border-right: 2px solid var(--wine); border-bottom: 2px solid var(--wine); transform: translateY(-60%) rotate(45deg); }
.facet .sel { min-width: 200px; }
@media (max-width: 640px) { .facet .sel { min-width: 0; } }
.srch__more { display: block; margin-top: var(--s2); padding: 12px; border-radius: 12px; text-align: center; font-size: var(--fs-caps); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wine); background: rgba(134, 31, 50, 0.06); }
.srch__more:hover { background: rgba(134, 31, 50, 0.12); }
.sel.is-open .sel__list { transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s; }
@media (prefers-reduced-motion: reduce) { .sel__list, .sel.is-open .sel__list { transition: none !important; } }
.sel__list:focus { outline: none; }
.sel__list:focus-visible { box-shadow: 0 24px 50px -24px rgba(61, 13, 24, 0.45), 0 0 0 2px rgba(184, 147, 74, 0.5); }
.facet .sel__list { min-width: 280px; }

/* dropdown: closed lists take no space (no overflow), open with a short fade; flip to the right edge when needed */
.sel:not(.is-open) .sel__list { display: none; }
.sel.is-open .sel__list { animation: selIn 0.22s var(--ease); }
@keyframes selIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sel.is-right .sel__list { left: auto; right: 0; }
.sel__btn.is-placeholder { color: rgba(134, 31, 50, 0.86); }
