/* ============================================================
   A.H.D Architects — styles.css
   ============================================================ */

:root {
  --ink: #262626;   /* text: softened from #111 (owner found full black too strong) */
  --bg: #ffffff;
  --muted: #3f3f3f; /* secondary text: dark, but not black */
  --line: #666666;  /* hairlines and borders */
  --img-contrast: 0.92; /* photos are shown with slightly less contrast */
  --soft: #f5f5f5;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }

.skip-link {
  position: absolute;
  top: -40px;
  inset-inline-start: 16px;
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
@media (min-width: 768px) { .header-bar { height: 80px; } }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 36px; width: auto; }
@media (min-width: 768px) { .brand-logo { height: 44px; } }
.brand-text {
  font-size: calc(13px * var(--ts));
  letter-spacing: 0.25em;
  font-weight: 500;
}
@media (max-width: 480px) { .brand-text { display: none; } }
@media (min-width: 768px) { .brand-text { font-size: calc(15px * var(--ts)); } }

.nav-desktop { display: none; gap: 36px; align-items: center; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-desktop a {
  font-size: calc(14px * var(--ts));
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color .25s;
  padding: 6px 0;
  position: relative;
}
.nav-desktop a:hover, .nav-desktop a.active { color: var(--ink); }
.nav-desktop a.active::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

.hamburger {
  background: transparent;
  border: 0;
  padding: 8px;
  margin-inline-start: -8px;
  color: var(--ink);
}
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger[aria-expanded="true"] svg path:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] svg path:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] svg path:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.hamburger svg path { transform-origin: center; transition: transform .25s, opacity .2s; }

