/* =========================================================
   Ergoterapia Kayar & Ros
   Colori presi dal logo: nero #231F20 · rosso #AA1D21
   ========================================================= */

:root {
  --ink: #231F20;
  --red: #AA1D21;
  --red-deep: #8C171B;
  --red-on-dark: #F07A7E;
  --paper: #FFFFFF;
  --sand: #F6F3F0;
  --sand-2: #ECE6E1;
  --line: #E4DED9;
  --muted: #625C5C;

  --radius-lg: 28px;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(35, 31, 32, .06), 0 18px 40px -16px rgba(35, 31, 32, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 104px;
  --gutter: clamp(20px, 5vw, 40px);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
p, ul, address { margin: 0; }
p { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 84px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .78rem; font-weight: 700; line-height: 1.2;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before { content: ""; flex: none; width: 28px; height: 4px; background: var(--red); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-size: .98rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn .icon { width: 18px; height: 18px; }
.btn .icon--arrow { transition: transform .25s var(--ease); }
.btn:hover .icon--arrow { transform: translateX(4px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px -12px rgba(170, 29, 33, .7); }
.btn--primary:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { padding: 10px 20px; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: height .35s var(--ease), border-color .35s, box-shadow .35s;
}
.site-header.is-scrolled {
  height: 80px;
  border-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(35, 31, 32, .6);
}
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { flex: none; }
.brand img { width: auto; height: 80px; transition: height .35s var(--ease); }
.is-scrolled .brand img { height: 62px; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__link { position: relative; padding: 6px 0; font-size: .95rem; font-weight: 600; text-decoration: none; }
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.menu-toggle {
  display: none; position: relative; flex: none;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--sand); cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px;
  background: var(--ink); transition: transform .3s var(--ease), opacity .2s;
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 27px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center;
  min-height: min(100vh, 940px);
  padding-top: calc(var(--header-h) + clamp(24px, 4vw, 48px));
  padding-bottom: clamp(64px, 8vw, 104px);
  overflow: hidden;
  position: relative; isolation: isolate;
}
/* Due aloni rossi appena percettibili che si muovono lentamente sul fondo */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  border-radius: 50%; will-change: transform;
}
.hero::before {
  top: calc(var(--header-h) * .6); right: -14%; width: min(70vw, 900px); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(170, 29, 33, .09), rgba(170, 29, 33, 0));
  animation: drift-a 26s ease-in-out infinite alternate;
}
.hero::after {
  bottom: -30%; left: -14%; width: min(60vw, 760px); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(170, 29, 33, .06), rgba(170, 29, 33, 0));
  animation: drift-b 32s ease-in-out infinite alternate;
}
.hero__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 5vw, 64px); align-items: center; }
.hero__title {
  margin-top: 22px;
  font-size: clamp(2.7rem, 5.6vw, 4.5rem); font-weight: 800;
  line-height: 1; letter-spacing: -.04em;
}
.text-red { color: var(--red); }
.accent {
  background: linear-gradient(var(--red), var(--red)) no-repeat 0 92% / 0% .14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: underline 1s var(--ease) 1s forwards;
}
.hero__lead { margin-top: 26px; max-width: 34rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 38px; font-size: .9rem; font-weight: 600; }
.hero__facts li { display: flex; align-items: center; gap: 10px; }
.hero__facts li::before { content: ""; width: 8px; height: 8px; background: var(--red); }

