/* =============================================
   HOME.CSS — Home page
   ============================================= */

/* =============================================
   REVEAL SYSTEM — homepage-only scroll motion
   Shared base: hidden state → .is-in visible state.
   Section-specific stagger lives near each section below.
   ============================================= */
:root {
  --reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --reveal-dur: 900ms;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    transform var(--reveal-dur) var(--reveal-ease);
  will-change: opacity, transform;
}
[data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Image variant: softer, with micro scale settle */
[data-reveal="image"] {
  transform: translateY(18px) scale(1.035);
  transition:
    opacity 1100ms var(--reveal-ease),
    transform 1400ms var(--reveal-ease);
}
[data-reveal="image"].is-in {
  transform: translateY(0) scale(1);
}

/* Reduced motion: no animation, everything visible */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal="image"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .quote-word {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ---- Shared: section text-link ---- */
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 2px;
  text-decoration: none;
  transition: opacity var(--ease);
}
.section-link:hover {
  opacity: 0.65;
}


/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  width: 100%;
  /* Fallback for browsers without dvh/svh support */
  height: 100vh;
  /* svh = smallest viewport height (address bar visible) — prevents the
     bottom-gap on iOS/Android Safari where 100vh overshoots the visible area.
     Using svh rather than dvh keeps the hero from resizing during scroll. */
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  /* Slight outset + scale to hide blur edge bleed */
  inset: -20px;
  background-size: cover;
  background-position: center 45%;
  opacity: 0;
  transition: opacity 1.2s ease;
  filter: blur(2px) brightness(0.72) saturate(1.05);
  transform: scale(1.02);
  will-change: opacity;
}

.hero-slide.is-active {
  opacity: 1;
}

/* Layer 1 — very subtle blur confined to nav zone (top) and text zone (bottom).
   Gradient mask keeps the centre of the image fully crisp. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.65) 7%,
    transparent 20%,
    transparent 58%,
    rgba(0, 0, 0, 0.45) 72%,
    rgba(0, 0, 0, 0.9) 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.65) 7%,
    transparent 20%,
    transparent 58%,
    rgba(0, 0, 0, 0.45) 72%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

/* Layer 2 — gradient overlay for actual tonal darkening.
   Top: nav readability. Middle: clear window, image fully visible. Bottom: text readability. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.00) 25%,
    rgba(0, 0, 0, 0.00) 42%,
    rgba(0, 0, 0, 0.45) 62%,
    rgba(0, 0, 0, 0.72) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-width);
  padding-inline: clamp(var(--space-6), 5vw, var(--space-16));
  padding-bottom: clamp(var(--space-20), 10vw, var(--space-32));
  text-align: left;
  color: #fff;
  animation: heroFade 1.6s ease forwards;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 5.25rem);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.hero-title-em {
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.015em;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-12);
}

/* Minimal text-link CTA — more editorial than a bordered button */
.hero-cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 3px;
  transition: color var(--ease), border-color var(--ease);
}
.hero-cta:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
}

/* Scroll indicator — static, no animation */
.hero-scroll {
  position: absolute;
  bottom: var(--space-10, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.hero-scroll-label {
  font-family: var(--font-body);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .hero {
    min-height: 0;
  }

  .hero-slide {
    background-position: center 40%;
    filter: blur(1.5px) brightness(0.62) saturate(1.05);
  }

  /* Stronger bottom gradient on mobile for text legibility */
  .hero::after {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.40) 0%,
      rgba(0, 0, 0, 0.05) 22%,
      rgba(0, 0, 0, 0.05) 38%,
      rgba(0, 0, 0, 0.55) 65%,
      rgba(0, 0, 0, 0.85) 100%
    );
  }

  .hero-content {
    padding-inline: var(--space-6);
    padding-bottom: clamp(var(--space-12), 14vw, var(--space-20));
  }

  .hero-title {
    font-size: clamp(2.5rem, 11vw, 3.75rem);
    line-height: 1.05;
    margin-bottom: var(--space-4);
  }

  .hero-sub {
    margin-bottom: var(--space-8);
  }

  .hero-scroll { display: none; }
}


/* =============================================
   ABOUT INTRO
   ============================================= */
.about-intro {
  padding-block: var(--section-pad);
}

.about-intro-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-24));
  align-items: center;
}

.about-intro-text {
  padding-right: var(--space-8);
}

/* Larger h2 for this specific section */
.about-intro-text h2 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: var(--space-6);
}

.about-intro-text p {
  margin-bottom: var(--space-10, 2.5rem);
  line-height: 1.85;
  max-width: 42ch;
}

/* Thin rule below eyebrow */
.about-intro-text .eyebrow {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-accent-light);
  display: inline-block;
}