.nav-mobile {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.nav-mobile[hidden] { display: none; }
@media (min-width: 768px) { .nav-mobile { display: none; } }
.nav-mobile a {
  padding: 16px 20px;
  font-size: calc(16px * var(--ts));
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a.active { color: var(--ink); }

/* ===== Main ===== */
.site-main { min-height: 60vh; }
.site-main.main-home { min-height: 0; }
body.hide-footer .site-footer { display: none; }

/* ===== Sections / shared ===== */
.eyebrow {
  font-size: calc(11px * var(--ts));
  letter-spacing: 0.4em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 16px;
}
h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -0.01em; }
.h1 { font-size: calc(clamp(28px, 5vw, 56px) * var(--ts)); line-height: 1.15; }
.h2 { font-size: calc(clamp(24px, 3.5vw, 40px) * var(--ts)); line-height: 1.2; font-weight: 300; }
.h3 { font-size: calc(clamp(18px, 2vw, 22px) * var(--ts)); font-weight: 500; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.lede { font-size: calc(clamp(16px, 1.6vw, 20px) * var(--ts)); color: var(--muted); line-height: 1.7; max-width: 60ch; }

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 14px 28px;
  font-size: calc(13px * var(--ts));
  letter-spacing: 0.25em;
  border: 0;
  transition: background-color .25s, transform .25s;
}
.btn:hover { background: #000; }
.btn-link {
  display: inline-block;
  font-size: calc(13px * var(--ts));
  letter-spacing: 0.25em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: opacity .2s;
}
.btn-link:hover { opacity: 0.65; }

.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section-divider { border-top: 1px solid var(--line); }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: end;
  padding: 56px 0 56px;
}
@media (min-width: 768px) {
  .hero { grid-template-columns: 8fr 4fr; gap: 40px; padding: 96px 0 64px; }
}

/* ===== Hero carousel (home) ===== */
/* Mobile: the carousel + tagline sit as one block in the middle of the screen (a touch
   above true centre, which reads as centred) instead of hugging the top. */
@media (max-width: 767px) {
  .home-onescreen {
    min-height: calc(100vh - var(--header-h, 65px));
    min-height: calc(100svh - var(--header-h, 65px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 6vh;
  }
}
@media (min-width: 768px) {
  .home-onescreen {
    height: calc(100vh - var(--header-h, 80px));
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
  }
}

.hero-carousel-section { padding: 20px 0; }
@media (min-width: 768px) {
  .hero-carousel-section { padding: 0; flex: 0 0 auto; display: flex; }
  .hero-carousel-section .container { display: flex; width: 100%; }
}

.hero-carousel {
  display: flex;
  gap: 18px;
  overflow-x: hidden;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  -webkit-user-select: none;
  user-select: none;
}
.hero-carousel img { -webkit-user-drag: none; }
.hero-carousel::-webkit-scrollbar { display: none; }
.hero-carousel:active { cursor: grabbing; }
.hero-carousel .project-card {
  flex: 0 0 auto;
  width: 84%;
}
.hero-carousel .project-card .image-frame { cursor: pointer; }
.project-card-bare .image-frame { cursor: pointer; }
@media (min-width: 640px) { .hero-carousel .project-card { width: 48%; } }

/* Mobile: every photo gets the same height (like desktop), and its width follows its
   own proportions, so a row of mixed portrait/landscape pictures lines up top and
   bottom with nothing cropped. A very wide picture is capped at 1.5 screens
   (object-fit: cover trims only the excess — at 40vh the widest project is ~5% over). */
@media (max-width: 767px) {
  .hero-carousel { height: clamp(200px, 40vh, 440px); gap: 12px; }
  .hero-carousel .project-card { width: auto; height: 100%; }
  .hero-carousel .project-card .image-frame {
    width: auto;
    height: 100%;
    max-width: 150vw;
    aspect-ratio: 4 / 3; /* fallback until JS sets it per-image */
  }
}

/* Desktop: size cards from a fixed share of viewport height, not a fixed width —
   leaves equal breathing room above/below (handled by space-evenly on .home-onescreen) */
@media (min-width: 768px) {
  .hero-carousel { height: 62vh; gap: 24px; }
  .hero-carousel .project-card {
    width: auto;
    height: 100%;
  }
  .hero-carousel .project-card .image-frame {
    width: auto;
    height: 100%;
    aspect-ratio: 4 / 3; /* fallback until JS sets this per-image from its real dimensions */
  }
}

.hero-tagline-wrap { padding: 0; flex: 0 0 auto; }
.hero-tagline-inner {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 768px) { .hero-tagline-inner { padding: 10px 0; } }
.hero-tagline {
  font-size: calc(clamp(10px, 1.6vw, 15px) * var(--ts));
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  text-align: center;
  color: var(--muted);
}

.projects-narrow { padding-left: 16px; padding-right: 16px; }
@media (min-width: 640px) { .projects-narrow { padding-left: 40px; padding-right: 40px; } }
@media (min-width: 900px) { .projects-narrow { padding-left: 80px; padding-right: 80px; } }
@media (min-width: 1200px) { .projects-narrow { padding-left: 120px; padding-right: 120px; } }

/* ===== Project grid — fixed 3x2 paginated frame =====
   Sized with 100vh-based calc() directly (not nested %/flex-stretch,
   and not a JS-measured px snapshot) so it stays correct across
   browser zoom levels — vh recomputes natively, no resize listener
   needed for it. --projects-vpad must match the padding below. */
/* Below 768px the fixed-height paginated frame is replaced by a normal
   2-column grid that scrolls with the page — the frame's vh-based sizing
   was designed for desktop's wheel/click pagination and squeezes mobile
   cards into an unusably tall, narrow crop otherwise. */
@media (min-width: 768px) { body.page-fixed { overflow: hidden; } }

.projects-fixed {
  --projects-vpad: 56px; /* 28px top + 28px bottom */
  box-sizing: border-box;
  padding: 28px 0;
}
.projects-fixed .container { width: 100%; }

.projects-viewport { width: 100%; overflow: hidden; }
@media (min-width: 768px) {
  .projects-viewport {
    height: calc(100vh - var(--header-h, 80px) - var(--projects-vpad, 56px));
  }
}

.proj-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  transform: translateY(0);
}
@media (min-width: 768px) {
  .proj-grid {
    height: calc((100vh - var(--header-h, 80px) - var(--projects-vpad, 56px)) * 2);
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    transition: transform .6s cubic-bezier(0.65, 0, 0.35, 1);
  }
}
@media (min-width: 900px) { .proj-grid { gap: 16px; } }

/* min-height:0 overrides the grid item's default min-height:auto, which
   otherwise keeps a row from shrinking below its image's natural size
   and forces other rows to unevenly compensate. Only needed once the
   fixed-height frame (desktop) makes rows a shared, constrained height —
   on mobile each card sizes itself from its own aspect-ratio instead. */
@media (min-width: 768px) {
  .proj-grid .project-card { height: 100%; min-height: 0; min-width: 0; }
  .proj-grid .project-card .image-frame {
    aspect-ratio: unset;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
  }
  .proj-grid .project-card .image-frame img { min-height: 0; min-width: 0; }
}

.project-card { position: relative; }
.project-card .image-frame {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--soft);
  overflow: hidden;
  position: relative;
  border: 0;
  padding: 0;
  cursor: zoom-in;
}
.project-card .image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(var(--img-contrast));
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card .image-frame:hover img,
.project-card .image-frame:focus img { transform: scale(1.045); }

.project-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .45s cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card .image-frame:hover .overlay,
.project-card .image-frame:focus .overlay { opacity: 1; }
.project-card .overlay .o-title { font-size: calc(20px * var(--ts)); font-weight: 500; letter-spacing: 0.02em; margin: 0; }
.project-card .overlay .o-dev { font-size: calc(13px * var(--ts)); opacity: 0.85; margin: 8px 0 0; }
.project-card .overlay .o-cta {
  margin-top: 12px;
  font-size: calc(11px * var(--ts));
  letter-spacing: 0.25em;
  opacity: 0.75;
}

.project-card .meta-row {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.project-card .meta-row .name {
  font-size: calc(15px * var(--ts));
  font-weight: 500;
  letter-spacing: 0.01em;
}
.project-card .meta-row .name:hover { text-decoration: underline; }
.project-card .meta-row .dev {
  font-size: calc(12px * var(--ts));
  color: var(--muted);
  text-align: left;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== CTA block ===== */
.cta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 768px) { .cta-row { grid-template-columns: 1fr 1fr; gap: 40px; } }

/* ===== TrustedBy ===== */
/* About: the block is as wide as the headline; paragraphs (width:0 + min-width:100%)
   don't widen it, they justify to the headline's width so both edges are flush. */
.about-block { width: fit-content; max-width: 100%; }
.about-block .lede { width: 0; min-width: 100%; max-width: none; text-align: justify; }

.trusted {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 16px 0;
}
@media (min-width: 768px) { .trusted { padding: 20px 0; } }
.trusted h2 {
  text-align: center;
  font-size: calc(14px * var(--ts));
  letter-spacing: 0.3em;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 400;
}
.trusted-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 768px) { .trusted-grid { grid-template-columns: repeat(7, 1fr); gap: 36px; } }
.trusted-grid li { display: flex; align-items: center; justify-content: center; }
.trusted-grid img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter .5s, opacity .5s;
}
@media (min-width: 768px) { .trusted-grid img { max-height: 64px; } }
.trusted-grid img:hover { filter: grayscale(0); opacity: 1; }

