/* Domy Tomaszow Mazowiecki - design tokens, base styles, components */

:root {
  /* Colors */
  --ink: #211f19;
  --ink-soft: #55503f;
  --ink-faint: #83795f;
  --paper: #faf7f0;
  --paper-alt: #f1ead9;
  --card: #ffffff;
  --line: #e7dfc9;
  --line-soft: #efe8d8;

  --forest: #21362a;
  --forest-2: #16241b;
  --forest-tint: #eaf0e7;
  --forest-tint-line: #d9e3d3;

  --gold: #b3813c;
  --gold-2: #96692e;
  --gold-tint: #f6ead4;
  --cream: #f7f1e1;

  --shadow-sm: 0 2px 10px -4px rgba(33, 30, 20, 0.18);
  --shadow-md: 0 18px 40px -20px rgba(22, 30, 20, 0.35);
  --shadow-lg: 0 30px 70px -25px rgba(22, 30, 20, 0.45);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--forest-2);
}
::selection { background: var(--gold); color: #fff; }

:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.5rem, 3rem + 3vw, 7rem);
}
main section[id] { scroll-margin-top: 5.75rem; }
.section-alt { background: var(--paper-alt); }
.section-dark {
  background: linear-gradient(165deg, var(--forest) 0%, var(--forest-2) 100%);
  color: var(--cream);
}
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 1.6rem + 1.8vw, 3.25rem);
}
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 1.6em;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.section-dark .eyebrow { color: var(--gold-tint); }

h2 { font-size: clamp(1.9rem, 1.6rem + 1.4vw, 2.7rem); margin-bottom: 0.9rem; }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
.lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  color: var(--ink-soft);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3.5rem;
  background: var(--forest);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.97rem;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-gold {
  background: linear-gradient(180deg, #c39750, var(--gold));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { background: linear-gradient(180deg, #cca35f, var(--gold-2)); box-shadow: var(--shadow-md); }

.btn-outline-light {
  border-color: rgba(247, 241, 225, 0.55);
  color: #fff;
}
.btn-outline-light:hover { background: rgba(247, 241, 225, 0.12); border-color: #fff; }

.btn-outline {
  border-color: var(--line);
  color: var(--forest-2);
  background: #fff;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-2); box-shadow: var(--shadow-sm); }

.btn-ghost-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  border-color: var(--line);
  color: var(--forest-2);
}
.btn-ghost-sm:hover { border-color: var(--gold); color: var(--gold-2); }

.btn-block { width: 100%; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* Blur lives on a pseudo-element rather than .site-header itself, otherwise
   backdrop-filter would turn the header into the containing block for the
   fixed mobile nav below and squash it down to the header's own height. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 5rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  width: 2.6rem; height: 2.6rem;
  flex: none;
  color: var(--forest);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--forest-2);
}
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 2.2rem);
}
.site-nav a {
  position: relative;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-block: 0.4rem;
  transition: color 0.2s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: right 0.28s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--forest-2); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.site-nav a.nav-cta-link {
  background: var(--forest-tint);
  border: 1px solid var(--forest-tint-line);
  padding: 0.5rem 1.05rem;
  border-radius: var(--radius-pill);
  color: var(--forest-2);
}
.site-nav a.nav-cta-link::after { display: none; }
.site-nav a.nav-cta-link:hover { background: var(--forest); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 0.9rem; }
.header-phone svg { color: var(--gold-2); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
}
.nav-toggle span {
  width: 1.25rem; height: 2px;
  background: var(--forest-2);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .header-phone-text { display: none; }
  .header-phone { padding: 0.65rem; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 5rem 0 0 0;
    background: var(--paper);
    padding: 1.5rem var(--gutter) 2.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    overflow-y: auto;
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line-soft); }
  .site-nav a { display: block; padding: 1.1rem 0.25rem; font-size: 1.05rem; }
  .site-nav a::after { display: none; }
  .site-nav a.nav-cta-link { margin-top: 1rem; text-align: center; }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(46rem, 92vh);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 30, 22, 0.92) 0%, rgba(20, 30, 22, 0.72) 38%, rgba(20, 30, 22, 0.32) 68%, rgba(20, 30, 22, 0.15) 100%),
    linear-gradient(0deg, rgba(15, 22, 16, 0.55) 0%, rgba(15, 22, 16, 0) 45%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: clamp(6.5rem, 5rem + 6vw, 8rem) clamp(3.5rem, 3rem + 3vw, 5rem);
  max-width: 42rem;
}
.hero .eyebrow { color: var(--gold-tint); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 1.9rem + 2.4vw, 4rem);
  margin-bottom: 1.1rem;
}
.hero .lead {
  color: rgba(255, 255, 255, 0.88);
  max-width: 38rem;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.75rem;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.hero-stats li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.86rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.hero-stats svg { width: 1.05em; height: 1.05em; color: var(--gold-tint); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: bob 2.6s ease-in-out infinite;
}
.scroll-cue svg { width: 1.3rem; height: 1.3rem; }
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
@media (max-width: 640px) {
  /* Hero content height varies with copy length on narrow screens, and this
     absolutely-positioned cue has no reliable clearance below it there. */
  .scroll-cue { display: none; }
}

/* Feature grid (Opis) */
.about-grid {
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 5rem);
  align-items: center;
}
.about-copy p + p { margin-top: 1.1rem; color: var(--ink-soft); }
.about-copy p:first-child { color: var(--ink); }

