/* ═══════════════════════════════════════
   HOW WE WORK — wearetilt.com
   Immersive process page
═══════════════════════════════════════ */

/* ─── HERO ─── */
.hww-hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--ink);
  overflow: hidden;
  padding: 2rem;
}

/* Background video */
.hww-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dark overlay for text readability */
.hww-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  z-index: 1;
  pointer-events: none;
}

.hww-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hww-hero-eyebrow {
  font-family: var(--body);
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-spacing);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 0.3s forwards;
}

.hww-hero-eyebrow::before,
.hww-hero-eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.hww-hero-title {
  font-family: var(--display);
  font-size: var(--h1);
  font-weight: 400;
  line-height: 1.05;
  color: var(--paper);
  margin: 0;
}

.hww-hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hww-title-line {
  display: block;
  overflow: hidden;
}

.hww-title-line:nth-child(1) {
  opacity: 0;
  animation: hwwTitleReveal 1s var(--ease-out-expo) 0.5s forwards;
}
.hww-title-line:nth-child(2) {
  opacity: 0;
  animation: hwwTitleReveal 1s var(--ease-out-expo) 0.7s forwards;
}

.hww-hero-sub {
  font-family: var(--body);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-top: 2rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out-expo) 1.1s forwards;
}

.hww-hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  opacity: 0;
  animation: hwwScrollFadeUp 0.8s var(--ease-out-expo) 1.4s forwards;
}

@keyframes hwwScrollFadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hww-hero-scroll > span:first-child {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper);
  transition: color 0.3s ease;
}

.hww-hero-scroll:hover > span:first-child {
  color: var(--accent);
}

.hww-hero-scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(247, 245, 242, 0.2);
  border-radius: 50%;
  animation: hwwCtaBounce 2s ease-in-out infinite;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.hww-hero-scroll-arrow svg {
  width: 20px;
  height: 20px;
  color: var(--paper);
}

.hww-hero-scroll:hover .hww-hero-scroll-arrow {
  border-color: var(--accent);
  background: rgba(255, 76, 116, 0.1);
}

@keyframes hwwCtaBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes hwwTitleReveal {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ─── BELIEF — PINNED WORD REVEAL ─── */
.hww-belief {
  position: relative;
  background: var(--ink);
  /* Height set by JS to create scroll distance for the pinned reveal */
}

.hww-belief-pin {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hww-belief-text {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  color: var(--paper);
  text-align: center;
  max-width: 1000px;
  margin: 0;
}

.hww-belief-text .word {
  display: inline-block;
  margin-right: 0.25em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(247,245,242,0.45);
  transition: color 0.35s ease, -webkit-text-stroke-color 0.35s ease;
}

.hww-belief-text .word.active {
  color: var(--paper);
  -webkit-text-stroke-color: transparent;
}

.hww-belief-text .word--accent {
  -webkit-text-stroke-color: rgba(255,76,116,0.5);
}

.hww-belief-text .word--accent.active {
  color: var(--accent);
  -webkit-text-stroke-color: transparent;
}


/* ─── PHASE SECTIONS (showreel-style) ─── */
.hww-phase {
  position: relative;
  background: var(--deep);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* ── Video side ── */
.hww-phase-visual {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.hww-phase-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hww-phase-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

/* Vignette: fade to content side (right) */
.hww-phase-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--deep) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Vignette: fade to bottom */
.hww-phase-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--deep) 0%, transparent 30%);
  z-index: 1;
  pointer-events: none;
}

/* ── Create: mirrored layout ── */
.hww-phase--create .hww-phase-visual { order: 2; }
.hww-phase--create .hww-phase-content { order: 1; }

/* Flip vignette direction for Create (fade LEFT toward content) */
.hww-phase--create .hww-phase-visual::after {
  background: linear-gradient(to left, transparent 60%, var(--deep) 100%);
}

/* ── Content side ── */
.hww-phase-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem var(--space-xl) 4rem 4rem;
}

.hww-phase-eyebrow {
  font-family: var(--body);
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-spacing);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.hww-phase-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hww-phase-heading {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--paper);
  margin: 0 0 1.5rem;
}

.hww-phase-heading em {
  font-style: italic;
  color: var(--accent);
}

.hww-phase-brief {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(245, 240, 232, 0.72);
  max-width: 420px;
  margin: 0 0 2.5rem;
}

/* ── Tab navigation ── */
.hww-steps-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(247, 245, 242, 0.1);
}

.hww-steps-tabs button {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(247, 245, 242, 0.4);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}

.hww-steps-tabs button:hover {
  color: rgba(247, 245, 242, 0.7);
}

.hww-steps-tabs button[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Tab panel ── */
.hww-steps-panel {
  min-height: 120px;
  transition: opacity 0.3s ease;
}

.hww-steps-panel.fading {
  opacity: 0;
}

.hww-steps-tagline {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  color: var(--paper);
  line-height: 1.4;
  margin: 0 0 1rem;
}

.hww-steps-tagline em {
  font-style: italic;
}

.hww-steps-desc {
  font-family: var(--body);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 300;
  line-height: 1.8;
  color: rgba(245, 240, 232, 0.55);
  max-width: 420px;
  margin: 0;
}


/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hww-phase-content {
    padding: var(--space-lg);
  }
}

@media (max-width: 900px) {
  .hww-phase {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  /* Always video on top, content below */
  .hww-phase--create .hww-phase-visual { order: 0; }
  .hww-phase--create .hww-phase-content { order: 0; }

  .hww-phase-visual {
    min-height: 50vh;
  }

  /* Switch vignette to bottom fade for stacked layout */
  .hww-phase-visual::after {
    background: linear-gradient(to bottom, transparent 60%, var(--deep) 100%);
  }

  .hww-phase--create .hww-phase-visual::after {
    background: linear-gradient(to bottom, transparent 60%, var(--deep) 100%);
  }

  .hww-phase-content {
    padding: var(--space-lg) 2rem 4rem;
  }
}

@media (max-width: 600px) {
  .hww-hero {
    padding: 1.5rem;
  }

  .hww-hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hww-belief-text {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  .hww-phase-visual {
    min-height: 40vh;
  }

  .hww-phase-content {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .hww-steps-tabs button {
    padding: 0.7rem 1rem;
    font-size: 0.75rem;
  }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .hww-hero-eyebrow,
  .hww-title-line,
  .hww-hero-sub,
  .hww-hero-scroll {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hww-belief-text .word {
    opacity: 1 !important;
  }
}
