/* Hero wordmark — top-right, above photo + gradients */
.hero-wordmark.featured-brand-logo {
  position: absolute;
  top: max(var(--space-lg), env(safe-area-inset-top, 0px));
  right: max(var(--space-lg), env(safe-area-inset-right, 0px));
  z-index: 3;
  max-width: min(46vw, 11.5rem);
}

@media (max-width: 719px) {
  .hero-wordmark.featured-brand-logo {
    top: max(var(--space-md), env(safe-area-inset-top, 0px));
    right: max(var(--space-md), env(safe-area-inset-right, 0px));
    max-width: min(52vw, 10rem);
  }

  .hero-wordmark.featured-brand-logo svg {
    height: clamp(1.75rem, 4.5vw, 2.5rem);
  }
}

/* Hero background photo (full-res src + focal from JS) */
.hero--has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-photo);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--hero-focal-x, center) var(--hero-focal-y, center);
  transform-origin: center center;
  filter: contrast(1.06) saturate(0.93);
  opacity: 0.48;
}

.hero--has-photo::before {
  z-index: 1;
  background: linear-gradient(
      105deg,
      rgba(3, 8, 6, 0.94) 0%,
      rgba(3, 8, 6, 0.52) 45%,
      rgba(3, 8, 6, 0.78) 100%
    ),
    radial-gradient(
      ellipse 80% 50% at 50% 0%,
      rgba(45, 106, 79, 0.22),
      transparent 55%
    );
}

/*
 * Featured — forest atmosphere + photo layer *above* forest wash so the image stays visible.
 */
.section--featured-forest {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section--featured-forest::before {
  content: "";
  position: absolute;
  inset: -25%;
  z-index: 0;
  background:
    linear-gradient(
      185deg,
      var(--forest-canopy-mist) 0%,
      transparent 38%,
      var(--forest-floor-shadow) 100%
    ),
    radial-gradient(
      ellipse 55% 90% at 0% 50%,
      var(--forest-side-depth),
      transparent 55%
    ),
    radial-gradient(
      ellipse 55% 90% at 100% 50%,
      var(--forest-side-depth),
      transparent 55%
    ),
    radial-gradient(
      ellipse 100% 45% at 50% 0%,
      var(--nature-glow-soft),
      transparent 60%
    );
  pointer-events: none;
}

/*
 * Atmosphere photo (self-hosted; see featured-forest-atmosphere.license.txt).
 * Tuned to sit under emerald washes — not a client portfolio frame.
 */
.featured-forest-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-color: #050d0a;
  background-image: url("/assets/images/featured-forest-atmosphere.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 38%;
  transform-origin: center center;
  filter: contrast(1.08) saturate(0.82) brightness(0.88);
  opacity: 0.5;
  transition: opacity var(--dur-slow) var(--ease-fade);
}

.section--featured-forest.section--featured-has-photo .featured-forest-photo {
  opacity: 0.52;
}

.section--featured-forest::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.04;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.4' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.section--featured-forest > .featured-showcase {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: clamp(var(--space-md), 4vw, var(--space-xl));
}

/* Intro row: label, title, deck */
.featured-showcase-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md) var(--space-lg);
  max-width: none;
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.featured-showcase-intro__text .section-label {
  transition: opacity var(--dur-mid) var(--ease-out),
    letter-spacing var(--dur-slow) var(--ease-out);
}

.featured-showcase-intro__text {
  flex: 1 1 min(100%, 38rem);
  min-width: min(100%, 17rem);
}

.featured-showcase-intro__text .section-label,
.featured-showcase-intro__text h2,
.featured-showcase-intro__text p {
  max-width: var(--max-read);
}

.featured-showcase-intro__text h2 {
  margin-top: 0;
  margin-bottom: var(--space-xs);
}

.featured-showcase-intro__text p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.featured-brand-logo {
  flex-shrink: 0;
  max-width: min(46vw, 12rem);
  color: #f2f8f4;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(3, 8, 6, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
}

.featured-brand-logo svg {
  display: block;
  height: clamp(2rem, 5vw, 2.85rem);
  width: auto;
  max-width: 100%;
}