.feature-list {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--forest-2);
}
.feature-list svg {
  width: 1.3rem; height: 1.3rem;
  flex: none;
  color: var(--gold);
  margin-top: 0.05rem;
}

.about-media { position: relative; }
.about-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.about-media-tag {
  position: absolute;
  left: -1.25rem;
  bottom: -1.25rem;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.about-media-tag strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--forest-2);
  line-height: 1;
}
.about-media-tag span {
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.about-media-tag svg { width: 2.1rem; height: 2.1rem; color: var(--gold); flex: none; }

@media (max-width: 480px) {
  .about-media-tag { left: 0.75rem; bottom: -1rem; padding: 0.9rem 1.1rem; }
}

@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.05fr 0.95fr; }
  .about-grid.reverse { grid-template-columns: 0.95fr 1.05fr; }
  .about-grid.reverse .about-media { order: -1; }
  .about-media img { aspect-ratio: 4 / 5; }
}

/* Location */
.location-grid {
  display: grid;
  gap: clamp(2rem, 1.6rem + 2vw, 3rem);
}
.location-copy p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.location-facts { display: grid; gap: 0.9rem; margin-bottom: 1.75rem; }
.location-facts li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--forest-2);
}
.location-facts svg { width: 1.4rem; height: 1.4rem; color: var(--gold); flex: none; }

.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: var(--card);
}
.map-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-caption {
  padding: 0.9rem 1.25rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.map-caption svg { width: 1.05rem; height: 1.05rem; color: var(--gold-2); flex: none; }

@media (min-width: 900px) {
  .location-grid { grid-template-columns: 0.85fr 1.15fr; align-items: center; }
}

/* Floor plans */
.plans-tabs-wrap { display: flex; justify-content: center; }

.plans-tabs {
  display: inline-flex;
  padding: 0.3rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.25rem;
  gap: 0.25rem;
}
.plans-tab {
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.plans-tab[aria-selected="true"] {
  background: var(--forest);
  color: #fff;
}

.plans-stage {
  display: grid;
  gap: clamp(1.75rem, 1.4rem + 1.6vw, 3rem);
  align-items: center;
}
.plans-figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.plans-panel { display: none; }
.plans-panel.is-active { display: block; }
.plans-image-btn {
  position: relative;
  display: block;
  width: 100%;
}
.plans-image-btn img {
  width: 100%;
  max-height: 34rem;
  object-fit: contain;
  background: #fff;
  padding: 1.5rem;
}
.plans-zoom-hint {
  position: absolute;
  right: 1rem; bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--forest);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  opacity: 0.92;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.plans-zoom-hint svg { width: 1rem; height: 1rem; }
.plans-image-btn:hover .plans-zoom-hint { background: var(--gold-2); transform: translateY(-2px); }

.plans-info h3 { margin-bottom: 0.75rem; }
.plans-info p { color: var(--ink-soft); margin-bottom: 1.25rem; }
.plans-specs { display: grid; gap: 0.75rem; }
.plans-specs li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.plans-specs li span:first-child { color: var(--ink-faint); }
.plans-specs li span:last-child { font-weight: 700; color: var(--forest-2); }

@media (min-width: 900px) {
  .plans-stage { grid-template-columns: 1.2fr 0.8fr; }
}

/* Gallery promo banner */
.promo-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}
.promo-banner-media {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: -2;
}
.promo-banner-media img { width: 100%; height: 100%; object-fit: cover; }
.promo-banner-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(22, 36, 27, 0.94) 0%, rgba(22, 36, 27, 0.82) 45%, rgba(22, 36, 27, 0.55) 100%);
  z-index: -1;
}
.promo-banner-body {
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  max-width: 34rem;
}
.promo-banner h2 { color: #fff; }
.promo-banner p { color: rgba(255, 255, 255, 0.85); margin-bottom: 1.75rem; }

/* Info / contact cards */
.info-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
a.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-tint);
}
.info-card-icon {
  width: 3rem; height: 3rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--forest-tint);
  color: var(--forest);
}
.info-card-icon svg { width: 1.5rem; height: 1.5rem; }
.info-card-icon + span {
  min-width: 0;
}
.info-card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}
.info-card-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--forest-2);
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cta-panel {
  border-radius: var(--radius-lg);
  padding: clamp(2.25rem, 1.8rem + 2.5vw, 3.5rem);
  background: linear-gradient(155deg, var(--forest) 0%, var(--forest-2) 100%);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
}
.cta-panel h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-panel p { color: rgba(255, 255, 255, 0.82); max-width: 28rem; }
.cta-panel-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Footer */
.site-footer {
  background: var(--forest-2);
  color: rgba(247, 241, 225, 0.78);
  padding-block: clamp(3rem, 2.5rem + 2vw, 4.5rem) 1.75rem;
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(247, 241, 225, 0.14);
}
.footer-brand .brand-mark { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: rgba(247, 241, 225, 0.6); }
.footer-brand p { margin-top: 1rem; max-width: 22rem; font-size: 0.92rem; }
.footer-heading {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247, 241, 225, 0.55);
  margin-bottom: 1.1rem;
}
.footer-links { display: grid; gap: 0.75rem; }
.footer-links a { transition: color 0.2s var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(247, 241, 225, 0.55);
}