.hero__media { position: relative; isolation: isolate; margin-right: calc(-1 * clamp(0px, (100vw - 1200px) / 2, 96px)); }
.hero__photo {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  animation: reveal-clip 1.1s var(--ease) .2s both;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; animation: zoom-out 1.8s var(--ease) .2s both; }
.hero__bar {
  position: absolute; right: 0; top: calc(100% + 16px);
  width: 40%; height: 14px; background: var(--red);
  transform-origin: left; animation: grow-x .9s var(--ease) .9s both;
}

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(80px, 11vw, 140px); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark .eyebrow { color: #fff; }
.section--sand { background: var(--sand); }

.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 64px; align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 { margin-top: 18px; font-size: clamp(2.1rem, 4vw, 3.3rem); font-weight: 800; }
.section-head > p { max-width: 36rem; color: var(--muted); }

/* ---------- La nostra visione ---------- */
.vision { display: grid; grid-template-columns: minmax(200px, .7fr) 1.6fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.vision__mark { justify-self: center; width: 100%; max-width: 300px; }
.vision__statement {
  margin-top: 26px;
  font-size: clamp(1.6rem, 3.1vw, 2.55rem); font-weight: 700;
  line-height: 1.24; letter-spacing: -.02em;
}
.vision__statement .hl {
  background: linear-gradient(var(--red), var(--red)) no-repeat 0 96% / 100% .12em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.js .vision__statement .w { opacity: .42; transition: opacity .45s ease; }
.js .vision__statement .w.on { opacity: 1; }

.mark { display: block; width: 100%; height: auto; overflow: visible; }
.mark .ray, .mark .stem { fill: var(--mark-ink, var(--ink)); }
.mark .bar { fill: var(--red); }
.mark--light { --mark-ink: #fff; }
.js .mark .ray, .js .mark .stem, .js .mark .bar { transform-box: fill-box; }
.js .mark .ray {
  transform-origin: 50% 100%; transform: scaleY(0);
  transition: transform .9s var(--ease) calc(.45s + var(--i) * .12s);
}
.js .mark .stem { transform-origin: 50% 0; transform: scaleY(0); transition: transform .8s var(--ease); }
.js .mark .bar { transform-origin: 0 50%; transform: scaleX(0); transition: transform .7s var(--ease) .25s; }
.js .mark.is-drawn .ray, .js .mark.is-drawn .stem, .js .mark.is-drawn .bar { transform: none; }
.vision__mark:hover .mark.is-drawn .ray { animation: wave .8s var(--ease) calc(var(--i) * 70ms); }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); margin-top: clamp(64px, 8vw, 110px); }
.value { position: relative; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .18); }
.value::before {
  content: ""; position: absolute; left: 0; top: -2px; width: 56px; height: 3px;
  background: var(--red); transform-origin: left;
  transition: transform .8s var(--ease) calc(.25s + var(--d, 0) * .12s);
}
.js .value::before { transform: scaleX(0); }
.js .value.is-visible::before { transform: none; }
.value__num { font-size: .85rem; font-weight: 700; letter-spacing: .12em; color: var(--red-on-dark); }
.value h3 { margin-top: 12px; font-size: 1.35rem; font-weight: 700; }
.value p { margin-top: 10px; color: rgba(255, 255, 255, .72); }

/* ---------- Cosa trattiamo ---------- */
.areas { display: grid; grid-template-columns: minmax(250px, .78fr) 2fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.areas__tabs { display: flex; flex-direction: column; gap: 10px; }
.area-tab {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 16px;
  background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.area-tab::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--red); transform: scaleY(0); transition: transform .35s var(--ease);
}
.area-tab:hover { border-color: var(--ink); transform: translateX(4px); }
.area-tab__num { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--red); }
.area-tab__text { display: flex; flex: 1; flex-direction: column; line-height: 1.25; }
.area-tab__text strong { font-size: 1.08rem; font-weight: 700; }
.area-tab__text small { margin-top: 3px; font-size: .84rem; color: var(--muted); }
.area-tab__arrow { opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s var(--ease); }
.area-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.area-tab[aria-selected="true"]::before { transform: none; }
.area-tab[aria-selected="true"] .area-tab__num { color: var(--red-on-dark); }
.area-tab[aria-selected="true"] small { color: rgba(255, 255, 255, .7); }
.area-tab[aria-selected="true"] .area-tab__arrow { opacity: 1; transform: none; }

