/* =========================================================
   Latos Glass Design — style.css
   Dark, elegant theme with teal/cyan accent
   ========================================================= */

:root {
  --bg: #171f1c;
  --bg-alt: #0f1613;
  --panel: #121a17;
  --line: rgba(255,255,255,0.08);
  --text: #f2f4f3;
  --text-dim: #b7bfbc;
  --text-faint: #8a938f;
  --accent: #29d6d6;
  --accent-dim: #1a8f8f;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1280px;
  /* The soft white/gray gradient line used to separate horizontal page
     sections — stops end at 33.33% so the pattern tiles exactly 3 times
     across whatever width it's stretched over. */
  --divider-gradient: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.4) 8%,
    rgba(210,210,210,0.3) 16.6%,
    rgba(255,255,255,0.12) 33.33%
  );
}

/* Shared gradient divider — a 1px border rendered from --divider-gradient,
   used to separate stacked horizontal sections instead of a flat line. */
.section-divider {
  border-bottom: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
}
.section-divider-top {
  border-top: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: 0.06em;
  margin: 0;
  text-transform: uppercase;
}

/* Small uppercase UI labels (nav, buttons, filters, captions) stay
   medium/semibold for legibility at small sizes — only the large
   display headings use the light/extralight weights. */
nav.main-nav a,
.btn,
.filter-btn,
.card-caption h4,
.tile-overlay h4,
.footer-grid h4,
.lang-select,
.section-link,
.spec-row span:first-child,
.form-field label,
.contact-info h4,
.value-card h4,
.step-row h4 {
  font-weight: 600;
}

p { margin: 0; }

strong, b {
  font-weight: 700;
  color: #ffffff;
}

/* First-line paragraph indent, matching the original site's typesetting
   on the pages that used it (e.g. "Dlaczego witraż"). Applied selectively
   via this class rather than globally, since most pages on the new site
   don't use it. */
