:root {
  --ink: #16110d;
  --ink-soft: #3a3129;
  --cream: #f4eadc;
  --paper: #fbf6ee;
  --sand: #e6d5bc;
  --clay: #b34a22;
  --clay-deep: #8c3416;
  --gold: #c6a35a;
  --gold-soft: #e8d7a8;
  --teal: #2a1f18;
  --forest: #2f4a3c;
  --white: #fffdf8;
  --shadow: 0 24px 60px rgba(22, 17, 13, 0.16);
  --radius: 22px;
  --max: 1180px;
  --nav: 108px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clay);
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.45rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clay), var(--clay-deep));
  color: var(--white);
  box-shadow: 0 12px 28px rgba(232, 119, 34, 0.25);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-dark {
  background: #111;
  color: #fff;
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--nav);
  display: flex;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 10px;
  overflow: visible;
  background: rgba(251, 246, 238, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(22, 17, 13, 0.08);
}

.site-header .container {
  width: min(var(--max), calc(100% - 72px));
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.logo {
  flex: 0 0 auto;
  order: 1;
  line-height: 0;
  margin: 0;
}

.logo img {
  display: block;
  height: 64px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  order: 2;
  margin-left: auto;
  margin-right: 0;
}

.nav-links > li { position: relative; }

.nav-links a,
.nav-links .parent {
  display: block;
  padding: 10px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  background: none;
  border: 0;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.nav-links a.active,
.nav-links .parent.active,
.nav-links li.open > .parent {
  background: var(--teal);
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover,
  .nav-links .parent:hover {
    background: var(--teal);
    color: #fff;
  }
}

.sub-menu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  left: auto;
  min-width: 280px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px 0;
  list-style: none;
  z-index: 20;
}

@media (hover: hover) and (pointer: fine) {
  .has-sub:hover > .sub-menu {
    display: block;
  }

  .sub-menu a:hover {
    background: #fff6eb;
    color: var(--clay);
  }
}

.sub-menu a {
  text-transform: capitalize;
  font-weight: 500;
  border-radius: 0;
  padding: 8px 16px;
  white-space: nowrap;
}

.sub-menu a.active {
  background: #fff6eb;
  color: var(--clay);
}

.menu-toggle {
  display: none;
  order: 3;
  background: transparent;
  border: 1px solid var(--sand);
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav));
  color: #fff;
  overflow: hidden;
  display: grid;
  align-items: end;
}

.hero img,
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 17, 13, 0.12), rgba(22, 17, 13, 0.55));
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 80px 0 72px;
}

.hero-copy p.lead {
  max-width: 620px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 18px 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -42px;
  position: relative;
  z-index: 2;
}

.stat {
  background: var(--cream);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat b {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

section { padding: 88px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}

.section-head.slim {
  margin-bottom: 16px;
}

.service-grid,
.scope-grid,
.value-grid {
  display: grid;
  gap: 22px;
}

.service-grid { grid-template-columns: repeat(3, 1fr); }

.service-card {
  position: relative;
  min-height: 400px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
}

.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s ease;
}

.service-card:hover img { transform: scale(1.06); }

.service-card .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 17, 13, 0.04), rgba(22, 17, 13, 0.72));
}

.service-card .body {
  position: absolute;
  inset: auto 22px 22px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.split img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 28px;
}

.founder-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.founder-section {
  padding: 28px 0 12px;
  scroll-margin-top: calc(var(--nav) + 12px);
}

.founder-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
  border: 4px solid #fff;
  box-shadow: 0 12px 28px rgba(22, 17, 13, 0.14);
  background: #00b4e6;
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.photo-pair img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 22px;
}

.puff-photos .photo-pair img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.page-hero.puff-hero {
  min-height: 380px;
}

.page-hero.puff-hero::after {
  background: linear-gradient(180deg, rgba(22, 17, 13, 0.04), rgba(22, 17, 13, 0.28));
}

.page-hero.puff-hero img {
  object-fit: cover;
  object-position: center center;
}

.clients-home {
  padding: 8px 0 4px;
}

.clients-home .section-head.slim {
  margin-bottom: 8px;
}

.gallery-home {
  padding-top: 18px;
}

.split-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.split-scope .col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.split-scope h2 {
  font-size: 1.7rem;
  margin-bottom: 14px;
}

.split-scope .stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.split-scope .stack img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
}

.split-scope figure,
.photo-pair figure {
  margin: 0;
  min-width: 0;
  cursor: pointer;
}

.split-scope figcaption,
.photo-pair figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pill-list a,
.pill-list span {
  background: #fff;
  border: 1px solid var(--sand);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.band {
  background: var(--ink);
  color: var(--cream);
}

.value-grid { grid-template-columns: repeat(3, 1fr); }

.value-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(240, 196, 25, 0.2);
  padding: 24px;
  border-radius: 20px;
}

