/* =========================================================
   Castiel Production — one-page
   Palette: black / #fefacd / white
   ========================================================= */

:root {
  --black: #000000;
  --cream: #fefacd;
  --white: #ffffff;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(254, 250, 205, 0.24);
  --line-strong: rgba(254, 250, 205, 0.55);
  --panel: rgba(254, 250, 205, 0.045);

  --serif: "Open Sans", "Arial Hebrew", Arial, sans-serif;
  --sans: "Open Sans", "Arial Hebrew", Arial, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 84px;

  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-weight: 400;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; }

p { margin: 0 0 1em; }

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

:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

.skip-link {
  position: absolute; top: -100px; right: 1rem; z-index: 200;
  background: var(--cream); color: var(--black); padding: .6rem 1rem;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + .5rem); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1.4rem;
  border: 1px solid var(--cream); border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.btn-cream { background: var(--cream); color: var(--black); }
.btn-cream:hover { background: var(--white); border-color: var(--white); }
.btn-line { background: transparent; color: var(--cream); }
.btn-line:hover { background: var(--cream); color: var(--black); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 49;
  height: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--wrap); margin: 0 auto;
  min-height: var(--header-h);
  padding: .6rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}

.logo { flex: none; display: block; }
.logo img { height: 48px; width: auto; }

.main-nav { flex: 1; }
.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; justify-content: center;
}
.main-nav a {
  display: inline-block; padding: .35rem 0;
  text-decoration: none; font-weight: 600; font-size: 1rem; color: var(--white);
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--cream); border-bottom-color: var(--cream); }

.header-phone {
  flex: none; text-decoration: none; text-align: left;
  display: flex; flex-direction: column; line-height: 1.25;
}
.header-phone strong { font-size: .82rem; font-weight: 600; color: var(--muted); }
.header-phone span { font-family: var(--serif); font-size: 1.45rem; color: var(--cream); font-weight: 500; }

.nav-toggle {
  display: none; margin-inline-start: auto;
  width: 46px; height: 46px; border: 1px solid var(--line-strong); border-radius: 50%;
  background: transparent; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle .bar { width: 18px; height: 1.5px; background: var(--cream); display: block; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .header-phone { order: 2; }
  .header-inner { flex-wrap: wrap; gap: 1rem; }
  .main-nav { order: 3; flex-basis: 100%; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding-bottom: .8rem; }
  .main-nav li { border-top: 1px solid var(--line); }
  .main-nav a { display: block; padding: .8rem 0; font-size: 1.1rem; border-bottom: 0; }
}
@media (max-width: 560px) {
  .logo img { height: 38px; }
  .header-phone strong { display: none; }
  .header-phone span { font-size: 1.15rem; }
}

/* =========================================================
   HERO — framed slides, like a matted print
   ========================================================= */
.hero {
  position: relative;
  height: min(calc(100svh - var(--header-h)), 900px);
  min-height: 520px;
  overflow: hidden;
  background: var(--black);
}
.slides { position: absolute; inset: 0; margin: 0; }
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.1s ease; }
.slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04);
  transition: transform 8s ease-out;
}
.slide.is-active img { transform: scale(1); }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.15) 70%, rgba(0,0,0,.45) 100%);
}
.slide figcaption {
  position: absolute; z-index: 2;
  right: calc(var(--gutter) + 28px);
  bottom: calc(clamp(1.5rem, 6vh, 4rem) + 28px);
  max-width: min(760px, 72%);
}
.slide-text {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  line-height: 1.28; color: var(--white);
  margin-bottom: 1.6rem;
  text-wrap: balance;
}
.slide-text--big { font-size: clamp(3rem, 9vw, 7.5rem); font-weight: 300; line-height: 1; color: var(--cream); }

.hero-frame {
  position: absolute; z-index: 3; pointer-events: none;
  inset: clamp(12px, 2vw, 24px);
  border: 1px solid var(--line-strong);
}

.hero-controls {
  position: absolute; z-index: 4;
  left: calc(var(--gutter) + 28px);
  bottom: calc(clamp(1.5rem, 6vh, 4rem) + 28px);
  display: flex; align-items: center; gap: .9rem;
}
.hero-arrow {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(0,0,0,.35);
  display: grid; place-items: center; color: var(--cream);
  transition: background-color .2s, color .2s;
}
.hero-arrow:hover { background: var(--cream); color: var(--black); }
.hero-arrow svg { width: 20px; height: 20px; }
.hero-dots { display: flex; gap: .5rem; }
.dot {
  width: 10px; height: 10px; padding: 0; border-radius: 50%;
  border: 1px solid var(--cream); background: transparent;
}
.dot.is-active { background: var(--cream); }