.indent-p {
  text-indent: 2em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--text); color: var(--bg); }

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-accent:hover { background: var(--accent); color: #06201f; }

.btn-solid {
  background: var(--accent);
  color: #06201f;
  border-color: var(--accent);
}
.btn-solid:hover { background: transparent; color: var(--accent); }

/* ---------- Header ---------- */
header.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
header.site-header.is-scrolled {
  position: fixed;
  background: rgba(12, 18, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Two logo images: the full mark by default, swapped for the compact
   "-min" mark once the header shrinks on scroll. The scrolled bar gets
   a fixed height so "90% of the bar" and vertical centering both have
   something concrete to measure against. */
.logo-img.logo-img-min { display: none; height: 60px; }
header.site-header.is-scrolled .header-inner { min-height: 90px; }
header.site-header.is-scrolled .logo-img-full { display: none; }
header.site-header.is-scrolled .logo-img-min {
  display: block;
  height: 54px; /* 70% of the 90px scrolled bar, then -15% */
}
header.site-header.is-scrolled .logo {
  top: 50%;
  transform: translateY(-50%);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px 40px;
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 24px;
}

/* Wrapper is transparent to layout — logo and nav become direct flex
   children of .header-inner, keeping the logo pinned to the exact same
   left edge as the hero content below it. */
.header-brand-nav {
  display: contents;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.site-header .logo {
  position: absolute;
  left: 40px;
  top: 16px;
}
.logo-img {
  /* Scales with width (vw) as before, but also capped by viewport height
     (vh) — otherwise on a wide-but-short window the logo can stay near
     its max size while the hero shrinks, and the two collide. */
  height: clamp(81px, min(10.35vw, 15vh), 213px);
  width: auto;
  display: block;
}
.footer-brand .logo-img { height: 168px; }

nav.main-nav {
  flex: 1;
  justify-content: center;
  margin-left: clamp(60px, 12vw, 180px);
}
.header-tools { flex-shrink: 0; }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
  flex-wrap: nowrap;
  white-space: nowrap;
}
nav.main-nav a {
  position: relative;
  font-size: clamp(10px, 0.8vw, 13px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.35s ease;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}
nav.main-nav a:hover {
  color: var(--accent);
}
nav.main-nav a:hover::after { width: 100%; }
nav.main-nav a.active {
  color: var(--accent);
}
nav.main-nav a.active::after { width: 100%; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.icon-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
}

/* ---------- Icon files (assets/icons/*.svg) ----------
   Swap any file in assets/icons/ to change that icon site-wide. */
.icon-img {
  width: 18px;
  height: 18px;
  display: block;
}
.icon-img-lg {
  width: 56px;
  height: 56px;
}
.lang-select {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
  position: relative;
  /* a fixed height (not min-height) so the row's percentage-height
     children — the video above all — always resolve against exactly
     this box and can never grow it, no scrolling needed to see the
     bottom of the hero. */
  height: 92vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
}
.hero-media {
  grid-column: 1 / 1;
  grid-row: 1 / 1;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: transform;
}
.hero-media.is-active {
  opacity: 1;
  z-index: 1;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media video {
  width: 100%;
  height: 100%;
  /* back to cover — clip always spans the full page width (and height),
     no letterbox bars; the trade-off is that it can crop the very top/
     bottom of the frame, same as the photos. */
  object-fit: cover;
  cursor: pointer;
  filter: brightness(1.1);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,12,10,0.70) 0%, rgba(8,12,10,0.38) 42%, rgba(8,12,10,0.08) 75%);
}
.hero-content {
  grid-column: 1 / 1;
  grid-row: 1 / 1;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  align-self: center;
  justify-self: stretch;
  margin-top: 90px;
  will-change: transform;
}
.hero-content .eyebrow { margin-bottom: 20px; display:block; }
.hero-title {
  font-family: var(--sans);
  font-weight: 200;
  text-transform: uppercase;
  font-size: clamp(41px, 5.95vw, 78px);
  line-height: 1.08;
  letter-spacing: 0.07em;
  max-width: 640px;
}
/* Architektura homepage hero: the copy runs longer per line than the
   gravestone hero's short stacked words, so at the same clamp() it reads
   visually heavier — scale it down to match that hero's on-screen size. */
.hero-title--arch {
  font-size: clamp(33px, 4.76vw, 62px);
  max-width: 640px;
}
.hero-sub {
  margin-top: 24px;
  max-width: 420px;
  color: var(--text-dim);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.7;
}
.hero-actions { margin-top: 40px; }
.hero-quote {
  position: absolute;
  right: 60px;
  top: 40%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.5;
  color: var(--text-dim);
  text-align: right;
  max-width: 220px;
  z-index: 1;
}
.hero-dots {
  position: absolute;
  right: 40px;
  bottom: 48px;
  display: flex;
  gap: 18px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  z-index: 1;
}
.hero-dots span.active { color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 4px; }
.hero-dots span { cursor: pointer; }

/* Prev/next arrows for the hero slideshow — same circular style as the
   lightbox arrows. Always available (desktop + mobile); on narrow
   screens the numbered dots are hidden (collide with the CTA button),
   so these become the only visible way to step through slides besides
   swiping. */
.hero-arrows {
  position: absolute;
  left: 24px;
  bottom: 32px;
  display: flex;
  gap: 12px;
  z-index: 2;
}
.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.hero-arrow svg { width: 18px; height: 18px; }
.hero-arrow:hover { border-color: var(--accent); color: var(--accent); }

/* Subtle "scroll down" cue — homepage hero only. Fades out on its own once
   the visitor has actually scrolled (main.js toggles .is-hidden), so it
   never lingers as clutter once it's done its job. */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.6s ease, border-color 0.3s ease, color 0.3s ease;
  animation: hero-scroll-bounce 2.6s ease-in-out infinite;
}
.hero-scroll-cue:hover { border-color: var(--accent); color: var(--accent); }
.hero-scroll-cue svg { width: 18px; height: 18px; }
.hero-scroll-cue.is-hidden { opacity: 0; pointer-events: none; }
@keyframes hero-scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@media (max-width: 720px) {
  .hero-scroll-cue { display: none; }
  /* On small screens the numbered slide bar collides with the CTA — hide it. */
  .hero-dots { display: none; }
  .hero-arrows { left: 16px; bottom: 20px; gap: 8px; }
  .hero-arrow { width: 38px; height: 38px; }
  .hero-arrow svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue { animation: none; }
}

/* ---------- Feature strip ---------- */
.feature-strip {
  background: var(--bg-alt);
  position: relative;
}
.feature-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--divider-gradient);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
/* Each column wraps its icon box together with the drawer that slides out
   underneath it, so the divider lines (and the drawer's own alignment)
   stay attached to the right column at every breakpoint. */
.feature-col {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.feature-col:first-child { border-left: none; }
.feature-item {
  /* fluid, not stepped: shrinks continuously with the viewport instead of
     jumping at a single breakpoint, so it never towers over the content
     on a narrow-but-tall window. */
  padding: clamp(14px, 4vw, 44px) clamp(10px, 3vw, 30px);
  text-align: center;
  cursor: pointer;
}
.feature-icon {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(6px, 1.6vw, 18px);
}
.feature-icon .icon-img-lg {
  filter: brightness(0) invert(1);
  width: clamp(17px, 4.3vw, 56px);
  height: clamp(17px, 4.3vw, 56px);
  transition: filter 0.4s ease, transform 0.4s ease;
}
/* Outer glow + a slight lift on hover — same accent teal used everywhere
   else on the page for a hover state. */
.feature-item:hover .feature-icon .icon-img-lg,
.feature-item:focus-visible .feature-icon .icon-img-lg {
  filter: brightness(0) invert(1)
    drop-shadow(0 0 8px rgba(41, 214, 214, 0.85))
    drop-shadow(0 0 20px rgba(41, 214, 214, 0.45));
  transform: scale(1.08);
}
.feature-item h3 {
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.1em;
  margin-bottom: clamp(4px, 1vw, 10px);
  transition: color 0.3s ease;
}
.feature-item p {
  font-size: clamp(11px, 1.1vw, 13px);
  color: var(--text-faint);
  line-height: 1.6;
}
.feature-item[aria-expanded="true"] h3 { color: var(--accent); }

/* Explanation drawer — slides out from the bottom edge of the box above
   it, same width, pushing whatever comes after the strip further down.
   Animated purely with a CSS grid-rows trick (0fr -> 1fr) so the height
   doesn't need to be measured in JS and the reveal is always smooth. */
.feature-panel {
  display: grid;
  grid-template-rows: 0fr;
  background: var(--panel);
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-panel[data-open="true"] { grid-template-rows: 1fr; }
.feature-panel-inner {
  overflow: hidden;
  min-height: 0;
}
.feature-panel-inner p {
  margin: 0;
  padding: clamp(14px, 2.6vw, 22px) clamp(16px, 3vw, 30px) clamp(16px, 3vw, 30px);
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1.7;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- Section generic ---------- */
.section {
  padding: 110px 0;
  border-bottom: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
}
.section-tight {
  padding: 70px 0;
  border-bottom: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 50px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-title {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-top: 12px;
}
.section-link {
  position: relative;
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 4px;
  transition: color 0.35s ease;
}
.section-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.section-link:hover {
  color: var(--accent);
}
.section-link:hover::after { width: 100%; }

.page-hero {
  padding: 190px 0 70px;
  border-bottom: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
  background: var(--bg-alt);
}
.page-hero--photo {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.page-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Darker across the top ~30% of the banner, where the logo and nav sit
     over the photo, then eases back down to the original curve for the
     rest of the banner (unchanged from before: light near the title,
     darker toward the bottom edge). */
  background: linear-gradient(180deg, rgba(6,10,9,0.82) 0%, rgba(6,10,9,0.82) 30%, rgba(6,10,9,0.62) 42%, rgba(6,10,9,0.74) 100%);
  z-index: 0;
}
.page-hero--photo .container {
  position: relative;
  z-index: 1;
}
/* The dim/faint text tones read fine on the plain dark page-hero background,
   but lose too much contrast over a photo — brighten them here only. */
.page-hero--photo .breadcrumb,
.page-hero--photo .breadcrumb a {
  color: var(--text-dim);
}
.page-hero--photo .breadcrumb a:hover {
  color: var(--accent);
}
.page-hero--photo .lede {
  color: var(--text);
}
.breadcrumb {
  font-size: 15px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.page-hero .breadcrumb {
  font-size: 16px;
}
.page-hero h1 {
  font-size: clamp(34px, 5.3vw, 55px);
}
.page-hero--photo h1 {
  text-shadow: 0 2px 18px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.85);
}
.page-hero .lede {
  margin-top: 18px;
  color: #fff;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.7;
  text-transform: none;
  letter-spacing: 0.01em;
}
.hero-note {
  margin-top: 14px;
  color: #fff;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.6;
  font-style: italic;
}

/* Same one-time fade + rise as the homepage hero (see .hero-content
   above), reused for every inner page's banner: breadcrumb, title and
   lede animate in on load, staggered. Pure CSS, no scroll logic. */
.page-hero .container > * {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.page-hero .container > .breadcrumb { animation-delay: 0.05s; }
.page-hero .container > h1 { animation-delay: 0.15s; }
.page-hero .container > .lede { animation-delay: 0.3s; }
.page-hero .container > .hero-note { animation-delay: 0.42s; }

@media (prefers-reduced-motion: reduce) {
  .page-hero .container > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ---------- Realizacje grid ---------- */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 22px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  cursor: pointer;
  display: block;
  color: inherit;
  text-decoration: none;
}
.card .card-media {
  aspect-ratio: 3/4;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #9aa3a0;
  box-shadow: 0 10px 22px rgba(0,0,0,0.6);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
.card .card-media::after {
  /* a diagonal streak of light that sweeps across the glass on hover,
     instead of tinting the whole photo */
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  transition: left 0.9s ease;
  pointer-events: none;
}
.card:hover .card-media {
  border-color: #ffffff;
  box-shadow: 0 18px 34px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.3);
  transform: translateY(-6px);
}
.card:hover .card-media::after { left: 125%; }
.card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .card-media img { transform: scale(1.08); }
.card-caption {
  padding: 16px 4px 4px;
}
.card-caption h4 {
  position: relative;
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: color 0.35s ease;
}
.card-caption h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.card:hover .card-caption h4 {
  color: var(--accent);
}
.card:hover .card-caption h4::after { width: 100%; }
.card-caption p {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
  text-transform: none;
}

.tile-overlay {
  position: relative;
}
.tile-overlay .card-media { aspect-ratio: 4/5; }
/* Homepage "Nasze realizacje" teasers reuse the very same renders shown
   on the Realizacje page — matching that page's 4/5 crop (instead of the
   generic .card default of 3/4) means both places frame each photo the
   same way, so no separate homepage-only thumbnail crop needs to exist. */
.grid-6 .card-media { aspect-ratio: 4/5; }
/* Homepage "Wybrane realizacje" shows only 5 of the 6 grid-6 columns —
   narrow the row to 5/6 of the container and center it (instead of
   leaving it flush left with an empty 6th column), and add breathing
   room above it since .lede carries no margin of its own. */
.tiles-home-5 {
  grid-template-columns: repeat(5, 1fr);
  max-width: 83.333%;
  margin: 34px auto 0;
}
.tile-overlay .overlay-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(6,10,9,0.92) 20%, transparent 100%);
}
.tile-overlay h4 {
  font-size: 13px;
  letter-spacing: 0.08em;
}
.tile-overlay p {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
  text-transform: none;
}

/* ---------- Filter tabs ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--text); }
.filter-btn.active { background: var(--accent); color: #06201f; border-color: var(--accent); }

.gallery-item { transition: opacity 0.3s ease, transform 0.3s ease; }
.gallery-item.hidden { display: none; }
.gallery-item .card-media { cursor: zoom-in; }
.gallery-item:not(.tile-overlay) .card-media { aspect-ratio: 1/1; }

/* ---------- Gallery lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 30px);
  padding: 24px;
  background: rgba(8, 12, 10, 0.94);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.open { display: flex; }
.lightbox.visible { opacity: 1; }
.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(90vw, 1100px);
  max-height: 88vh;
}
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.lightbox.visible .lightbox-img { opacity: 1; transform: scale(1); }

/* Swipe/arrow/keyboard navigation between photos: outgoing image slides
   out (left for "next", right for "previous") while fading; the next
   one starts just off-screen on the opposite side and slides into
   place. See the showAt()/renderFrame() split in main.js. */
.lightbox.visible .lightbox-figure.lightbox-slide-out-left,
.lightbox.visible .lightbox-figure.lightbox-slide-out-right {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.lightbox.visible .lightbox-figure.lightbox-slide-out-left { transform: translateX(-60px); opacity: 0; }
.lightbox.visible .lightbox-figure.lightbox-slide-out-right { transform: translateX(60px); opacity: 0; }
.lightbox.visible .lightbox-figure.lightbox-slide-in-prep-left {
  transition: none;
  transform: translateX(-60px);
  opacity: 0;
}
.lightbox.visible .lightbox-figure.lightbox-slide-in-prep-right {
  transition: none;
  transform: translateX(60px);
  opacity: 0;
}
.lightbox-caption {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-arrow {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.lightbox-arrow svg { width: 20px; height: 20px; }
.lightbox-arrow:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-arrow:disabled { opacity: 0.3; cursor: default; }
@media (max-width: 760px) {
  .lightbox { gap: 6px; padding: 16px; }
  .lightbox-arrow { width: 38px; height: 38px; }
  .lightbox-arrow svg { width: 16px; height: 16px; }
  .lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
}

/* ---------- Gallery cutouts (product on swappable granite texture) ----------
   Fixed-width-column masonry: every column is exactly the same width,
   so the gutters between tiles — both the column gap and the vertical
   margin — are a constant "fuga" and the grid reads as one clean
   rectangle, not a ragged row-by-row wall. Height is free per tile
   (each image's own aspect ratio), which is what makes it masonry.
   The image itself is capped at its native pixel width (inline
   max-width, set in build.py) and centered in the column — a few
   cutouts were exported on a very narrow canvas, and stretching those
   to the full column width upscaled and blurred them; centering a
   narrow one just shows a little more of the column's own background
   on its sides instead. */
.cutout-grid {
  column-count: 6;
  column-gap: 16px;
}
.cutout-tile {
  display: block;
  cursor: zoom-in;
  break-inside: avoid;
  margin-bottom: 16px;
}
.cutout-media {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #585e5b;
  background-color: #0c1413;
  background-image:
    linear-gradient(145deg, rgba(8,13,12,0.45), rgba(4,7,7,0.6)),
    url('../../Zdjęcia/granity/texture-premium-black.webp');
  background-size: cover;
  background-position: center;
  transition: border-color 0.4s ease;
}
.cutout-media img {
  display: block;
  width: 100%;
  max-width: 100%; /* overridden per-image by an inline max-width (native px) */
  height: auto;
  filter: drop-shadow(0 0 1.5px rgba(0,0,0,0.8));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.cutout-tile:hover .cutout-media { border-color: #aab0ad; }
.cutout-tile:hover .cutout-media img { transform: scale(1.06); }
@media (max-width: 1100px) {
  .cutout-grid { column-count: 4; }
}
@media (max-width: 760px) {
  .cutout-grid { column-count: 3; column-gap: 10px; }
  .cutout-tile { margin-bottom: 10px; }
}

/* Lightbox "stone" mode — a transparent product cutout floats on a
   swappable granite/marble background (instead of the plain dark
   lightbox backdrop) with a drop-shadow. The texture background lives
   only on .lightbox-figure (the picture itself); .lightbox-stones is a
   sibling of the figure inside .lightbox-stage, so the stone swatches
   always sit below the picture frame, never inside/over it. Toggled via
   JS (main.js) based on the trigger's data-cutout="true" attribute. */
.lightbox-figure {
  background-size: cover;
  background-position: center;
  transition: background-image 0.25s ease;
}
.lightbox.stone-mode .lightbox-stage {
  max-width: min(94vw, 1600px);
  max-height: 92vh;
}
.lightbox.stone-mode .lightbox-img {
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
  max-width: 100%;
  max-height: 80vh;
}
.lightbox-stones {
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 0 0 auto;
}
.lightbox.stone-mode .lightbox-stones { display: flex; }
.stone-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stone-swatch:hover { transform: scale(1.08); }
.stone-swatch.active { border-color: var(--accent); }

/* ---------- Split / Technology teaser ---------- */
.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: clamp(200px, 21vw, 340px);
}
.split-media { position: relative; overflow: hidden; height: 100%; }
.split-media img { width:100%; height:100%; object-fit: cover; }
.split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 62%, var(--panel) 100%);
  pointer-events: none;
}
.split-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  background: var(--panel);
}
.split-content h2 { font-size: clamp(28px,3.4vw,42px); margin-top: 14px; }
/* "O nas" — "Nasza historia" heading, 25% smaller than the shared
   .split-content h2 size used elsewhere. */
.split-content h2.h2-sm-25 { font-size: clamp(21px,2.55vw,31.5px); }
.split-content p {
  color: var(--text-dim);
  margin-top: 20px;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.7;
  text-transform: none;
}
.split-content .btn { margin-top: 34px; align-self: flex-start; }

/* ---------- Quote / footer band ---------- */
.quote-band {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  border-bottom: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
}
.quote-media { aspect-ratio: 16/10; overflow: hidden; }
.quote-media img { width: 100%; height: 100%; object-fit: cover; }
.quote-text {
  display: flex;
  align-items: center;
  padding: 50px 60px;
  background: var(--bg-alt);
}
.quote-text p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px,2.4vw,30px);
  line-height: 1.5;
  color: var(--text-dim);
  text-transform: none;
}

/* ---------- "O nas" page rebuild — alternating story sections ---------- */
.split--reverse { grid-template-columns: 1fr 1.5fr; }
/* When the layout is reversed (text on the left, photo on the right), the
   photo's fade needs to sit on its left edge — the side facing the text —
   instead of the right edge. */
.split--reverse .split-media::after { background: linear-gradient(to left, transparent 62%, var(--panel) 100%); }
.split--history { min-height: clamp(420px, 46vw, 620px); }
/* Zoom the "witrażowy zegar" photo out slightly on desktop so it doesn't
   fill the frame edge-to-edge. On mobile the box's aspect ratio changes
   (16/9, see the responsive rules below) and a fixed 88% width no longer
   centers cleanly against the photo's own aspect ratio, so mobile keeps
   the same plain, fully-centered cover crop as every other photo. */
@media (min-width: 1081px) {
  .split--history .split-media { background-color: var(--bg); background-size: 88%; background-position: center; }
}
.split-more {
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.split-more .chev {
  display: inline-block;
  transform: translateY(-1px);
  transition: transform 0.35s ease;
}
.split-more:hover .chev { transform: translateY(3px); }

.split-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: clamp(200px, 21vw, 340px);
  border: 1px solid var(--line);
}
.split-3-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 44px;
}
.split-3-content h2 { font-size: clamp(24px,2.8vw,34px); margin-top: 14px; }
.split-3-content p {
  color: var(--text-dim);
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.7;
  text-transform: none;
}
.split-3-media { position: relative; overflow: hidden; height: 100%; }
.split-3-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 50px 44px;
  background: var(--panel);
}
/* Feature list overlaid directly on a .split-media photo (instead of its
   own column) — a dark scrim keeps the icons/text readable on any image. */
.feature-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 50px 44px;
  /* This box sits above (and fully hides) .split-media::after, so the
     usual edge-fade-toward-the-text has to live here instead: a flat
     scrim for readability across the photo, fading to solid page
     background at the left edge — this section is always
     split--reverse (text left, photo right). */
  background: linear-gradient(to left, rgba(6,10,9,0.42) 0%, rgba(6,10,9,0.42) 62%, var(--bg) 100%);
}
.feature-overlay .feature-row h4 { color: var(--text); }
.feature-overlay .feature-row p { color: var(--text-dim); }
.feature-row { display: flex; align-items: flex-start; gap: 18px; }
.feature-row .icon-img { width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px; }
.feature-row h4 { font-size: 17px; letter-spacing: 0.06em; margin-bottom: 6px; }
.feature-row p { font-size: 15px; color: var(--text-faint); text-transform: none; line-height: 1.6; }