@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.4fr 0.8fr 1fr; }
}

/* [data-reveal] only starts hidden once main.js confirms it can run the
   reveal (adds .reveal-ready to <html>). If JS fails or is blocked,
   content simply stays visible instead of getting stuck at opacity:0. */
[data-reveal] {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ============ Gallery page ============ */
.page-hero {
  padding-block: clamp(6.5rem, 5.5rem + 5vw, 8.5rem) clamp(2.5rem, 2rem + 2vw, 4rem);
  background: linear-gradient(180deg, var(--forest-tint) 0%, var(--paper) 100%);
}
.page-hero .eyebrow { color: var(--gold-2); }
.page-hero h1 { font-size: clamp(2.3rem, 1.9rem + 2vw, 3.4rem); margin-bottom: 0.9rem; }
.page-hero p { max-width: 40rem; color: var(--ink-soft); }

.section-flush-top { padding-top: 0; }
.outro-actions { justify-content: center; }

.gallery-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.6rem, 0.5rem + 0.5vw, 1.1rem);
}
.gallery-item {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-alt);
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20, 28, 20, 0.55) 0%, rgba(20, 28, 20, 0) 38%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.gallery-item-icon {
  position: absolute;
  right: 0.85rem; bottom: 0.85rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--forest-2);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.gallery-item-icon svg { width: 1.15rem; height: 1.15rem; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover::after,
.gallery-item:hover .gallery-item-icon { opacity: 1; transform: translateY(0); }
.gallery-grid .gallery-item:nth-child(3n+1) { grid-column: span 2; }

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid .gallery-item:nth-child(3n+1) { grid-column: span 1; }
  .gallery-grid .gallery-item:nth-child(5n+2) { grid-column: span 2; }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid .gallery-item:nth-child(5n+2) { grid-column: span 1; }
  .gallery-grid .gallery-item:nth-child(8n+1) { grid-column: span 2; grid-row: span 2; }
}

.aerial-grid {
  display: grid;
  gap: clamp(0.75rem, 0.6rem + 0.7vw, 1.25rem);
}
.aerial-grid .gallery-item { aspect-ratio: 16 / 10; }
@media (min-width: 700px) {
  .aerial-grid { grid-template-columns: 1fr 1fr; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 20, 15, 0.92);
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
  position: relative;
  max-width: min(72rem, 92vw);
  max-height: 88vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: pop 0.25s var(--ease);
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.lightbox-counter {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-nav svg, .lightbox-close svg { width: 1.4rem; height: 1.4rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.06); }
@media (max-width: 700px) {
  .lightbox-prev, .lightbox-next { width: 2.5rem; height: 2.5rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; }
}

.showcase-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--forest-2);
  box-shadow: var(--shadow-lg);
  line-height: 0;
}
.showcase-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.gallery-outro { text-align: center; margin-top: clamp(3rem, 2.5rem + 2vw, 5rem); }
.gallery-outro p { color: var(--ink-soft); margin-bottom: 1.5rem; }