.value-card .num {
  font-family: "Cormorant Garamond", serif;
  color: var(--gold-soft);
  font-size: 1.8rem;
}

.sustain {
  background:
    linear-gradient(180deg, rgba(247, 248, 250, 0.2), rgba(247, 248, 250, 0.94)),
    url("../images/sustainability.jpg") center/cover;
}

.sustain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sustain-grid article {
  background: #fff;
  padding: 14px 16px;
  border-radius: 16px;
  min-height: 0;
  box-shadow: var(--shadow);
}

.sustain-grid h3 {
  font-family: Outfit, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clay);
  margin-bottom: 6px;
}

.sustain-grid p {
  margin: 0;
}

.cta-band { padding: 36px 0 48px; }

.cta {
  background: linear-gradient(135deg, var(--clay) 0%, #8c3416 100%);
  color: #fff;
  border-radius: 28px;
  padding: 40px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.cta .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  min-height: 380px;
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding: 80px 0 48px;
}

.scope-grid { grid-template-columns: repeat(4, 1fr); }
.scope-grid.three { grid-template-columns: repeat(3, 1fr); }
.scope-grid.four { grid-template-columns: repeat(4, 1fr); }

.scope-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(12, 51, 64, 0.06);
}

.scope-card img {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.scope-card div { padding: 18px; }

.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

body[data-page="contact"] > section {
  padding: 24px 0 36px;
}

body[data-page="contact"] h2 {
  margin-top: 0;
  font-size: 1.55rem;
}

form {
  background: #fff;
  border-radius: 20px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow);
}

.touch-card {
  background: transparent;
  padding: 0;
}

.rule {
  width: 52px;
  height: 4px;
  background: var(--clay);
  border-radius: 99px;
  margin: 10px 0 16px;
}

.touch-card > p {
  color: var(--ink-soft);
  max-width: 420px;
  margin-bottom: 18px;
}

.touch-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.touch-list li,
.contact-lines li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
}

.contact-lines a,
.touch-list a {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  color: var(--clay);
  margin-top: 2px;
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 8px 0 4px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #e4e7eb;
  background: var(--cream);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}

textarea { min-height: 88px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-status { margin-top: 14px; min-height: 1.4em; font-weight: 600; }
.form-status.ok { color: var(--forest); }
.form-status.err { color: var(--clay-deep); }
.field-error {
  min-height: 1.1em;
  margin: 4px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clay-deep);
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--clay-deep);
}
.hp { position: absolute; left: -9999px; }