.about-intro-image {
  overflow: hidden;
  background-color: var(--color-surface);
  aspect-ratio: 3 / 4;
  margin-top: calc(-1 * var(--space-16));
  margin-bottom: calc(-1 * var(--space-16));
}

.about-intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .about-intro-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-intro-image {
    aspect-ratio: 1 / 1;
    order: -1;
    margin: 0;
  }

  .about-intro-text {
    padding-right: 0;
  }

  .about-intro-text p {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hero-services {
    letter-spacing: 0.12em;
  }

  .services-preview-header {
    margin-bottom: var(--space-8);
  }

  .cta-band {
    padding-block: clamp(3rem, 8vw, 5rem);
  }
}


/* =============================================
   SELECTED WORK
   ============================================= */
.selected-work {
  padding-block: var(--section-pad);
  background-color: var(--color-surface);
}

.work-header {
  margin-bottom: var(--space-8);
}

/* 3-column equal gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 1vw, 12px);
}

.gallery-item {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--color-ground);
  border: none;
  padding: 0;
  cursor: zoom-in;
  display: block;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms ease, opacity 400ms ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: 0.88;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
}

.lightbox-img {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 2;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.25rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}

.lightbox-close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

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

@media (max-width: 480px) {
  .lightbox-close {
    top: var(--space-4);
    right: var(--space-4);
  }
}


/* =============================================
   SERVICES PREVIEW — numbered editorial list
   ============================================= */
.services-preview {
  padding-block: var(--section-pad);
}

.services-preview-header {
  margin-bottom: var(--space-12);
  max-width: 52ch;
}

.services-preview-header .eyebrow {
  margin-bottom: var(--space-4);
}

.services-preview-header h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.1;
}

/* Numbered editorial list */
.services-editorial {
  border-top: 1px solid rgba(42, 36, 32, 0.1);
}

.service-entry {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-bottom: 1px solid rgba(42, 36, 32, 0.1);
  align-items: start;
  text-decoration: none;
  color: inherit;
  transition: none;
}

.service-entry-num {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-accent-light);
  padding-top: 0.35em; /* optical alignment with h3 */
  user-select: none;
}

.service-entry-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--color-ink);
  margin-bottom: var(--space-3);
  transition: color var(--ease);
}

.service-entry:hover .service-entry-content h3 {
  color: var(--color-accent);
}

.service-entry-content p {
  font-size: var(--text-sm);
  line-height: 1.75;
  max-width: 56ch;
}

.service-entry-arrow {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-ink-muted);
  align-self: center;
  transition: color var(--ease), transform var(--ease);
  user-select: none;
  padding-top: 0.1em;
}

.service-entry:hover .service-entry-arrow {
  color: var(--color-accent);
  transform: translateX(6px);
}

.services-preview-cta {
  margin-top: var(--space-12);
}

@media (max-width: 600px) {
  .service-entry {
    grid-template-columns: 2.5rem 1fr;
    gap: var(--space-4) var(--space-6);
  }

  .service-entry-arrow {
    display: none;
  }
}


/* =============================================
   TESTIMONIALS
   ============================================= */
.testimonials-preview {
  padding-block: var(--section-pad);
  background-color: var(--color-surface);
}

.testimonials-preview .eyebrow {
  margin-bottom: var(--space-10, 2.5rem);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--space-8), 5vw, var(--space-12));
}

.testimonial {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(42, 36, 32, 0.12);
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-ink);
  margin-bottom: var(--space-6);
  max-width: none;
}

.testimonial-attr {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-style: normal;
}

.testimonial-name {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
  letter-spacing: 0.04em;
}

.testimonial-detail {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

@media (max-width: 600px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}


/* =============================================
   SELECTED OFFERINGS — image-anchored editorial
   ============================================= */
.offerings {
  padding-block: var(--section-pad);
  overflow: hidden;
}

.offerings-inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(var(--space-10), 7vw, var(--space-20));
  align-items: start;
}

/* LEFT: image anchor — extends beyond section padding for depth */
.offerings-image {
  overflow: hidden;
  background-color: var(--color-surface);
  aspect-ratio: 3 / 4;
  margin-top: calc(-1 * var(--space-16));
  margin-bottom: calc(-1 * var(--space-16));
}

.offerings-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* RIGHT: content column */
.offerings-content {
  display: flex;
  flex-direction: column;
}

.offerings-head {
  margin-bottom: var(--space-10);
}

.offerings-head .eyebrow {
  margin-bottom: var(--space-5, 1.25rem);
}

.offerings-head h2 {
  font-size: clamp(1.875rem, 3.25vw, 2.75rem);
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.offerings-head p {
  font-size: var(--text-sm);
  line-height: 1.8;
  max-width: 44ch;
  margin-bottom: 0;
  color: var(--color-ink-muted);
}

.offerings-list {
  border-top: 1px solid rgba(42, 36, 32, 0.14);
}

.offering-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-bottom: 1px solid rgba(42, 36, 32, 0.14);
}

