/* ============================================
   HOME PAGE STYLES
   Hero, Philosophy, Featured Work
   ============================================ */

/* Gallery-like spacing for home page sections */
.philosophy.section-padded {
  padding-top: clamp(8rem, 14vw, 14rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

@media (max-width: 767px) {
  .philosophy.section-padded {
    padding-top: clamp(5rem, 10vw, 8rem);
  }
}

.featured-work.section-padded {
  padding-top: clamp(7.5rem, 12.5vw, 12.5rem);
  padding-bottom: calc(clamp(6rem, 10vw, 10rem) + var(--space-6));
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-charcoal);
}

.hero-media {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  z-index: 1;
  transform: translateX(-50%);
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  will-change: transform;
}


.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3);
  max-width: 900px;
  margin: 0 auto;
  /* INTENTIONAL: transform removed from base rule.
     Applied only at min-width: 768px + min-height: 500px
     so it does not fire on portrait or landscape phones.
     Do not add transform back to this base rule. */
  transform: none;
}

.hero-heading {
  /* INTENTIONAL: transform removed from base rule.
     Applied only at min-width: 768px + min-height: 500px.
     Do not add transform back to this base rule. */
  transform: none;
}

/* INTENTIONAL: positions hero content with top edge at ~20%
   from viewport top on portrait mobile. Uses absolute
   positioning rather than translateY so the target position
   is viewport-anchored, not offset from flex center.
   Reset to relative in landscape block below. */
@media (max-width: 767px) {
  .hero-content {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }
}

@media (min-width: 768px) {
  .hero-content {
    padding: var(--space-4);
  }

  .hero-image {
    object-position: center calc(60% + 40px);
  }
}

/* INTENTIONAL: transforms restored only when BOTH conditions
   are met — wide enough for tablet layout AND tall enough
   that the offsets have room to work without clipping.
   min-height: 500px excludes landscape phones which are wide
   but short. Do not remove the min-height condition.
   Do not merge this into the min-width: 768px block above. */
/* Tablet: vertical offsets only — horizontal transform
   would clip heading at narrow tablet widths */
@media (min-width: 768px) and (min-height: 500px) {
  .hero-content {
    transform: translateY(-80px);
  }

  /* INTENTIONAL: no horizontal offset at tablet.
     Heading stays centered at 768px viewport width.
     Horizontal offset restored at min-width: 1024px below.
     Do not add translate(-130px) back to this block. */
  .hero-heading {
    transform: translateY(-170px);
  }
}

/* Desktop: restore full horizontal + vertical offset */
@media (min-width: 1024px) and (min-height: 500px) {
  .hero-heading {
    transform: translate(-130px, -153px);
  }
}

.hero-title {
  font-family: var(--font-primary);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  color: var(--color-gallery-white);
  margin: 20px 0 var(--space-3);
  opacity: 0;
  animation: fadeInUpMobile 3s ease 0.3s forwards;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4); /* Readability over resin */
}

.hero-subtitle {
  font-family: var(--font-secondary);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  line-height: var(--leading-relaxed);
  color: var(--color-text-inverse);
  position: relative;
  /* INTENTIONAL: left and margin offsets removed from base rule.
     Restored only at min-width: 768px + min-height: 500px.
     Do not add left: -130px or large margin back to this rule. */
  left: 0;
  margin: var(--space-2) 0 0;
  opacity: 0;
  animation: fadeInUpMobile 3s ease 1.5s forwards;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  max-width: 90%;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: var(--text-lg);
    max-width: 600px;
  }
}

/* INTENTIONAL: left and margin offsets restored at tablet
   and desktop when both wide and tall enough.
   Do not remove min-height: 500px.
   Do not merge into the min-width: 768px block above. */
@media (min-width: 768px) and (max-width: 1023px) and (min-height: 500px) {
  .hero-subtitle {
    left: -130px;
    margin: calc(var(--space-2) + 165px) 0 0;
  }
}

/* INTENTIONAL: desktop subtitle offset — wider viewport
   gives more room so offset reads correctly at full scale.
   Do not remove or reduce left value at desktop. */
@media (min-width: 1024px) and (min-height: 500px) {
  .hero-subtitle {
    left: -130px;
    margin: calc(var(--space-2) + 165px) 0 0;
  }
}

.hero-tagline {
  font-family: var(--font-secondary);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-brass);
  margin: 0 0 var(--space-2);
  opacity: 0;
  animation: fadeInUpMobile 3s ease 0s forwards;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5); /* Stronger shadow for brass text */
}


/* Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  animation: fadeInUpCentered 3s ease 1.5s forwards;
}

.scroll-text {
  transform: translateY(calc(var(--space-1) / 2));
}

.scroll-icon {
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-text-inverse);
  border-radius: 12px;
  position: relative;
  opacity: 0.7;
}

.scroll-icon::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--color-text-inverse);
  border-radius: 2px;
  animation: scrollDown 3s ease infinite;
}

.chevron-down {
  width: 24px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@keyframes scrollDown {
  0%, 100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  50% {
    opacity: 0.3;
    transform: translate(-50%, 12px);
  }
}

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

@keyframes subtleZoom {
  0% {
    transform: translateY(var(--hero-parallax, 0px)) scale(1);
  }
  100% {
    transform: translateY(var(--hero-parallax, 0px)) scale(1.02);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInUpCentered {
  from {
    opacity: 0;
    transform: translate(-50%, 30px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: rotate(45deg) translateY(0);
  }
  40% {
    transform: rotate(45deg) translateY(8px);
  }
  60% {
    transform: rotate(45deg) translateY(4px);
  }
}

/* Mobile-specific animation - used as base for mobile-first approach */
@keyframes fadeInUpMobile {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Desktop hero enhancements */
@media (min-width: 768px) {
  .hero {
    min-height: 600px;
  }

  .hero-title,
  .hero-subtitle,
  .hero-tagline {
    animation-name: fadeInUp;
  }

  /* INTENTIONAL: -10px subtraction removed at tablet.
     At 768px this resolves to ~44px — appropriate for
     a tablet hero title. Do not revert to the calc
     with -10px subtraction at this breakpoint. */
  .hero-title {
    font-size: clamp(2.125rem, 1.7rem + 2.125vw, 3.825rem);
  }
}

/* ============================================
   PHILOSOPHY SECTION
   ============================================ */
.philosophy {
  background: linear-gradient(
    180deg,
    rgba(247, 246, 243, 0) 0%,
    rgba(247, 246, 243, 1) 150px,
    rgba(247, 246, 243, 1) 100%
  );
}

.philosophy .section-container--narrow {
  max-width: 860px;
}

.philosophy-text {
  color: var(--color-graphite);
  text-align: center;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  /* INTENTIONAL: minimum increased to 1.2rem (~19px) for
     legibility on mobile for older audiences. Maximum
     unchanged — desktop size unaffected.
     Do not revert minimum below 1.2rem. */
  font-size: clamp(1.2rem, 0.82rem + 0.63vw, 1.42rem);
  line-height: var(--leading-relaxed);
  font-weight: var(--weight-light);
}

/* ============================================
   FEATURED WORK SECTION
   ============================================ */
.featured-work {
  position: relative;
  background-color: #F7F6F3;
}

.featured-work::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(18, 18, 18, 0.03) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* More space for featured work title */
.featured-work .section-title {
  margin-bottom: clamp(8rem, 16vw, 16rem);
}

.featured-work .section-container {
  max-width: 1200px;
  padding: 0 2rem;
}

/* Featured work grid - Two piece showcase (mobile-first) */
.featured-work .work-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.featured-work .work-item {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  width: 100%;
  overflow: visible; /* Release global overflow:hidden so drop-shadow renders on all sides */
}

/* Mobile: both centered */
.featured-work .work-item:nth-child(1),
.featured-work .work-item:nth-child(2) {
  align-self: center;
  margin: 0 auto;
}

.featured-work .work-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
  transition: none;
}

.featured-work .work-link:hover {
  transform: none;
}

.featured-work .work-media {
  position: relative;
  display: block;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  padding: 0;
  margin: 0 auto;
  line-height: 0;
  background-color: transparent;
}

.featured-work .work-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  /* Dual-angle drop-shadow following artwork alpha */
  filter:
    drop-shadow(0 8px 28px rgba(0, 0, 0, 0.08))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.06));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.featured-work .work-image--detail {
  display: none;
}

.featured-work .work-item:hover .work-image {
  transform: none;
  filter:
    drop-shadow(0 12px 40px rgba(0, 0, 0, 0.12))
    drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.featured-work .work-info {
  padding: 1.75rem 0;
  text-align: center;
}

.featured-work .work-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.375rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: #2E2E2E;
}

.featured-work .work-meta {
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  color: var(--color-graphite);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.8;
  font-weight: 300;
  margin-top: 0.5rem;
}

/* Restore home-page fade-in-scroll travel distance (global halved for other pages) */
.fade-in-scroll {
  transform: translateY(60px);
}