.site-footer {
  background: linear-gradient(180deg, #f8edd8 0%, #f3e2c4 100%);
  color: #2c2418;
  padding: 48px 0 calc(20px + env(safe-area-inset-bottom, 0px));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.1fr;
  gap: 36px;
  margin-bottom: 28px;
  align-items: start;
}

.footer-links {
  display: contents;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.footer-brand img {
  height: 56px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.footer-brand p {
  max-width: none;
  color: #5a4d3d;
  margin: 0;
}

.site-footer h3 {
  font-family: Outfit, sans-serif;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.footer-nav {
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-nav a {
  white-space: nowrap;
}

.footer-nav a:hover,
.contact-lines a:hover {
  color: var(--clay);
}

.contact-lines {
  list-style: none;
  display: grid;
  gap: 14px;
}

.legal {
  border-top: 1px solid rgba(44, 36, 24, 0.12);
  padding-top: 16px;
  font-size: 0.88rem;
  color: #6a5c4a;
  text-align: center;
}

@media (max-width: 1100px) {
  .scope-grid,
  .scope-grid.four { grid-template-columns: repeat(2, 1fr); }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  :root { --nav: 64px; }

  .site-header {
    min-height: var(--nav);
    padding: calc(6px + env(safe-area-inset-top, 0px)) 0 6px;
  }

  .site-header .container {
    width: min(var(--max), calc(100% - 48px));
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
    margin-right: 0;
    width: 48px;
    height: 48px;
    font-size: 1.45rem;
    border-width: 1.5px;
  }

  .logo { margin: 0; }
  .logo img { height: 44px; max-width: 120px; border-radius: 10px; }

  .nav-links {
    position: absolute;
    top: var(--nav);
    left: 0;
    right: 0;
    background: rgba(251, 246, 238, 0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    display: none;
    border-bottom: 1px solid var(--sand);
    max-height: calc(100vh - var(--nav));
    overflow: auto;
  }

  .nav-links.open { display: flex; }

  .nav-links a,
  .nav-links .parent {
    font-size: 0.92rem;
    padding: 12px 14px;
  }

  .nav-links a.active,
  .nav-links .parent.active {
    background: transparent;
    color: var(--clay);
  }

  .nav-links li.open > .parent {
    background: var(--teal);
    color: #fff;
  }

  .sub-menu {
    position: static !important;
    box-shadow: none;
    min-width: 0;
    width: 100%;
    padding: 4px 0 8px 8px;
    display: none !important;
    background: transparent;
    pointer-events: none;
  }

  .has-sub.open > .sub-menu {
    display: block !important;
    pointer-events: auto;
  }

  .has-sub:hover > .sub-menu {
    display: none !important;
  }

  .has-sub.open:hover > .sub-menu {
    display: block !important;
  }

  .stats,
  .service-grid,
  .split,
  .scope-grid,
  .value-grid,
  .sustain-grid,
  .contact-wrap,
  .footer-grid,
  .form-row,
  .photo-pair,
  .split-scope,
  .split-scope .stack,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .founder-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 22px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 20px 12px;
    align-items: start;
  }

  .footer-nav a {
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .contact-lines {
    gap: 10px;
  }

  .contact-lines a,
  .contact-lines span {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .site-footer .icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  .site-footer .icon svg {
    width: 18px;
    height: 18px;
  }

  .section-head,
  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .split img,
  .hero { height: auto; min-height: 52vh; }

  .founder-photo {
    width: 148px;
    height: 148px;
  }

  .photo-pair img { height: 240px; }

  .puff-photos .photo-pair img {
    height: auto;
    max-height: none;
  }

  .clients-home {
    padding: 4px 0 2px;
  }

  .gallery-home {
    padding-top: 12px;
    padding-bottom: 36px;
  }

  .nav-links a,
  .nav-links .parent,
  .btn,
  .menu-toggle {
    min-height: 44px;
  }

  section { padding: 36px 0; }

  .section-head { margin-bottom: 18px; }

  .stats {
    margin-top: 14px;
    gap: 10px;
  }

  .stat { padding: 12px 14px; }
  .stat b { font-size: 1.4rem; }

  .value-grid { gap: 10px; }
  .value-card { padding: 14px 16px; }
  .value-card .num { font-size: 1.2rem; }

  .sustain-grid { gap: 10px; }
  .sustain-grid article {
    min-height: 0;
    padding: 14px 16px;
  }

  .cta-band { padding: 12px 0 28px; }
  .cta {
    padding: 18px 20px;
    border-radius: 18px;
    width: 100%;
  }
  .cta h2 { font-size: 1.45rem; }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

input,
select,
textarea {
  font-size: 16px;
}

.logo-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: logo-scroll 32s linear infinite;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .logo-marquee:hover .logo-track {
    animation-play-state: paused;
  }
}

.logo-slot {
  background: transparent;
  border: 0;
  border-radius: 12px;
  min-height: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex: 0 0 auto;
}

.logo-slot img {
  max-height: 52px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.logo-slot.dark {
  background: #1c222c;
  padding: 10px 14px;
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
}

.upload-card {
  margin-top: 36px;
  background: #fff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(12, 51, 64, 0.06);
}

.upload-card .form-row { margin-top: 12px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(12, 51, 64, 0.06);
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

.gallery-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gallery-card figcaption,
.gallery-card .cap {
  padding: 12px 14px 16px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 64px;
}

.lightbox[hidden] { display: none !important; }

.lightbox-stage {
  max-width: min(1100px, 86vw);
  text-align: center;
}

.lightbox img {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: min(1100px, 86vw);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
  filter: none;
  background: transparent;
}

.lightbox-title {
  color: #fff;
  margin-top: 12px;
  font-size: 1.05rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-close {
  top: 16px;
  right: 20px;
  z-index: 3;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  color: #16110d;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-close {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  color: #16110d;
}

@media (max-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery-card {
    border-radius: 16px;
  }

  .gallery-card img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .gallery-card .cap {
    font-size: 0.82rem;
    line-height: 1.3;
    padding: 10px 12px 12px;
  }

  .lightbox {
    padding: 64px 12px 96px;
    gap: 0;
  }

  .lightbox-stage {
    max-width: 100%;
    width: 100%;
  }

  .lightbox img {
    max-width: 100% !important;
    max-height: 58vh;
  }

  .lightbox-title {
    margin: 10px 56px 0;
    font-size: 0.95rem;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    transform: none;
    width: 48px;
    height: 48px;
    font-size: 1.7rem;
  }

  .lightbox-prev { left: 16px; }
  .lightbox-next { right: 16px; }

  .lightbox-close {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: 12px;
  }
}

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

  .gallery-card img {
    aspect-ratio: 16 / 10;
  }
}
