/* MakeItFriday.com -- cinematic single-page commercial */

:root {
  --black: #050505;
  --white: #f6f4ef;
  --ink-dim: rgba(246, 244, 239, 0.72);
  --accent: #f2c14e; /* warm "Friday" gold, used sparingly */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  overflow-x: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Stage system ---------- */
/* Each "stage" occupies the full viewport and is shown/hidden by JS.
   The Monday->video and video->black transitions are DELIBERATE HARD CUTS:
   no opacity/transition on the .stage--active swap between #chaos-video-stage
   and #payoff-stage. Only the title-card's own entrance, and the payoff
   copy lines within #payoff-stage, use eased transitions. */
.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--black);
  display: none;
}
.stage.stage--active { display: block; }

/* ---------- Stage 1: MONDAY title card ---------- */
#title-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.4rem, 5vh, 2.4rem);
}
.title-card__word {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.75rem, 12vw, 7rem);
  letter-spacing: 0.14em;
  color: var(--white);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1.6s var(--ease-cinematic), transform 1.6s var(--ease-cinematic);
}
#title-card.stage--active .title-card__word {
  opacity: 1;
  transform: translateY(0);
}

/* Small, deliberately understated -- a real click gate (guarantees the
   video's audio track actually plays, see js/main.js), not a prominent
   "watch now" CTA. */
.title-card__play {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  border: 1px solid rgba(246,244,239,0.38);
  border-radius: 999px;
  padding: 0.6rem 1.7rem;
  color: var(--white);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 1.1s var(--ease-cinematic), transform 1.1s var(--ease-cinematic),
    background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.title-card__play.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.title-card__play:hover,
.title-card__play:focus-visible {
  background: rgba(246,244,239,0.08);
  border-color: var(--accent);
  color: var(--accent);
}
.title-card__play-icon {
  font-size: 0.62rem;
}

/* ---------- Stage 2: video ---------- */
#chaos-video-stage { background: var(--black); }
#chaos-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--black);
}

/* "I HATE MONDAYS." rises and dissolves like a thought, timed (via JS)
   to the hands-to-head moment -- real text, not baked into the video. */
.thought-bubble {
  /* Fixed to the viewport, not any one stage -- this is what lets it
     stay visible across the hard cut from video to black (see
     index.html's comment and js/main.js's cutToBlackThenPayoff()). */
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, 0);
  z-index: 10;
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2rem, 7vw, 3.6rem);
  color: var(--white);
  text-shadow: 0 2px 16px rgba(5,5,5,0.85), 0 1px 4px rgba(5,5,5,0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease-cinematic), transform 3s var(--ease-cinematic);
}
.thought-bubble.is-floating {
  opacity: 1;
  transform: translate(-50%, -3.5em);
}
.thought-bubble.is-fading {
  opacity: 0;
  transform: translate(-50%, -6em);
}

.sound-toggle {
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(246,244,239,0.4);
  background: rgba(5,5,5,0.45);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sound-toggle:hover { background: rgba(5,5,5,0.65); }

/* ---------- Stage 3: payoff -- ALL in one hero viewport, no scroll
   required. The Friday scene fades in and takes over the SAME space the
   "Forget Mondays" copy occupied, cross-dissolving in place. */
#payoff-stage {
  overflow-y: auto; /* safety net only, for very short viewports -- not
                        how a normal visitor experiences this section */
}
.payoff-scene {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

.payoff-scene__black {
  position: absolute;
  inset: 0;
  background: var(--black);
  opacity: 1;
  transition: opacity 2.2s var(--ease-cinematic);
  z-index: 2;
}
.payoff-scene__black.is-hidden { opacity: 0; }

.payoff-scene__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.payoff-scene__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5,5,5,0.55) 0%,
    rgba(5,5,5,0.35) 30%,
    rgba(5,5,5,0.75) 62%,
    rgba(5,5,5,0.97) 100%
  );
}

.payoff-scene__content {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem 1.5rem;
}

/* Both phases share the same grid cell -- they overlap in place, and
   which one is visible is purely an opacity/visibility toggle, so the
   Friday scene visually REPLACES the Mondays copy rather than living
   further down the page. */
.payoff-phase {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s var(--ease-cinematic);
}
.payoff-phase.is-active { opacity: 1; visibility: visible; }

.payoff-phase--mondays { gap: clamp(1rem, 4vh, 2rem); }
.payoff-phase--friday { gap: clamp(0.9rem, 3vh, 1.5rem); }

.payoff-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--white);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s var(--ease-cinematic), transform 1.1s var(--ease-cinematic);
}
.payoff-line.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.payoff-line--yours {
  color: var(--accent);
  font-size: clamp(1.6rem, 5.6vw, 3rem);
  /* Guarantees legibility regardless of exactly what's behind it in the
     photo (the gradient scrim alone isn't reliable at this height on
     every viewport) -- a real issue found in live review: this line sat
     partly over the image's bright sky/string-lights area. */
  text-shadow: 0 2px 20px rgba(5,5,5,0.9), 0 1px 4px rgba(5,5,5,0.9);
}
.payoff-line--brand {
  /* Same family/weight as the opening MONDAY title card, bigger than the
     other payoff lines -- this is its own clean beat on black, a mirrored
     bookend to the opening card, not just another line of copy. */
  font-size: clamp(2.4rem, 9vw, 5rem);
  letter-spacing: 0.02em;
}
.payoff-line--bottom {
  font-size: clamp(1.4rem, 4.6vw, 2.2rem);
  letter-spacing: 0.03em;
  color: var(--ink-dim);
}

/* ---------- Offer section ---------- */
.offer {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s var(--ease-cinematic) 0.2s, transform 1.1s var(--ease-cinematic) 0.2s;
}
.offer.is-revealed { opacity: 1; transform: translateY(0); }

.offer__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.3rem, 3.6vw, 1.85rem);
  color: var(--white);
}
.offer__sub {
  margin: 0 0 1.75rem;
  color: var(--ink-dim);
  font-size: clamp(1.02rem, 2.6vw, 1.3rem);
}

.offer-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
}
.offer-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.offer-form label {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
}
.offer-form input,
.offer-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.8rem;
  resize: vertical;
}
.offer-form input:focus,
.offer-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.09);
}
.offer-form__submit {
  margin-top: 0.4rem;
  align-self: center;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.offer-form__submit:hover { background: var(--accent); color: var(--black); }
.offer-form__submit:disabled { opacity: 0.55; cursor: default; }

.offer-form__status {
  min-height: 1.2em;
  margin: 0.2rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.offer-form__status[data-state="success"] { color: #8fd19e; }
.offer-form__status[data-state="error"] { color: #e2897f; }

.offer-form__fallback {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-dim);
}
.offer-form__fallback a { color: var(--ink-dim); text-decoration: underline; }
.offer-form__fallback a:hover { color: var(--white); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .title-card__word,
  .title-card__play,
  .payoff-line,
  .payoff-scene__black,
  .payoff-phase,
  .thought-bubble,
  .offer {
    transition-duration: 0.01ms !important;
  }
}