/* ===== Project detail — content-height gallery with a peeking next image =====
   The frame is sized from the gallery column's own width via a fixed
   aspect-ratio (matching the renders' ~5:3), so height is content-driven
   rather than locked to the viewport — a JS-measured width avoids the
   circular-dependency problems of expressing "ratio plus a fixed peek
   amount" purely in CSS. Facts column bottom-aligns with the image via
   grid align-items:end, since it's shorter than the gallery column. */
.detail-fixed {
  box-sizing: border-box;
  padding: 28px 0;
}
.detail-fixed .detail-grid { align-items: end; }
@media (min-width: 1024px) { .detail-fixed .detail-grid { grid-template-columns: minmax(0, 1fr) 190px; gap: 40px; } }

/* Left edge must match the header nav's own left padding (base .container:
   20px / 40px at 768+), NOT .projects-narrow's much wider symmetric value
   meant for the image's right-side margin. */
.detail-fixed .container.projects-narrow { padding-left: 20px; }
@media (min-width: 768px) { .detail-fixed .container.projects-narrow { padding-left: 40px; } }

/* Left edge of the text column: the column is sized to its widest line's
   own natural width (190px, not a round fixed number) so that line's
   text — not just the box — actually touches the left edge, matching
   the header nav's edge via the same shared .container centering (no
   left-padding override needed: both use the same base container). */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.pgallery-viewport { overflow: hidden; }