.collab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
}
.collab-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.collab-text h2 { font-size: clamp(28px,3.4vw,42px); margin-top: 14px; }
.collab-text p {
  color: var(--text-dim);
  margin-top: 20px;
  max-width: 460px;
  font-size: 15px;
  line-height: 1.7;
  text-transform: none;
}
/* Quote now sits under the intro paragraph, in the left text column —
   scoped selector (2 classes) so it outranks the plain ".collab-text p"
   rule above instead of inheriting its size/color. */
.collab-text .collab-quote {
  margin-top: 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px,2.3vw,26px);
  line-height: 1.6;
  color: var(--text-dim);
  text-transform: none;
  max-width: 460px;
}
/* Right column is just the photo now — shown in full (no cropping),
   centered in whatever height the row ends up being. Text sits on the
   left, so — same rule as the other alternating sections — the fade
   sits on the photo's left edge, facing the text. */
.collab-photo { position: relative; overflow: hidden; display: flex; align-items: center; }
.collab-photo img { width: 100%; height: auto; display: block; }
.collab-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, transparent 62%, var(--bg) 100%);
  pointer-events: none;
}

/* "O nas" alternating sections — flush with the page background instead of
   the slightly darker --panel tone, and no leftover 1px frame. */
.split--flush .split-content { background: var(--bg); }
.split--flush .split-media::after { background: linear-gradient(to right, transparent 62%, var(--bg) 100%); }
.split--reverse.split--flush .split-media::after { background: linear-gradient(to left, transparent 62%, var(--bg) 100%); }
.split-3--flush { border: none; }
.split-3--flush .feature-list { background: var(--bg); }

