/* ==========================================================================
   WFA — Weightlifting Federation of Astana
   Design system: system typography, translucent materials, spring motion.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #e8e8ed;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --line-2: rgba(0, 0, 0, .16);
  --navy: #14284b;
  --orange: #e8842b;
  --tint: #1b3f7a;
  --on-tint: #ffffff;
  --material: rgba(255, 255, 255, .72);
  --material-strong: rgba(255, 255, 255, .88);
  --edge: rgba(0, 0, 0, .07);
  --scrim: rgba(0, 0, 0, .38);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 10px rgba(0, 0, 0, .04);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, .08), 0 16px 48px rgba(0, 0, 0, .08);
  --shadow-3: 0 24px 80px rgba(0, 0, 0, .28);
  --r-s: 12px; --r: 18px; --r-l: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.8, 0, .8, .2);
  --hdr-h: 3.75rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-2: #1c1c1e; --bg-3: #2c2c2e;
    --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #8e8e93;
    --line: rgba(255, 255, 255, .1); --line-2: rgba(255, 255, 255, .2);
    --tint: #8ab4ff; --on-tint: #0a1a33;
    --material: rgba(22, 22, 24, .72); --material-strong: rgba(28, 28, 30, .9);
    --edge: rgba(0, 0, 0, .5); --scrim: rgba(0, 0, 0, .6);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 10px rgba(0, 0, 0, .3);
    --shadow-2: 0 6px 18px rgba(0, 0, 0, .5), 0 16px 48px rgba(0, 0, 0, .5);
    --shadow-3: 0 24px 80px rgba(0, 0, 0, .7);
  }
}
/* High-contrast mode (reading settings). `:root.hc` matches the specificity of the dark block above and is declared later, so it wins in both schemes. */
:root.hc {
  color-scheme: light;
  --bg: #fff; --bg-2: #fff; --bg-3: #f0f0f0; --ink: #000; --ink-2: #000; --ink-3: #222;
  --line: #000; --line-2: #000; --tint: #000; --on-tint: #fff; --navy: #000; --orange: #000;
  --material: #fff; --material-strong: #fff; --edge: #000; --scrim: rgba(0, 0, 0, .7);
  --shadow-1: none; --shadow-2: 0 0 0 2px #000; --shadow-3: 0 0 0 2px #000;
}
html.hc a { text-decoration: underline; }
/* Text size (reading settings) — layout scales with the text, everything is rem-based */
html.fs-lg { font-size: 112.5%; }
html.fs-xl { font-size: 125%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
  font-optical-sizing: auto; letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--tint); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.012em; }