/* Luxurious rise animation for images */
.featured-work .work-item.fade-in-scroll {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 10.0s cubic-bezier(0.16, 1, 0.3, 1),
              transform 8.0s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-work .work-item.fade-in-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tablet - staggered layout begins */
@media (min-width: 768px) {
  .featured-work .section-container {
    padding: 0 3rem;
  }

  .featured-work .work-grid {
    gap: 8rem;
  }

  .featured-work .work-item {
    max-width: none;
    width: 100%;
  }

  .featured-work .work-media {
    max-width: none;
    margin: 0;
  }

  /* Staggered alignment */
  .featured-work .work-item:nth-child(1) {
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
  }

  .featured-work .work-item:nth-child(2) {
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
  }

  .featured-work .work-item[data-aspect="3-2"],
  .featured-work .work-item[data-aspect="5-4"] {
    max-width: 600px;
  }

  .featured-work .work-item[data-aspect="1-1"] {
    max-width: 550px;
  }

  .featured-work .work-item[data-aspect="2-3"],
  .featured-work .work-item[data-aspect="4-5"] {
    max-width: 500px;
  }

  .featured-work .work-info {
    padding: 2rem 0.5rem;
  }

}

/* Desktop - full luxury spacing */
@media (min-width: 1024px) {
  .featured-work .work-grid {
    gap: 10rem;
  }

  .featured-work .work-item[data-aspect="3-2"],
  .featured-work .work-item[data-aspect="5-4"] {
    max-width: 750px;
  }

  .featured-work .work-item[data-aspect="1-1"] {
    max-width: 650px;
  }

  .featured-work .work-item[data-aspect="2-3"],
  .featured-work .work-item[data-aspect="4-5"] {
    max-width: 550px;
  }
}

/* ============================================
   PROCESS TEASER
   ============================================ */
.process-teaser {
  position: relative;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.process-teaser::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.process-teaser > * {
  position: relative;
  z-index: 1;
}

/* Override aspect ratio to match native 5:4 landscape images */
.process-teaser .split-media {
  aspect-ratio: 5 / 4;
}

.process-teaser .section-title {
  margin-bottom: var(--space-5);
}

.process-teaser .split-content .btn {
  margin-top: var(--space-5);
}

/* ============================================
   GEOTEASER SLIDER — 2-image diagonal reveal
   ============================================ */
.geoteaser-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}
.geoteaser-slider__track { position: absolute; inset: 0; }
.geoteaser-slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.geoteaser-slider__img--1 { z-index: 1; }
.geoteaser-slider__img--2 { z-index: 2; }
.geoteaser-slider__handle {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 10;
  transform: translate(-50%, -50%);
}
/* Diagonal "/" line through the grip */
.geoteaser-slider__handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 150vh;
  background: var(--color-brass);
  transform: translate(-50%, -50%) rotate(30deg);
  pointer-events: none;
}
.geoteaser-slider__grip {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--color-charcoal);
  border: 1px solid var(--color-brass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  transition: background 0.2s ease;
}
.geoteaser-slider__handle:hover .geoteaser-slider__grip,
.geoteaser-slider__handle:focus .geoteaser-slider__grip { background: #1e1e1e; }
.geoteaser-slider__handle:focus { outline: none; }
.geoteaser-slider__handle:focus-visible .geoteaser-slider__grip { box-shadow: 0 0 0 2px var(--color-brass); }
.geoteaser-slider__hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  font-family: var(--font-secondary);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 246, 243, 0.55);
  pointer-events: none;
  transition: opacity 0.6s ease;
  white-space: nowrap;
}

/* Tablet-only: enlarge Geo-viewer window without changing teaser text styles */
@media (min-width: 768px) {
  .process-teaser .split-media {
    transform: scale(1.3);
    transform-origin: right center;
  }
}

/* Desktop reset */
@media (min-width: 1024px) {
  .process-teaser .split-media {
    transform: none;
  }
}

/* ============================================
   LANDSCAPE PHONE PROTECTION
   Fires when viewport is short (≤ 500px tall)
   and in landscape orientation.
   Prevents hero and sections from clipping or
   feeling cramped on a rotated phone.
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: 5rem 3rem;
  }

  .hero-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    padding: var(--space-2) var(--space-3);
  }

  .hero-heading {
    transform: none;
  }

  .hero-subtitle {
    left: 0;
    margin: var(--space-1) 0 0;
  }

  .hero-title {
    font-size: clamp(1.5rem, 5vw, 2.25rem);
    margin: var(--space-1) 0 var(--space-2);
  }

  .hero-tagline {
    margin: 0 0 var(--space-1);
  }

  .hero-scroll-indicator {
    display: none;
  }

  .philosophy.section-padded,
  .featured-work.section-padded {
    padding-top: clamp(3rem, 6vw, 5rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
  }
}