.pgallery-stack {
  display: flex;
  flex-direction: column;
  gap: 48px; /* empty space only — the peek itself is actual image content, added in JS */
  transition: transform .6s cubic-bezier(0.65, 0, 0.35, 1);
  transform: translateY(0);
}
.pgallery-item { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 100%; }
.pgallery-item .image-frame {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /* max-height set in JS from available viewport height — without it, a
     portrait photo stretched to the column's full width becomes taller
     than the screen at 100% zoom. */
  aspect-ratio: 3 / 2; /* fallback until JS sets this per-image from its real dimensions */
  cursor: zoom-in;
  border: 0;
  padding: 0;
  background: var(--soft);
  overflow: hidden;
}
.pgallery-item .image-frame img {
  width: 100%; height: 100%; object-fit: contain;
  filter: grayscale(1) brightness(1.7) contrast(0.75);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter .6s ease;
}
/* Mobile: the peeking next image is taller (see PEEK in app.js) and its black-and-white
   tint is softer — at the desktop strength a bright sky/building top washes out to a
   flat grey bar, so on a small screen nothing of the picture reads. */
@media (max-width: 767px) {
  .pgallery-stack { gap: 56px; } /* room for the arrows; the JS reads this gap live */
  .detail-grid { gap: 20px; }
  .pgallery-item .image-frame img { filter: grayscale(1) brightness(1.1) contrast(0.9); }
}
.pgallery-item.is-current .image-frame img { filter: grayscale(0) brightness(1) contrast(var(--img-contrast)); }
.pgallery-item .image-frame:hover img { transform: scale(1.03); }

.facts-card {
  padding: 0;
  box-sizing: border-box;
}

.fc-title { font-size: calc(clamp(19px, 1.8vw, 25px) * var(--ts)); font-weight: 400; line-height: 1.25; margin: 0 0 22px; }
.fc-title .fc-num { font-size: 0.82em; }

.facts-list { list-style: none; padding: 0; margin: 0; }
.facts-list li {
  position: relative;
  padding-inline-start: 14px;
  font-size: calc(13px * var(--ts));
  line-height: 2;
  color: var(--ink);
}
.facts-list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.6em;
  width: 1px;
  height: 0.8em;
  background: var(--muted);
}
.note {
  margin-top: 24px;
  font-size: calc(12px * var(--ts));
  color: var(--muted);
  line-height: 1.7;
}
/* Mobile: tighter lines in the facts block (the little tick keeps to the middle
   of the shorter line). */
@media (max-width: 767px) {
  .fc-title { margin-bottom: 14px; }
  .facts-list li { line-height: 1.5; padding-block: 2px; }
  .facts-list li::before { top: calc(2px + 0.35em); }
  .note { margin-top: 16px; line-height: 1.5; }
}

.detail-nav {
  position: fixed;
  top: 43%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted); /* var(--line) was too close to white to actually see */
  transition: color .25s;
}
.detail-nav:hover, .detail-nav:focus-visible { color: var(--ink); }
.detail-nav-next { left: 16px; }
.detail-nav-prev { right: 16px; }
@media (min-width: 768px) { .detail-nav-next { left: 28px; } .detail-nav-prev { right: 28px; } }

/* Mobile: the arrows live in the empty band between the photo and the peeking
   next image (top is set in JS), dark enough to see, scrolling with the page. */
@media (max-width: 767px) {
  .detail-fixed { position: relative; }
  .detail-nav { position: absolute; transform: none; width: 40px; height: 40px; color: var(--ink); }
  .detail-nav-next { left: 8px; }
  .detail-nav-prev { right: 8px; }
}

/* ===== Contact ===== */
/* Contact details row and the form below share the same container, so their
   left/right edges line up. */
.cx-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 40px 0 48px;
}
@media (min-width: 768px) { .cx-row { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1fr); } }
.cx-box {
  display: flex;
  flex-direction: column;
  min-height: 96px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  text-align: center;
  transition: border-color .2s, background-color .2s;
}
.cx-box:hover, .cx-box:focus-visible { border-color: var(--ink); background: var(--soft); }
.cx-label { font-size: calc(10px * var(--ts)); letter-spacing: 0.3em; color: var(--muted); margin-bottom: 6px; }
/* Label sits at the top of every box; the value fills the rest and is centred in
   it, so the email (larger type), phone and WhatsApp all share one centre line. */