/* ---------- Hero entrance ----------
   A one-time fade + rise for the homepage hero text, staggered line by
   line, playing the instant the page loads. Pure CSS (no scroll
   triggering, no JS) — the hero is always the first thing on screen, so
   there's no viewport-detection logic to get wrong, and unlike the old
   scroll-reveal this never coexists with a section boundary it could
   visually cross: it's centered over a full-bleed background, not a
   photo box sitting flush against other content. */
.hero-content > * {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-content .eyebrow { animation-delay: 0.1s; }
.hero-content .hero-title { animation-delay: 0.22s; }
.hero-content .hero-sub { animation-delay: 0.38s; }
.hero-content .hero-actions { animation-delay: 0.52s; }

@keyframes hero-enter {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (max-width: 1080px) {
  .split-3 { grid-template-columns: 1fr; }
  .collab-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid transparent;
  border-image: var(--divider-gradient) 1;
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-grid h4 {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}
.footer-grid p, .footer-grid a {
  font-size: 13px;
  color: var(--text-faint);
  display: block;
  margin-bottom: 10px;
}
.footer-grid a:hover { color: var(--accent); }
.footer-brand .logo { margin-bottom: 18px; }
.footer-brand p { max-width: 260px; line-height: 1.7; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-faint);
}
.footer-bottom .signoff { font-family: var(--serif); font-style: italic; color: var(--text-dim); }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}
.contact-info .info-row {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
  align-items: flex-start;
}
.contact-info .info-row .ico {
  color: var(--accent);
  font-size: 18px;
  margin-top: 2px;
}
.contact-info h4 {
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.contact-info p { color: var(--text-dim); font-size: 14px; text-transform: none; }
.contact-info p a:hover { color: var(--accent); }

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { outline: none; border-color: var(--accent); }

.map-embed {
  margin-top: 40px;
  aspect-ratio: 21/8;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* ---------- Process / technology steps ---------- */
.steps-list { display: flex; flex-direction: column; }
.step-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.step-row .num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--accent);
}
.step-row h4 { font-size: 14px; letter-spacing: 0.08em; margin-bottom: 8px; }
.step-row p { color: var(--text-dim); font-size: 14px; text-transform: none; line-height: 1.7; }

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 30px; margin-top: 10px;}
.checklist li {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}
.checklist li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 8px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- About page ---------- */
.about-hero-media { aspect-ratio: 21/9; overflow: hidden; }
.about-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.values-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 50px; }
.value-card { padding: 30px 24px; border: 1px solid var(--line); }
.value-card .n { font-family: var(--serif); font-size: 34px; color: var(--accent); margin-bottom: 12px; }
.value-card h4 { font-size: 13px; letter-spacing: 0.06em; margin-bottom: 10px; }
.value-card p { font-size: 13px; color: var(--text-faint); text-transform: none; line-height: 1.6; }