@media (max-width: 700px) {
  .slide figcaption { right: calc(var(--gutter) + 8px); left: calc(var(--gutter) + 8px); max-width: none; bottom: 7rem; }
  .hero-controls { left: 50%; transform: translateX(-50%); bottom: 2.4rem; }
}

/* =========================================================
   SERVICES — editorial index rows
   ========================================================= */
.services {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.service {
  display: grid;
  grid-template-columns: clamp(150px, 18vw, 220px) minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center; gap: 1rem clamp(1.5rem, 3vw, 3rem);
  padding: clamp(.9rem, 1.6vw, 1.2rem);
  padding-inline-end: clamp(1.2rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  cursor: pointer;
  scroll-margin-top: calc(var(--header-h) + 1rem);
  transition: background-color .3s ease, border-color .3s ease;
}
.service:hover,
.service:focus-within { background: var(--panel); border-color: var(--line-strong); }

.service-img {
  display: block; padding: 0; border: 0; margin: 0;
  background: var(--panel);
  aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 20px;
  isolation: isolate; /* keeps rounded corners clean while the image scales */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.service-img img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.service:hover .service-img img { transform: scale(1.06); }

.service-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  line-height: 1.15; color: var(--white);
  transition: color .3s ease;
}
.service:hover .service-title,
.service:focus-within .service-title { color: var(--cream); }

.service-sub { margin: 0; color: var(--muted); font-size: 1.1rem; max-width: 34ch; }
.service:hover .btn-line { background: var(--cream); color: var(--black); }

@media (max-width: 1000px) and (min-width: 821px) {
  .service { grid-template-columns: 180px minmax(0, 1fr) auto; row-gap: .3rem; }
  .service-img { grid-row: 1 / span 2; }
  .service-title { align-self: end; }
  .service-sub { grid-column: 2; grid-row: 2; align-self: start; }
  .service .btn { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 820px) {
  .service { grid-template-columns: 1fr; gap: .5rem; padding: .8rem .8rem 1.4rem; border-radius: 26px; }
  .service-img { aspect-ratio: 16 / 9; margin-bottom: .8rem; }
  .service-title, .service-sub, .service .btn { margin-inline: .6rem; }
  .service .btn { justify-self: start; margin-top: .6rem; }
}

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.section-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--cream); letter-spacing: .02em;
}
.testimonials {
  max-width: 900px; margin: 0 auto; text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 10vw, 8rem);
}
.quote { margin: 2rem 0 0; }
.quote p {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.7rem); line-height: 1.4;
  color: var(--white); text-wrap: balance;
}
.quote footer { margin-top: 1.4rem; color: var(--cream); font-size: 1.05rem; }
.quote footer::before { content: ""; display: block; width: 48px; height: 1px; background: var(--cream); margin: 0 auto 1rem; }

/* =========================================================
   CONTACT — the one inverted block
   ========================================================= */
.contact {
  position: relative; isolation: isolate;
  color: var(--white);
  background: #000 url("pics/pic3.jpg") center / cover no-repeat;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
  padding: clamp(3.5rem, 9vw, 7rem) max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to left, rgba(0,0,0,.9) 0%, rgba(0,0,0,.78) 55%, rgba(0,0,0,.6) 100%);
}
.contact .section-title { color: var(--cream); font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 300; margin-bottom: 1.5rem; }
.contact-inner { max-width: 62ch; }
.contact-lead { font-size: 1.2rem; }
.contact-list {
  list-style: none; margin: 0 0 1.6rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.contact-list li {
  border: 1px solid var(--line-strong); background: rgba(0,0,0,.35); border-radius: 999px;
  padding: .25rem .95rem; font-weight: 600; font-size: 1rem;
}
.contact-list li:last-child { border-radius: 14px; }
.contact p { color: rgba(255,255,255,.88); }
.contact-lead strong { color: var(--white); }

.contact-phone {
  display: flex; flex-direction: column; align-items: flex-start;
  text-decoration: none; color: var(--white);
  border-top: 1px solid var(--cream); padding-top: 1.2rem;
}
.contact-phone-label { font-weight: 600; font-size: 1.05rem; }
.contact-phone-number {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.15; color: var(--cream);
  transition: opacity .2s;
}
.contact-phone:hover .contact-phone-number { opacity: .7; }


@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
}
.cta-col { padding: 0 clamp(1rem, 3vw, 2.5rem); border-inline-start: 1px solid var(--line); }
.cta-col:first-child { border-inline-start: 0; padding-inline-start: 0; }
.cta-col:last-child { padding-inline-end: 0; }
.cta-head { font-family: var(--serif); font-size: 1.5rem; color: var(--cream); margin-bottom: .6rem; line-height: 1.3; }
.cta-head strong { font-weight: 500; }
.cta-col p:not(.cta-head) { color: var(--muted); margin: 0; }
.cta-col--offer p:not(.cta-head) { color: var(--white); }