.offering-name {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-weight: 400;
  color: var(--color-ink);
  margin-bottom: var(--space-2);
  line-height: 1.15;
}

.offering-details {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  line-height: 1;
  margin-bottom: 0;
}

.offering-price {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 300;
  font-style: italic;
  color: var(--color-accent);
  white-space: nowrap;
}

.offerings-cta-wrap {
  padding-top: var(--space-8);
}

@media (max-width: 900px) {
  .offerings-inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .offerings-image {
    aspect-ratio: 4 / 5;
    margin-top: 0;
    margin-bottom: 0;
    max-width: 560px;
  }

  .offerings-head p {
    max-width: 52ch;
  }
}

@media (max-width: 480px) {
  .offering-row {
    gap: var(--space-4);
    padding-block: var(--space-6);
  }
}


/* =============================================
   CTA BAND — dark finish
   ============================================= */
.cta-band {
  padding-block: clamp(5rem, 10vw, 10rem);
  background-color: var(--color-ink);
  text-align: center;
}

.cta-band .eyebrow {
  color: var(--color-accent-light);
}

.cta-band h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-6);
  line-height: 1.05;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.45);
  margin-inline: auto;
  margin-bottom: var(--space-8);
  text-align: center;
  max-width: 44ch;
}


/* =============================================
   REVEAL SEQUENCING — per section
   ============================================= */

/* ---- About intro: eyebrow → h2 → p → link, image settles with scale ---- */
.about-intro-text [data-reveal] { transition-delay: 0ms; }
.about-intro-text [data-reveal]:nth-child(1) { transition-delay: 80ms; }
.about-intro-text [data-reveal]:nth-child(2) { transition-delay: 180ms; }
.about-intro-text [data-reveal]:nth-child(3) { transition-delay: 280ms; }
.about-intro-text [data-reveal]:nth-child(4) { transition-delay: 380ms; }

/* ---- Selected Work gallery: cascading stagger across tiles ---- */
.gallery-grid .gallery-item { transition-delay: 0ms; }
.gallery-grid .gallery-item:nth-child(1) { transition-delay: 0ms; }
.gallery-grid .gallery-item:nth-child(2) { transition-delay: 90ms; }
.gallery-grid .gallery-item:nth-child(3) { transition-delay: 180ms; }
.gallery-grid .gallery-item:nth-child(4) { transition-delay: 260ms; }
.gallery-grid .gallery-item:nth-child(5) { transition-delay: 340ms; }
.gallery-grid .gallery-item:nth-child(6) { transition-delay: 420ms; }

/* ---- Services editorial list: numbered rows lift in ---- */
.services-editorial .service-entry:nth-child(1) { transition-delay: 0ms; }
.services-editorial .service-entry:nth-child(2) { transition-delay: 110ms; }
.services-editorial .service-entry:nth-child(3) { transition-delay: 220ms; }

/* ---- Testimonials: per-card start offset + word-by-word quote bloom ---- */
.testimonial[data-reveal]:nth-child(1) { transition-delay: 0ms; }
.testimonial[data-reveal]:nth-child(2) { transition-delay: 180ms; }
.testimonial[data-reveal]:nth-child(3) { transition-delay: 360ms; }

.testimonial-quote .quote-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 700ms var(--reveal-ease),
    transform 700ms var(--reveal-ease);
  transition-delay: calc(var(--i, 0) * 35ms + 120ms);
  will-change: opacity, transform;
}

.testimonial.is-in .quote-word {
  opacity: 1;
  transform: translateY(0);
}

/* Attribution settles in after the quote finishes */
.testimonial .testimonial-attr {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 700ms var(--reveal-ease),
    transform 700ms var(--reveal-ease);
}

.testimonial.is-in .testimonial-attr {
  opacity: 1;
  transform: translateY(0);
  /* quote avg ~20 words × 35ms + 120ms start + 300ms buffer */
  transition-delay: 900ms;
}

@media (prefers-reduced-motion: reduce) {
  .testimonial .testimonial-attr {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Offerings: header stagger + row cascade ---- */
.offerings-head [data-reveal]:nth-child(1) { transition-delay: 0ms; }
.offerings-head [data-reveal]:nth-child(2) { transition-delay: 110ms; }
.offerings-head [data-reveal]:nth-child(3) { transition-delay: 220ms; }

.offerings-list .offering-row:nth-child(1) { transition-delay: 0ms; }
.offerings-list .offering-row:nth-child(2) { transition-delay: 80ms; }
.offerings-list .offering-row:nth-child(3) { transition-delay: 160ms; }
.offerings-list .offering-row:nth-child(4) { transition-delay: 240ms; }

.offerings-cta-wrap[data-reveal] { transition-delay: 360ms; }