/* ---------- Detail page ---------- */
.detail-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; }
.detail-media-main { overflow: hidden; margin-bottom: 20px; background: var(--bg-alt); }
.detail-media-main img { width: 100%; height: auto; display: block; }
.detail-thumbs { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.detail-thumbs img { aspect-ratio: 1/1; object-fit: cover; }
.detail-info h1 { font-size: clamp(26px,3vw,36px); }
.detail-info .dates { color: var(--text-faint); font-size: 14px; margin-top: 10px; letter-spacing: 0.04em; }
.detail-info .desc { color: var(--text-dim); margin-top: 24px; font-size: 15px; line-height: 1.8; text-transform: none; }
.detail-title-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.detail-nav-arrows { display: flex; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.detail-nav-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.detail-nav-arrow svg { width: 16px; height: 16px; }
.detail-nav-arrow:hover { background: var(--accent); color: #06201f; }
.spec-table { margin-top: 30px; border-top: 1px solid var(--line); }
.spec-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec-row span:first-child { color: var(--text-faint); letter-spacing: 0.05em; text-transform: uppercase; }
.spec-row a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.spec-row a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.color-swatches { display: flex; gap: 12px; margin-top: 30px; }
.color-swatches img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid-6 { grid-template-columns: repeat(3,1fr); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-5 { grid-template-columns: repeat(3,1fr); }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  /* 2x2 grid: column 3 starts a new row, so it loses the left border (it's
     now a left-column item, like column 1) and instead columns 3 + 4 get a
     top border to separate the two rows — a proper cross, not a single
     vertical line running the full height. */
  .feature-col:nth-child(3) { border-left: none; }
  .feature-col:nth-child(3), .feature-col:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .quote-band, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
  .split { height: auto; }
  /* On desktop, split--reverse swaps which column holds the photo, purely
     for left/right visual variety. Stacked on mobile that variety instead
     means two photos (or two text blocks) from adjacent sections can end
     up next to each other. Force a consistent text-then-photo order here
     so every photo always alternates with text, regardless of
     split--reverse. */
  .split-content { order: 1; }
  .split-media { order: 2; }
  /* Stacked single-column layout: give every photo breathing room so two
     adjacent "flush" sections (padding-top/bottom:0) don't end up with
     their images touching edge-to-edge and reading as one merged image. */
  /* height:100% (set for the desktop side-by-side layout) fights with
     aspect-ratio once .split is a single stretched column: the grid row's
     auto height ends up sized to the media box alone, not counting its
     own margin, so the image visually spilled past its section's edge.
     height:auto here lets aspect-ratio fully determine the box, so the
     margin is properly included in the section's height. */
  .split-media { height: auto; aspect-ratio: 16/9; margin: 28px 0; }
  .split-media::after { display: none; }
  .collab-photo::after { display: none; }
  /* The feature-icons overlay needs a taller photo than the usual 16/9 crop
     to fit three rows without crowding or clipping on narrow screens. */
  .split-media:has(.feature-overlay) { aspect-ratio: 3/4; }
  .feature-overlay { padding: 30px 24px; gap: 18px; }
  .values-grid { grid-template-columns: repeat(2,1fr); }
  .hero-quote { display: none; }
}

/* Header/nav switch to the mobile hamburger menu below 1096px, since the
   full nav + logo start overlapping before the rest of the layout needs
   to reflow. Also switch any time the viewport is taller than it is wide
   (portrait orientation), regardless of width, since the full nav doesn't
   fit comfortably in a narrow-but-tall window either. */
@media (max-width: 1096px), (orientation: portrait) {
  .header-inner { padding: 14px 20px; }
  .logo-img { height: 110px; }
  nav.main-nav { display: none; }
  .nav-toggle { display: flex; }
  /* Push the hamburger to the far right instead of it sitting flush
     against the (absolutely-positioned) logo. */
  .header-tools { margin-left: auto; }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .hero-content { padding: 0 20px; }
  .grid-6, .grid-4, .grid-3, .grid-5, .checklist { grid-template-columns: repeat(2,1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-col { border-left: none; border-top: 1px solid var(--line); }
  .feature-col:first-child { border-top: none; }
  .section { padding: 70px 0; }
  .page-hero { padding: 140px 0 50px; }
  .values-grid { grid-template-columns: 1fr; }
  .step-row { grid-template-columns: 40px 1fr; }
}

/* Mobile nav drawer */
nav.main-nav.open {
  display: flex;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  background: var(--bg);
  padding: 20px 20px 30px;
  border-bottom: 1px solid var(--line);
  gap: 4px;
}
nav.main-nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- Robust "cover" fit for all media images ----------
   Rendered as a CSS background-image (background-size:cover) rather
   than an <img object-fit>, which proved unreliable in some renderers.
   The original <img> is kept, visually hidden, for alt-text / SEO. */
.hero-media {
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-media,
.split-media,
.quote-media,
.detail-media-main,
.about-hero-media {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Show the whole photo, uncropped, instead of the usual cover-fill crop —
   used where the full height of the subject matters more than filling
   the box edge-to-edge. */
.split-media--contain {
  background-size: contain;
  background-color: var(--bg);
}
.split-media--handshake {
  background-position: center 88%;
}
.media-a11y-img {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Text kept for search engines and screen readers but not shown on screen. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Contact form: honeypot (hidden from real users) + status message */
.contact-form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.contact-form .form-status {
  margin: 0 0 14px;
  font-size: 14px;
  min-height: 1.2em;
}
.contact-form .form-status[data-ok] { color: #3fae8e; }
.contact-form .form-status[data-err] { color: #c0564a; }