@media (max-width: 820px) {
  .cta-band { grid-template-columns: 1fr; gap: 2rem; }
  .cta-col, .cta-col:first-child { border-inline-start: 0; padding: 1.6rem 0 0; border-top: 1px solid var(--line); }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 2.2rem var(--gutter) 2.6rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem 2rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; }
.footer-links a {
  text-decoration: none; color: var(--cream); font-size: 1rem;
  border-bottom: 1px solid transparent; padding: .2rem 0;
}
.footer-links a strong { font-weight: 600; }
.footer-links a:hover { border-bottom-color: var(--cream); }

.fb-link {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--cream);
  display: grid; place-items: center;
}
.fb-link[href]:hover { background: var(--cream); color: var(--black); }
.fb-link svg { width: 22px; height: 22px; }

.copyright { margin: 0; color: var(--muted); font-size: .95rem; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.copyright a { color: inherit; text-decoration: none; }
.copyright a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .footer-inner { flex-direction: column; align-items: flex-start; padding-bottom: 6rem; }
}

/* =========================================================
   ACCESSIBILITY WIDGET
   ========================================================= */
.a11y {
  position: fixed; z-index: 90;
  left: 0;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}
.a11y-toggle {
  display: grid; place-items: center;
  width: 42px; height: 42px; padding: 5px;
  background: #ffffff;
  border: 1px solid var(--line); border-left: 0;
  border-radius: 0 10px 10px 0;
  opacity: .8;
  transition: opacity .2s, border-color .2s;
}
.a11y-toggle:hover,
.a11y-toggle[aria-expanded="true"] { opacity: 1; border-color: var(--line-strong); }
.a11y-toggle img { width: 28px; height: 28px; object-fit: contain; }
.a11y-panel {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  width: 230px;
  background: var(--cream); color: var(--black);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1rem 1.1rem;
}
.a11y-panel[hidden] { display: none; }
@media (max-width: 700px) {
  .a11y { bottom: calc(.9rem + env(safe-area-inset-bottom, 0px)); }
  .a11y-toggle { width: 34px; height: 34px; padding: 4px; }
  .a11y-toggle img { width: 22px; height: 22px; }
}
.a11y-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; margin: 0 0 .6rem; }
.a11y-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.a11y-panel button {
  width: 100%; text-align: right;
  background: transparent; color: var(--black);
  border: 1px solid rgba(0,0,0,.25); border-radius: 6px;
  padding: .45rem .7rem; font-size: .98rem; font-weight: 600;
}
.a11y-panel button:hover { background: var(--black); color: var(--cream); }
.a11y-panel button[aria-pressed="true"] { background: var(--black); color: var(--cream); }
.a11y :focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }

/* =========================================================
   COOKIE BAR
   ========================================================= */
.cookie-bar {
  position: fixed; z-index: 80;
  right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); left: 1rem;
  max-width: 560px; margin-inline-end: auto;
  background: var(--black); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 1rem 1.2rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; flex: 1 1 220px; }
@media (max-width: 700px) { .cookie-bar { left: calc(34px + 1.4rem); } }
.cookie-actions { display: flex; gap: .6rem; }

/* =========================================================
   MODALS
   ========================================================= */
.modal {
  width: min(880px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto; padding: 0;
  background: var(--black); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 4px;
  overflow: hidden;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal[open] { display: flex; flex-direction: column; animation: modal-in .32s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-body {
  position: relative; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.4rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3rem);
}
.modal-close {
  position: sticky; top: 0; float: left;
  margin: -1rem -1rem 0 0;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--black); border: 1px solid var(--line-strong);
  color: var(--cream); font-size: 1.7rem; line-height: 1;
  display: grid; place-items: center; z-index: 2;
}
.modal-close:hover { background: var(--cream); color: var(--black); }

.modal-title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.1;
  color: var(--cream); margin-bottom: 1.6rem;
  padding-left: 3.5rem;
}
.modal--doc .modal-title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.modal hr { border: 0; border-top: 1px solid var(--line); margin: 0 0 1.6rem; }