h4 { font-size: .8125rem; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; letter-spacing: 0; }
.caption { font-size: .8125rem; line-height: 1.4; letter-spacing: .005em; color: var(--ink-2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--tint); color: var(--on-tint); border-radius: 10px; }
.skip:focus { top: 12px; }
.kicker { display: inline-block; margin-bottom: .75rem; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
html.hc .kicker { color: var(--ink); }

/* Press feedback: instant, on pointer-down */
.press { transition: transform .1s ease-out; }
.press:active { transform: scale(.97); }

/* ---------- Header (translucent material, scroll-edge effect) ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50; height: var(--hdr-h);
  background: var(--material);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.hdr::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(var(--edge), transparent); opacity: 0; transition: opacity .25s var(--ease-out);
}
.hdr.is-scrolled::after { opacity: 1; }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; min-width: 0; }
.logo img { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px var(--line-2); flex: none; }
.logo b { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; display: block; }
.logo small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 3px; font-size: .625rem; line-height: 1.2; letter-spacing: .01em; color: var(--ink-2); max-width: 200px; }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: .45rem .8rem; border-radius: 999px; color: var(--ink-2);
  font-size: .9375rem; font-weight: 500; letter-spacing: -0.006em; text-decoration: none !important; white-space: nowrap;
  transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.nav-item > a:hover, .nav-item.is-open > a { color: var(--ink); background: var(--bg-2); }
.nav-item > a[aria-current] { color: var(--ink); }
.nav-item > a[aria-current]::after { content: ""; display: block; margin: 2px auto 0; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); margin-bottom: -6px; }
.nav-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; padding: 6px;
  background: var(--material-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-radius: 14px; box-shadow: var(--shadow-2), 0 0 0 .5px var(--line-2);
  transform-origin: top left; opacity: 0; transform: scale(.96) translateY(-4px); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .22s var(--ease-out);
}
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu, .nav-item.is-open .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
.nav-menu a { display: block; padding: .55rem .8rem; border-radius: 9px; color: var(--ink); font-size: .9375rem; font-weight: 500; text-decoration: none !important; }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--bg-2); }
.nav-menu a[aria-current] { color: var(--tint); }

.hdr-actions { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.seg { display: inline-flex; padding: 2px; background: var(--bg-2); border-radius: 999px; }
.seg a, .seg button {
  padding: .3rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-2);
  text-decoration: none !important; border: 0; background: transparent; cursor: pointer; transition: background .15s, color .15s;
}
.seg a[aria-current], .seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 .5px var(--line); }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 22px; height: 22px; }
.burger { display: none; }

/* Reading settings popover — anchored to its trigger */
.pop-wrap { position: relative; }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 14px; z-index: 60;
  background: var(--material-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-radius: 16px; box-shadow: var(--shadow-2), 0 0 0 .5px var(--line-2);
  transform-origin: top right; opacity: 0; transform: scale(.94) translateY(-6px); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .22s var(--ease-out);
}
.pop.is-open { opacity: 1; transform: none; pointer-events: auto; }
.pop h4 { margin: 0 0 8px; }
.pop .seg { display: flex; width: 100%; margin-bottom: 14px; }
.pop .seg button { flex: 1; text-align: center; padding: .5rem .4rem; font-size: .8125rem; }
.pop .seg:last-child { margin-bottom: 0; }

/* ---------- Mobile sheet (spring-driven, drag to dismiss) ---------- */
.sheet { position: fixed; inset: 0; z-index: 80; display: none; }
.sheet.is-mounted { display: block; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: min(86dvh, 86vh);
  display: flex; flex-direction: column;
  background: var(--material-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: var(--shadow-3), 0 0 0 .5px var(--line-2);
  transform: translateY(100%); will-change: transform;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-head { flex: none; padding: 8px 20px 10px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.sheet-grab { width: 36px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--line-2); }
.sheet-title { display: flex; align-items: center; justify-content: space-between; }
.sheet-title h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 12px 20px; }
.sheet-nav details { border-top: .5px solid var(--line); }
.sheet-nav details:first-child { border-top: 0; }
.sheet-nav summary {
  display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer;
  padding: 14px 8px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; border-radius: 10px;
}
.sheet-nav summary::-webkit-details-marker { display: none; }
.sheet-nav summary svg { width: 18px; height: 18px; color: var(--ink-3); transition: transform .25s var(--ease-out); }
.sheet-nav details[open] summary svg { transform: rotate(90deg); }
.sheet-nav summary:active { background: var(--bg-2); }
.sheet-nav .sub { padding: 0 0 8px; }
.sheet-nav .sub a, .sheet-nav > a {
  display: block; padding: 10px 8px 10px 20px; color: var(--ink-2); font-size: 1rem; text-decoration: none !important; border-radius: 10px;
}
.sheet-nav > a { padding-left: 8px; color: var(--ink); font-weight: 600; font-size: 1.0625rem; padding-top: 14px; padding-bottom: 14px; border-top: .5px solid var(--line); }
.sheet-nav .sub a[aria-current], .sheet-nav > a[aria-current] { color: var(--tint); }
.sheet-nav .sub a:active { background: var(--bg-2); }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 8px 4px; border-top: .5px solid var(--line); }
.sheet-foot .seg a { padding: .45rem .8rem; font-size: .8125rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero .sub { font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); line-height: 1.4; letter-spacing: -0.012em; color: var(--ink-2); max-width: 30ch; margin: 1.1rem 0 1.75rem; }
.hero-ph { border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-2), 0 0 0 .5px var(--line); background: var(--bg-2); }
.hero-ph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: .8rem 1.35rem; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none !important; transition: transform .1s ease-out, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--tint); color: var(--on-tint); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--bg-2); color: var(--ink); }
.btn-secondary:hover { background: var(--bg-3); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
.sec { padding: clamp(40px, 6vw, 72px) 0; }
.sec-alt { background: var(--bg-2); }
.sec-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.sec-top p { margin: .5rem 0 0; color: var(--ink-2); max-width: 52ch; }
.link-more { font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.link-more svg { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.link-more:hover svg { transform: translateX(3px); }

/* Cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card {
  display: block; background: var(--bg); border-radius: var(--r); overflow: hidden; color: var(--ink);
  box-shadow: var(--shadow-1), 0 0 0 .5px var(--line); text-decoration: none !important;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.sec-alt .card { box-shadow: 0 0 0 .5px var(--line); }
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), 0 0 0 .5px var(--line); } }
.card:active { transform: scale(.985); }
.card .ph { aspect-ratio: 16 / 10; background: var(--bg-2); overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px 20px 20px; }
.card .kicker { margin-bottom: .5rem; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-2); font-size: .9375rem; margin: 0; }

.tile { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.tile .ic { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--bg-2); color: var(--tint); display: grid; place-items: center; }
.tile .ic svg { width: 24px; height: 24px; }
.tile h3 { font-size: 1.0625rem; margin-bottom: .15rem; }
.tile p { font-size: .875rem; }
.tile .chev { margin-left: auto; color: var(--ink-3); flex: none; }
.tile .chev svg { width: 18px; height: 18px; }

/* Events */
.events { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.event { display: flex; align-items: center; gap: 18px; padding: 16px 18px; background: var(--bg); border-radius: var(--r); box-shadow: 0 0 0 .5px var(--line); }
.date-b { flex: none; width: 64px; padding: 8px 0; text-align: center; border-radius: 14px; background: var(--tint); color: var(--on-tint); }
.date-b b { display: block; font-size: 1.75rem; line-height: 1; letter-spacing: -0.03em; font-weight: 700; }
.date-b span { display: block; margin-top: 3px; font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.event h3 { font-size: 1.0625rem; margin-bottom: .2rem; }
.event p { margin: 0; color: var(--ink-2); font-size: .9375rem; }

/* People */
.people { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.person-card { display: flex; flex-direction: column; }
.person-card .ph { aspect-ratio: 4 / 5; background: var(--bg-2); overflow: hidden; }
.person-card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.person-card h3 { font-size: 1.125rem; }
.person-card .post { color: var(--ink-2); font-size: .9375rem; margin: .25rem 0 0; }

/* ---------- Page chrome ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 20px 0 0; font-size: .8125rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.crumbs svg { width: 12px; height: 12px; color: var(--ink-3); }
.page-head { padding: clamp(20px, 4vw, 40px) 0 clamp(20px, 3vw, 28px); }
.page-head p { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; margin: .75rem 0 0; }
.page-body { padding-bottom: clamp(48px, 7vw, 96px); }
.note {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r); background: var(--bg-2);
  color: var(--ink-2); font-size: .9375rem; margin: 0 0 32px;
}
.note svg { width: 22px; height: 22px; flex: none; color: var(--ink-3); margin-top: 2px; }
.note b { color: var(--ink); display: block; margin-bottom: 2px; }

/* Person page */
.person { display: grid; grid-template-columns: 320px 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.person .photo { border-radius: var(--r-l); overflow: hidden; box-shadow: var(--shadow-2), 0 0 0 .5px var(--line); background: var(--bg-2); }
.person .photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.person h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); }
.person .post { font-size: 1.0625rem; color: var(--ink-2); margin: .75rem 0 1.5rem; padding-bottom: 1.25rem; border-bottom: .5px solid var(--line); }
.person .bio p { font-size: 1.0625rem; }

/* Contacts */
.contact-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.contact { padding: 20px; border-radius: var(--r); background: var(--bg-2); }
.contact h4 { margin-bottom: 8px; }
.contact a, .contact span { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.01em; }

/* Calendar */
.cal { display: grid; gap: 12px; }
.cal .event { padding: 18px 20px; }

/* ---------- Article ---------- */
.article { padding: 8px 0 clamp(48px, 7vw, 96px); }
.article h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); }
.article .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 1.25rem 0 1.75rem; padding-bottom: 1.25rem; border-bottom: .5px solid var(--line); font-size: .875rem; color: var(--ink-2); }
.article .meta b { color: var(--ink); font-weight: 600; }
.article .lead { font-size: 1.25rem; line-height: 1.45; letter-spacing: -0.012em; color: var(--ink); margin-bottom: 1.5rem; }
.article p { font-size: 1.0625rem; }
.article h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; }
.article figure { margin: 1.75rem 0; }
.article figure img { border-radius: var(--r); width: 100%; }
.article figcaption { margin-top: 10px; }
.points { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 10px; }
.points li { padding: 14px 18px 14px 44px; position: relative; background: var(--bg-2); border-radius: var(--r-s); }
.points li::before { content: ""; position: absolute; left: 18px; top: 21px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.points b { color: var(--ink); }
.quote { margin: 1.75rem 0; padding: 20px 24px; border-left: 3px solid var(--orange); background: var(--bg-2); border-radius: 0 var(--r) var(--r) 0; font-size: 1.125rem; line-height: 1.5; letter-spacing: -0.01em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: .75rem 0 1rem; }
.gallery a { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-s); overflow: hidden; background: var(--bg-2); transition: transform .1s ease-out; }
.gallery a:active { transform: scale(.97); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.article .share { margin-top: 2rem; padding-top: 1.25rem; border-top: .5px solid var(--line); font-size: .875rem; color: var(--ink-2); }
.back { display: inline-flex; align-items: center; gap: 6px; margin-top: 1.5rem; font-weight: 600; }
.back svg { width: 16px; height: 16px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 90; display: none; }
.lb.is-mounted { display: block; }
.lb-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .92); opacity: 0; }
.lb-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; border-radius: 10px; object-fit: cover; touch-action: none; cursor: grab; will-change: transform; user-select: none; -webkit-user-select: none; }
.lb-btn { position: absolute; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .2s; }
.lb.is-open .lb-btn { opacity: 1; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: .8125rem; letter-spacing: .04em; opacity: 0; transition: opacity .2s; }
.lb.is-open .lb-count { opacity: 1; }