.area-panel {
  padding: clamp(28px, 3.5vw, 48px);
  border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow);
}
.area-panel[hidden] { display: none; }
.area-panel.is-entering { animation: panel-in .5s var(--ease) both; }
.area-panel.is-entering .checklist li { animation: panel-in .5s var(--ease) both; animation-delay: calc(.12s + var(--i, 0) * .05s); }
.area-panel__kicker { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.area-panel h3 { margin-top: 10px; font-size: clamp(1.7rem, 2.8vw, 2.25rem); font-weight: 800; }
.area-panel__body > p:not(.area-panel__kicker) { margin-top: 14px; color: var(--muted); }
.area-panel__body > p:not(.area-panel__kicker) { max-width: 42rem; }
.area-panel .checklist { grid-template-columns: 1fr 1fr; gap: 12px clamp(24px, 3vw, 40px); }
.checklist { display: grid; gap: 10px; margin-top: 24px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; line-height: 1.4; }
.checklist li::before { content: ""; flex: none; width: 14px; height: 4px; margin-top: calc(.7em - 2px); background: var(--red); }

.note {
  display: flex; align-items: center; gap: 14px;
  margin-top: clamp(28px, 4vw, 44px); padding: 18px 22px;
  border-radius: 16px; background: #fff;
  font-size: .98rem; font-weight: 500;
}
.note .icon { color: var(--red); }

/* ---------- Team ---------- */
/* flex invece di grid: un'ultima riga incompleta resta centrata */
.team-grid { --cols: 5; --gap-x: clamp(14px, 2vw, 24px); display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(28px, 3vw, 40px) var(--gap-x); }
.member { width: calc((100% - (var(--cols) - 1) * var(--gap-x)) / var(--cols)); }
.member__photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--sand-2); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; transition: transform .8s var(--ease); }
.member__photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.member:hover .member__photo img { transform: scale(1.06); }
.member:hover .member__photo::after { transform: scaleX(1); }
.member__name { margin-top: 14px; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.member__role { margin-top: 2px; font-size: .9rem; color: var(--muted); }
.member--bio { position: relative; }
.member__more {
  margin-top: 10px; padding: 0; border: 0; background: none;
  font: inherit; font-size: .85rem; font-weight: 700; color: var(--red); cursor: pointer;
}
/* tutta la scheda apre il profilo */
.member__more::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.member__more:focus-visible { outline: none; }
.member__more:focus-visible::after { outline: 3px solid var(--red); outline-offset: 6px; }
.member--bio:hover .member__more { text-decoration: underline; text-underline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Profilo (dialog) ---------- */
.profile {
  width: min(960px, calc(100% - 2 * var(--gutter))); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow); overflow: hidden;
}
.profile::backdrop { background: rgba(35, 31, 32, .6); backdrop-filter: blur(4px); }
.profile[open] { animation: pop .45s var(--ease) both; }
.profile[open]::backdrop { animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; } }
.profile__inner { display: grid; grid-template-columns: 5fr 7fr; max-height: calc(100dvh - 48px); }
.profile__photo { background: var(--sand-2); }
.profile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; }
.profile__body { padding: clamp(28px, 4vw, 48px); overflow-y: auto; overscroll-behavior: contain; }
.profile__role { font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.profile__name { margin-top: 6px; padding-right: 40px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.profile__text { margin-top: 20px; color: var(--muted); font-size: 1rem; }
.profile__text > * + * { margin-top: 14px; }
.profile__text ul { display: grid; gap: 6px; margin-top: 10px; }
.profile__text li { position: relative; padding-left: 20px; }
.profile__text li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 3px; background: var(--red); }
.profile__close {
  position: absolute; top: 16px; right: 16px; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--sand); color: var(--ink); cursor: pointer;
  transition: background .2s, transform .3s var(--ease);
}
.profile__close:hover { background: var(--sand-2); transform: rotate(90deg); }
.profile__close .icon { width: 20px; height: 20px; }
body.profile-open { overflow: hidden; }