.cx-val { flex: 1; display: flex; align-items: center; justify-content: center; font-size: calc(17px * var(--ts)); direction: ltr; unicode-bidi: plaintext; }
.cx-email .cx-val { font-size: calc(clamp(22px, 2.4vw, 27px) * var(--ts)); font-weight: 300; line-height: 1.1; white-space: nowrap; }
.cx-form-h { font-size: calc(11px * var(--ts)); letter-spacing: 0.35em; font-weight: 400; color: var(--muted); margin: 0 0 20px; text-align: center; }
.cx-g2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 768px) { .cx-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cx-form .field { margin-bottom: 14px; }
.cx-err { display: none; font-size: calc(11px * var(--ts)); color: #b3261e; margin: 4px 0 0; }
.cx-send { width: 100%; }
.cx-send:disabled { opacity: .6; cursor: default; }
.cx-status { min-height: 1.4em; margin: 12px 0 0; font-size: calc(12px * var(--ts)); color: #b3261e; text-align: center; }
.cx-ok { text-align: center; padding: 56px 16px; border: 1px solid var(--line); margin-top: 8px; }
.cx-ok-h { font-size: calc(24px * var(--ts)); font-weight: 300; margin: 0 0 6px; }

.field label {
  display: block;
  font-size: calc(11px * var(--ts));
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font: inherit;
  font-size: calc(14px * var(--ts));
  color: var(--ink);
  transition: border-color .2s;
  font-family: inherit;
}
.field input, .field textarea { border-radius: 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field input.is-invalid, .field textarea.is-invalid { border-color: #b3261e; }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: calc(11px * var(--ts)); color: var(--muted); line-height: 1.7; margin: 0; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 48px 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); padding: 56px 0; } }
.brand-footer .brand-logo { height: 36px; }
.footer-tag { font-size: calc(13px * var(--ts)); color: var(--muted); line-height: 1.7; max-width: 36ch; margin: 16px 0 0; }
.footer-h { font-size: calc(11px * var(--ts)); letter-spacing: 0.2em; color: var(--muted); margin: 0 0 12px; font-weight: 400; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: 4px 0; font-size: calc(14px * var(--ts)); }
.footer-list a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom-row {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: calc(12px * var(--ts));
  color: var(--muted);
}
@media (min-width: 768px) {
  .footer-bottom-row { flex-direction: row; justify-content: space-between; padding: 20px 40px; }
}

/* ===== Accessibility menu ===== */
.a11y-fab {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 45;
  transition: transform .2s;
}
.a11y-fab:hover { transform: scale(1.05); }

/* Mobile: park the button in the bottom-left corner — the opposite side from the
   right-aligned Hebrew text — smaller and faded; it comes to full strength when
   touched or open. The panel opens from the same corner. */
@media (max-width: 767px) {
  .a11y-fab {
    inset-inline-start: auto;
    left: 10px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    opacity: 0.55;
    transition: opacity .2s, transform .2s;
  }
  .a11y-fab:hover { transform: none; }
  .a11y-fab:active, .a11y-fab:focus-visible, .a11y-fab[aria-expanded="true"] { opacity: 1; }
}

.a11y-panel {
  position: fixed;
  bottom: 80px;
  inset-inline-start: 20px;
  width: 304px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.25);
  border-radius: 6px;
  padding: 16px;
  z-index: 45;
  animation: fadeUp .35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (max-width: 767px) {
  .a11y-panel { inset-inline-start: auto; left: 10px; bottom: 62px; }
}
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.a11y-head h2 { font-size: 14px; font-weight: 500; letter-spacing: 0.05em; }
.a11y-head button { background: transparent; border: 0; color: var(--muted); font-size: 16px; padding: 4px 6px; }
.a11y-head button:hover { color: var(--ink); }
.a11y-body { display: flex; flex-direction: column; gap: 16px; font-size: 14px; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.a11y-section { display: flex; flex-direction: column; gap: 8px; }
.a11y-label { font-size: 12px; color: var(--muted); }
.a11y-segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.a11y-segments button {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 12px;
  padding: 8px 4px;
  transition: all .2s;
}
.a11y-segments button:hover { border-color: var(--ink); }
.a11y-segments button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.a11y-reset {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}
.a11y-reset:hover { color: var(--ink); }

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  border: 0;
  background: var(--line);
  border-radius: 999px;
  transition: background-color .25s;
  padding: 0;
}
.switch[aria-checked="true"] { background: var(--ink); }
.switch span {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: inset-inline-end .25s;
}
.switch[aria-checked="true"] span { inset-inline-end: 22px; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .35s ease-out both;
}
.lightbox[hidden] { display: none; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.85);
  transition: color .2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #fff; }
.lb-close { top: 20px; inset-inline-start: 20px; font-size: 28px; line-height: 1; padding: 8px; }
.lb-prev { top: 50%; transform: translateY(-50%); inset-inline-end: 20px; font-size: 44px; padding: 12px; }
.lb-next { top: 50%; transform: translateY(-50%); inset-inline-start: 20px; font-size: 44px; padding: 12px; }
@media (min-width: 768px) {
  .lb-prev { inset-inline-end: 40px; }
  .lb-next { inset-inline-start: 40px; }
}
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lb-figure img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  filter: contrast(var(--img-contrast));
}
.lb-figure figcaption {
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: calc(13px * var(--ts));
  margin-top: 16px;
}
.lb-counter { margin-inline-start: 8px; color: rgba(255,255,255,0.5); }
.lb-prev[hidden], .lb-next[hidden] { display: none; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-up { animation: fadeUp .7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.fade-in { animation: fadeIn .6s ease-out both; }
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }

/* ===== High contrast — permanent for the whole site =====
   This used to be an option in the accessibility panel (--muted / --line overrides
   are now in :root above); the owner chose it as the default look. */
.nav-desktop a,
.muted,
.footer-tag,
.footer-h,
.eyebrow,
.lede,
.a11y-label,
.form-note,
.field label,
.cx-label,
.facts-list dt {
  color: var(--muted) !important;
}
.trusted-grid img { filter: none !important; opacity: 1 !important; }

/* ===== Accessibility preference classes (toggled on body) ===== */

/* Text size: every px font size in this file is multiplied by --ts (the accessibility
   panel itself is left at normal size so its controls stay in place). */
:root { --ts: 1; }
body.text-larger { --ts: 1.15; }
body.text-largest { --ts: 1.3; }

body.links-underlined a { text-decoration: underline; }

/* ===== Maximum contrast (accessibility panel switch) =====
   White on black with yellow focus rings. The variables live on <html> (the page
   canvas takes its colour from there); the panel itself stays light so its controls
   remain readable. The client logos are JPEGs on white, so they sit on white tiles. */
html.contrast-high {
  --bg: #000000;
  --ink: #ffffff;
  --muted: #ffffff;
  --line: #ffffff;
  --soft: #1a1a1a;
}
body.contrast-high .nav-desktop a,
body.contrast-high .muted,
body.contrast-high .footer-tag,
body.contrast-high .footer-h,
body.contrast-high .eyebrow,
body.contrast-high .lede,
body.contrast-high .form-note,
body.contrast-high .field label,
body.contrast-high .cx-label,
body.contrast-high .facts-list dt {
  color: #fff !important;
}
body.contrast-high .site-header { background: rgba(0,0,0,0.95); }
body.contrast-high .brand-logo { filter: invert(1); }
body.contrast-high .skip-link,
body.contrast-high .btn { color: #000; }
body.contrast-high .btn:hover { background: #ffd400; }
body.contrast-high .trusted { background: #000; }
body.contrast-high .trusted-grid li { background: #fff; padding: 8px 10px; }
body.contrast-high button:focus-visible,
body.contrast-high a:focus-visible,
body.contrast-high input:focus-visible,
body.contrast-high textarea:focus-visible { outline-color: #ffd400; }
body.contrast-high .nav-desktop a.active::after { background: #ffd400; }
body.contrast-high .cx-err,
body.contrast-high .cx-status { color: #ff8a80 !important; }
body.contrast-high .field input.is-invalid,
body.contrast-high .field textarea.is-invalid { border-color: #ff8a80; }
body.contrast-high .a11y-fab { color: #000; }
html.contrast-high .a11y-panel {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #111111;
  --line: #000000;
  --soft: #f5f5f5;
  color: #111;
  border: 2px solid #fff;
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/* prevent body scroll when lightbox / mobile-nav-open */
body.lock-scroll { overflow: hidden; }