.featured-brand-logo svg text {
  paint-order: stroke fill;
  stroke: rgba(2, 5, 4, 0.88);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.featured-brand-logo svg text.featured-brand-logo__sub {
  opacity: 0.88;
  stroke-width: 2px;
  fill: #c8e8d8;
}

@media (max-width: 719px) {
  .featured-showcase-intro {
    flex-direction: column;
    align-items: flex-start;
  }
}

.section--strip-bleed .featured-showcase__cta {
  padding-left: max(var(--space-lg), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-lg), env(safe-area-inset-right, 0px));
  padding-bottom: var(--space-sm);
}

.featured-home-cta .btn {
  margin-top: var(--space-xs);
}

/*
 * Featured polaroid thumbs — single grid, fluid columns (mobile → desktop).
 * home.css loads after polaroid-scatter.css.
 */
.featured-showcase .featured-showcase__tiles.polaroid-scatter--featured {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(clamp(5.5rem, 14vw, 11rem), 1fr)
  );
  gap: clamp(var(--space-sm), 2.8vw, var(--space-lg));
  justify-content: center;
  justify-items: center;
  align-items: start;
  width: 100%;
  max-width: min(72rem, 100%);
  margin-inline: auto;
  min-height: 0;
  padding-block: var(--space-md);
}

.featured-showcase .featured-showcase__tiles.polaroid-scatter--featured::before {
  border-radius: var(--radius);
}

.featured-showcase .featured-showcase__tiles.polaroid-scatter--featured > .polaroid-scatter__frame {
  position: relative;
  width: 100%;
  max-width: min(11rem, 100%);
  margin: 0;
}

.featured-showcase .featured-showcase__tiles.polaroid-scatter--featured > .polaroid-scatter__skel {
  width: 100%;
  max-width: min(11rem, 100%);
  margin-inline: auto;
}

.featured-showcase .featured-showcase__tiles.polaroid-scatter--featured > .gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes featured-forest-breathe {
    0%,
    100% {
      transform: scale(1.04) translate3d(0, 0.4%, 0);
      opacity: 0.9;
    }
    50% {
      transform: scale(1.1) translate3d(0, -0.6%, 0);
      opacity: 1;
    }
  }

  @keyframes featured-forest-mist {
    0%,
    100% {
      opacity: 0.03;
    }
    50% {
      opacity: 0.065;
    }
  }

  .section--featured-forest::before {
    animation: featured-forest-breathe 11s ease-in-out infinite;
  }

  .section--featured-forest::after {
    animation: featured-forest-mist 15s ease-in-out infinite;
    animation-delay: -4s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section--featured-forest::before {
    animation: none !important;
    inset: 0;
    transform: none;
    opacity: 1;
  }

  .section--featured-forest::after {
    animation: none !important;
    opacity: 0.04;
  }
}

/* Sessions: abstract forest-at-dusk depth (CSS-only; content above pseudos) */
.section--nature {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section--nature::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 85% 55% at 12% 18%,
      var(--nature-glow-deep),
      transparent 52%
    ),
    radial-gradient(
      ellipse 70% 50% at 88% 78%,
      var(--nature-glow-mid),
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 100%,
      var(--nature-glow-soft),
      transparent 45%
    ),
    radial-gradient(
      ellipse 60% 40% at 70% 12%,
      var(--nature-glow-soft),
      transparent 55%
    );
  pointer-events: none;
}

.section--nature::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.045;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.section--nature > .section-head {
  position: relative;
  z-index: 1;
}

.section--nature > .services-grid {
  position: relative;
  z-index: 2;
}

.section--nature .services-grid li {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 48px -24px rgba(45, 106, 79, 0.25);
  border-color: var(--glass-border);
}

.section--nature .services-grid li:hover {
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.45),
    0 0 56px -18px rgba(82, 183, 136, 0.35);
  border-color: rgba(82, 183, 136, 0.4);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes nature-atmosphere-drift {
    from {
      transform: scale(1) translate3d(0, 0, 0);
      opacity: 1;
    }
    to {
      transform: scale(1.04) translate3d(1.5%, -1%, 0);
      opacity: 0.92;
    }
  }

  .section--nature::before {
    animation: nature-atmosphere-drift 32s ease-in-out infinite alternate;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section--nature::before {
    animation: none !important;
    inset: 0;
    transform: none;
    opacity: 1;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.services-grid li {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  background: var(--tile-chrome-soft);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.services-grid li:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.services-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
}