.prose { max-width: 68ch; }
.prose p { color: rgba(255,255,255,.86); }
.prose h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem); color: var(--cream);
  margin: 2.2rem 0 .7rem;
}
.prose strong { color: var(--white); }
.prose ul { margin: -.4rem 0 1em; padding-inline-start: 1.3rem; color: rgba(255,255,255,.86); }
.prose li { margin-bottom: .3rem; }
.prose li::marker { color: var(--cream); }
.prose a { color: var(--cream); }

.gallery {
  list-style: none; margin: 2.4rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; background: var(--panel);
  aspect-ratio: 1 / 1; overflow: hidden;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.gallery button:hover img { transform: scale(1.05); }
.gallery button:focus-visible { outline-offset: -3px; outline-width: 3px; }

.modal-quote { margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.modal-quote h2 { font-family: var(--serif); font-size: 1.2rem; color: var(--cream); font-weight: 500; }
.modal-quote blockquote { margin: 1rem 0 0; }
.modal-quote p { font-family: var(--serif); font-weight: 300; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.45; }
.modal-quote footer { color: var(--cream); }

.modal-cta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem;
  margin-top: 2.6rem; padding: 1.2rem 1.4rem;
  background: var(--cream); color: var(--black); text-decoration: none; border-radius: 4px;
}
.modal-cta strong { font-weight: 700; }
.modal-cta span { font-family: var(--serif); font-size: 1.8rem; line-height: 1; }
.modal-cta:focus-visible { outline-color: var(--white); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(0,0,0,.96); color: var(--white);
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lightbox::backdrop { background: #000; }
.lb-figure { margin: 0; height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4.5rem 0 2rem; min-width: 0; }
.lb-figure img { max-height: calc(100dvh - 9rem); max-width: 100%; object-fit: contain; border: 1px solid var(--line); }
.lb-count { margin-top: .9rem; color: var(--cream); font-size: .95rem; }
.lb-close {
  position: absolute; top: calc(1rem + env(safe-area-inset-top, 0px)); left: 1rem; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-strong); color: var(--cream);
  font-size: 1.8rem; line-height: 1; display: grid; place-items: center;
}
.lb-nav {
  width: 52px; height: 52px; margin: 0 clamp(.4rem, 2vw, 1.5rem);
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: transparent; color: var(--cream); display: grid; place-items: center;
}
.lb-nav svg { width: 22px; height: 22px; }
.lb-close:hover, .lb-nav:hover { background: var(--cream); color: var(--black); }

@media (max-width: 600px) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
  .lb-prev { right: 1rem; }
  .lb-next { left: 1rem; }
  .lb-figure { padding: 4.5rem .5rem 5.5rem; }
  .lb-figure img { max-height: calc(100dvh - 12rem); }
}

body.modal-open { overflow: hidden; }

/* fallback when <dialog> isn't supported */
dialog:not([open]) { display: none; }
dialog.no-dialog[open] { position: fixed; inset: 0; z-index: 1000; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.82); }

/* =========================================================
   ACCESSIBILITY MODES
   ========================================================= */
/* high contrast */
html.a11y-contrast {
  --cream: #ffff00;
  --muted: #ffffff;
  --line: #ffffff;
  --line-strong: #ffffff;
}
html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-contrast a { text-decoration: underline !important; }
html.a11y-contrast .slide::after { background: rgba(0,0,0,.72); }
html.a11y-contrast .prose p,
html.a11y-contrast .cta-col p,
html.a11y-contrast .contact p { color: inherit; }
html.a11y-contrast .contact { background: #000; color: #fff; border-top: 2px solid #fff; border-bottom: 2px solid #fff; }
html.a11y-contrast .contact::before { background: #000; }
html.a11y-contrast .contact .section-title,
html.a11y-contrast .contact-phone { color: #ffff00; }
html.a11y-contrast .contact-list li { border-color: #fff; }
html.a11y-contrast .contact-phone { border-top-color: #fff; }
html.a11y-contrast .btn-cream,
html.a11y-contrast .modal-cta,
html.a11y-contrast .a11y-panel { background: #ffff00; color: #000; }
html.a11y-contrast .a11y-toggle { opacity: 1; border-color: #fff; }

/* keyboard navigation: strong, always-visible focus */
html.a11y-keyboard *:focus {
  outline: 3px solid var(--cream) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px #000 !important;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .slide img { transform: none !important; }
}
