/* EC Hustles | pages.css — Page-specific overrides */

/* ═══════════════════════════════════════════════════════════════════
   HOME — HERO
   ═══════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* ── Scroll Wrapper (gives scroll distance for the sticky hero) ───── */

.hero-scroll-wrapper {
  height: 280vh; /* 100vh visible + 180vh scroll space */
  position: relative;
}

/* ── Video Hero — sticky while user scrolls through wrapper ────────── */

.hero--video {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: unset; /* override base .hero min-height */
  background: var(--black);
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Base overlay — starts lighter, deepens as text reveals */
.hero__video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.25) 0%,
    rgba(10, 10, 10, 0.15) 40%,
    rgba(10, 10, 10, 0.55) 100%
  );
  transition: background 0.6s ease;
}

/* Overlay deepens when text is visible so text stays legible */
.hero__video-overlay.text-active {
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(10, 10, 10, 0.45) 50%,
    rgba(10, 10, 10, 0.80) 100%
  );
}

/* ── Hero Content — hidden until scroll threshold ─────────────────── */

.hero--video .hero__content {
  position: relative;
  z-index: 1;
}

/* All direct children start invisible — animation: none kills any auto-play */
.hero--video .hero__content .hero__eyebrow,
.hero--video .hero__content .hero__h1,
.hero--video .hero__content .hero__subhead,
.hero--video .hero__content .hero__ctas {
  opacity: 0;
  transform: translateY(28px);
  animation: none;
  transition:
    opacity  0.9s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger each element when parent gets .text-revealed */
.hero--video .hero__content.text-revealed .hero__eyebrow {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}
.hero--video .hero__content.text-revealed .hero__h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
}
.hero--video .hero__content.text-revealed .hero__subhead {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}
.hero--video .hero__content.text-revealed .hero__ctas {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.45s;
}

/* Scroll chevron fades out as text fades in */
.scroll-chevron {
  transition: opacity 0.5s ease;
}

/* ── Reduced Motion — show text immediately, no sticky scroll ──────── */

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-wrapper { height: auto; }

  .hero--video {
    position: relative;
    height: 100vh;
    min-height: 100vh;
  }

  .hero__video { display: none; }
  .hero--video { background: var(--charcoal); }

  .hero--video .hero__content .hero__eyebrow,
  .hero--video .hero__content .hero__h1,
  .hero--video .hero__content .hero__subhead,
  .hero--video .hero__content .hero__ctas {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

/* Subtle radial spotlight */
.hero__bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(var(--gold-rgb), 0.04) 0%, transparent 70%);
}

.hero__bg::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 50%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(var(--gold-rgb), 0.03) 0%, transparent 70%);
}

/* Noise texture overlay */
.hero__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-4);
}

@media (min-width: 768px) {
  .hero__content { padding: var(--sp-8) var(--sp-6); }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-4);
}

.hero__eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.hero__h1 {
  font-size: var(--fs-display);
  line-height: 0.92;
  max-width: 880px;
  margin-bottom: var(--sp-5);
}

.hero__h1 .accent { color: var(--gold); }

.hero__subhead {
  font-size: clamp(0.875rem, 1.5vw, 1.1rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: var(--sp-6);
}

.hero__ctas {
  /* reveal handled by scroll — no auto-animation */
}

/* ═══════════════════════════════════════════════════════════════════
   CASE STUDY PAGE
   ═══════════════════════════════════════════════════════════════════ */

.case-hero {
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--sp-8);
  padding-top: calc(var(--nav-height) + var(--sp-8));
  position: relative;
  overflow: hidden;
}

.case-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.25) saturate(0.5);
}

.case-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 30%, rgba(10, 10, 10, 0.4) 100%);
}

.case-hero .container { position: relative; z-index: 1; }

.case-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.case-hero__tag {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.case-hero__h1 {
  font-size: var(--fs-h1);
  line-height: 0.95;
  margin-bottom: var(--sp-4);
}

.case-hero__client {
  font-size: var(--fs-small);
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.case-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-6) 0;
  border-top: 1px solid rgba(var(--gold-rgb), 0.15);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.15);
  margin-bottom: var(--sp-7);
}

@media (min-width: 768px) {
  .case-details { grid-template-columns: repeat(4, 1fr); }
}

.case-detail__label {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-1);
}

.case-detail__value {
  font-size: var(--fs-small);
  color: var(--text-primary);
  font-weight: 600;
}

.case-body h2 {
  font-size: var(--fs-h3);
  margin: var(--sp-7) 0 var(--sp-4);
  color: var(--gold);
}

.case-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}

.case-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
  background: var(--charcoal);
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  margin: var(--sp-7) 0;
}

@media (min-width: 768px) {
  .case-results { grid-template-columns: repeat(4, 1fr); }
}

.case-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin: var(--sp-7) 0;
}

@media (min-width: 640px) {
  .case-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .case-gallery { grid-template-columns: repeat(3, 1fr); }
}

.case-gallery__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  transition: transform var(--transition);
}

.case-gallery__img:hover { transform: scale(1.02); }

.case-quote {
  border-left: 3px solid var(--gold);
  padding: var(--sp-5) var(--sp-6);
  background: var(--charcoal);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--sp-7) 0;
}

.case-quote__text {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: var(--sp-3);
}

.case-quote__author {
  font-size: var(--fs-small);
  color: var(--gold);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════════════════════════ */

.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-6);
  background: var(--charcoal);
}

.page-404__number {
  font-family: var(--font-display);
  font-size: clamp(8rem, 20vw, 16rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(var(--gold-rgb), 0.25);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-4);
}

.page-404__heading {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-3);
}

.page-404__sub {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-bottom: var(--sp-7);
  max-width: 400px;
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════════════
   ABOUT PHILOSOPHY BAND
   ═══════════════════════════════════════════════════════════════════ */

.philosophy-band {
  background: var(--black);
  padding: var(--sp-10) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.philosophy-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(var(--gold-rgb), 0.04) 0%, transparent 70%);
}

.philosophy-band__quote {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.03em;
  max-width: 900px;
  margin: 0 auto var(--sp-5);
  line-height: 1.15;
  color: var(--text-primary);
}

.philosophy-band__attribution {
  font-size: var(--fs-small);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════
   NEXT PROJECT NAVIGATION
   ═══════════════════════════════════════════════════════════════════ */

.next-project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6) 0;
  border-top: 1px solid rgba(var(--gold-rgb), 0.15);
}

.next-project__label {
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}

.next-project__title {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  letter-spacing: 0.05em;
  color: var(--text-primary);
  transition: color var(--transition);
}

.next-project a:hover .next-project__title { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════════
   FOUNDER SECTION
   ═══════════════════════════════════════════════════════════════════ */

.founder-portrait-wrapper {
  position: relative;
}

.founder-portrait-wrapper::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(var(--gold-rgb), 0.2);
  border-radius: var(--radius-md);
  z-index: 0;
  transition: transform var(--transition);
}

.founder-portrait-wrapper:hover::before {
  transform: translate(-4px, -4px);
}

.founder-portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.founder-portrait-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 3/4;
  background: var(--charcoal-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--sp-4);
}

.founder-pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding: var(--sp-3) var(--sp-5);
  margin: var(--sp-6) 0;
  line-height: 1.2;
}