/* ---------- Footer ---------- */
.ftr { background: var(--bg-2); padding: clamp(36px, 5vw, 56px) 0 28px; font-size: .9375rem; color: var(--ink-2); }
html.hc .ftr { border-top: 2px solid #000; }
.ftr-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.ftr h4 { margin-bottom: 12px; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: 8px; }
.ftr a { color: var(--ink); }
.ftr .copy { margin-top: 32px; padding-top: 18px; border-top: .5px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .8125rem; color: var(--ink-3); }

/* WhatsApp button (rendered only when a number is configured) */
.wa { position: fixed; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40; width: 52px; height: 52px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-2); transition: transform .1s ease-out; }
.wa:active { transform: scale(.94); }
.wa svg { width: 28px; height: 28px; }

/* 404 */
.nf { text-align: center; padding: clamp(60px, 12vw, 140px) 0; }
.nf p { color: var(--ink-2); max-width: 44ch; margin: 1rem auto 1.75rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav, .hdr-actions .seg { display: none; }
  .burger { display: inline-flex; }
  .hero .sub { max-width: 44ch; }
}
/* With enlarged text the desktop nav no longer fits — fall back to the sheet earlier. */
@media (max-width: 1260px) { html.fs-lg .nav, html.fs-lg .hdr-actions .seg { display: none; } html.fs-lg .burger { display: inline-flex; } }
@media (max-width: 1440px) { html.fs-xl .nav, html.fs-xl .hdr-actions .seg { display: none; } html.fs-xl .burger { display: inline-flex; } }
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; }
  .person .photo { max-width: 360px; }
}
@media (max-width: 720px) {
  .ftr-grid { grid-template-columns: 1fr; gap: 24px; }
  .sec-top { flex-direction: column; align-items: flex-start; }
  .logo small { max-width: 150px; }
  .hero-ph img { aspect-ratio: 4 / 3; }
}
@media (max-width: 400px) { .logo small { display: none; } }

/* ---------- Reduced motion / transparency / contrast ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
  .sheet-panel { transform: none !important; transition: opacity .2s ease !important; }
  .nav-menu, .pop { transform: none; transition: opacity .15s ease; }
}
@media (prefers-reduced-transparency: reduce) {
  .hdr, .nav-menu, .pop, .sheet-panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(0,0,0,.35); --line-2: rgba(0,0,0,.6); }
  .hdr, .nav-menu, .pop, .sheet-panel { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--line-2); }
}