/* ---------- Dove siamo ---------- */
.location { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.location__info h2 { margin-top: 18px; font-size: clamp(2.1rem, 4vw, 3.3rem); font-weight: 800; }
.location__lead { margin-top: 18px; max-width: 30rem; color: var(--muted); }
.contact-list { display: grid; gap: 16px; margin-top: 32px; }
.contact-list li { display: flex; align-items: center; gap: 16px; line-height: 1.45; }
.contact-list__icon {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 14px; background: #fff; color: var(--red);
  box-shadow: 0 6px 16px -12px rgba(35, 31, 32, .5);
}
.contact-list small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-list a {
  font-weight: 600; text-decoration: none;
  background: linear-gradient(var(--red), var(--red)) no-repeat 0 100% / 0 2px;
  transition: background-size .3s var(--ease), color .2s;
}
.contact-list a:hover { color: var(--red); background-size: 100% 2px; }
.location__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.location__media { display: grid; }
.map { position: relative; min-height: 380px; overflow: hidden; border-radius: var(--radius-lg); background: var(--sand-2); box-shadow: var(--shadow); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (hover: hover) {
  .map iframe { filter: grayscale(1) contrast(1.04); transition: filter .6s ease; }
  .map:hover iframe, .map:focus-within iframe, .branch:hover .map iframe { filter: none; }
}

.branches { margin-top: clamp(56px, 8vw, 96px); }
.branches__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 48px;
  padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line);
}
.branches__head h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; }
.branches__head p { max-width: 30rem; color: var(--muted); }
.branch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; }
.branch { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.branch .map { min-height: 0; aspect-ratio: 16 / 10; border-radius: 0; box-shadow: none; }
.branch__body { display: flex; flex: 1; flex-direction: column; padding: 24px 26px 26px; }
.branch__town { padding: 20px 26px 16px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--red); }
.branch__name { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.branch address { margin-top: 12px; color: var(--muted); line-height: 1.5; }
.branch__route {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: auto; padding-top: 16px;
  font-weight: 600; text-decoration: none; color: var(--red);
}
.branch__route .icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.branch__route:hover .icon { transform: translateX(4px); }

/* ---------- Footer ---------- */
.site-footer { padding-block: clamp(56px, 7vw, 80px) 28px; background: var(--ink); color: rgba(255, 255, 255, .72); font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer__logo { width: auto; height: 96px; }
.footer__claim { margin-top: 18px; max-width: 22rem; }
.footer__title { margin-bottom: 16px; font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.footer__links { display: grid; gap: 8px; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem;
}

/* ---------- Animazioni ---------- */
.anim { animation: rise .9s var(--ease) both; animation-delay: calc(.1s + var(--d, 0) * .1s); }
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.94); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes underline { to { background-size: 100% .14em; } }
@keyframes zoom-out { from { transform: scale(1.12); } }
@keyframes reveal-clip {
  from { opacity: 0; clip-path: inset(10% 8% 10% 8% round 28px); }
  to { opacity: 1; clip-path: inset(0 0 0 0 round 28px); }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes wave { 50% { transform: scaleY(.78); } }
@keyframes drift-a { to { transform: translate(-9vw, 7vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(8vw, -9vh) scale(.92); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .team-grid { --cols: 4; }
}

@media (max-width: 900px) {
  :root { --header-h: 84px; }
  .site-header.is-scrolled { height: 68px; }
  .brand img { height: 62px; }
  .is-scrolled .brand img { height: 50px; }

  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 100%); height: calc(100dvh - 100%);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px var(--gutter) 40px;
    background: #fff; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 1.5rem; font-weight: 700; }
  .nav__link::after { display: none; }
  .nav .btn { justify-content: center; margin-top: 28px; padding: 16px 24px; font-size: 1.05rem; }

  .hero { min-height: 0; }
  .hero__grid, .vision, .section-head, .areas, .location { grid-template-columns: 1fr; }
  .hero__media { margin-right: 0; }
  .hero__bar { top: calc(100% + 12px); height: 10px; }

  .vision__mark { justify-self: start; max-width: 160px; }

  .areas__tabs {
    flex-direction: row; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  }
  .areas__tabs::-webkit-scrollbar { display: none; }
  .area-tab { flex: none; width: auto; padding: 12px 18px; scroll-snap-align: start; }
  .area-tab:hover { transform: none; }
  .area-tab__text small, .area-tab__arrow { display: none; }

  .branch-grid { grid-template-columns: 1fr; }
  .branch { display: grid; grid-template-columns: 46% 1fr; }
  .branch__town { grid-column: 1 / -1; }
  .branch .map { aspect-ratio: auto; min-height: 220px; }
  .team-grid { --cols: 3; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .area-panel .checklist { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .profile__inner { grid-template-columns: 1fr; overflow-y: auto; }
  .profile__photo { aspect-ratio: 4 / 3; }
  .profile__body { overflow: visible; }
  .team-grid { --cols: 2; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero__facts { flex-direction: column; gap: 8px; margin-top: 30px; }
  .map { min-height: 320px; }
  .branch { display: flex; flex-direction: column; }
  .branch .map { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .branch__town { padding: 18px 22px 14px; font-size: 1.4rem; }
  .branch__body { padding: 20px 22px 22px; }
  .footer__logo { height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
}
