/* ============================================================
   home.css — home page layout (redesign · P4)
   Art-directed home: a photographic hero under a soft dreamy veil,
   squircle service cards, the platform. band, the featured-projects
   carousel, and the contact + promo forms. Layout-only and token-only
   — surfaces, type, motion all come from tokens/components. Loaded LAST
   so it wins over feature CSS. Motion gated by prefers-reduced-motion.
   ============================================================ */

/* .hidden + the AJAX form success/error panels now live in the shared
   components/form-state.css (loaded globally), so home + service pages reuse
   them. The home-specific contact/promo layout stays below. */

/* Centered section header: mono kicker + display title. */
.section-head {
  max-width: 52rem;
  margin: 0 auto var(--space-10);
  text-align: center;
}
.section-head .dd-kicker {
  margin-bottom: var(--space-4);
}
.section-head .section-title {
  margin-bottom: 0;
}

/* First-act rhythm — generous vertical space so hero → services →
   platform. read as distinct, calm moments rather than stacked bands.
   (Pairs with the platform band's edge-fading glow: no hard seams.) */
#services {
  padding-top: var(--space-13);
  padding-bottom: var(--space-13);
}

/* ============================================================
   HERO — full-bleed studio photo + soft white veil + glow + grain.
   Content is lower-anchored into the bright zone so the solid-ink
   headline and mono kicker stay legible while the photo breathes.
   ============================================================ */
.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  padding: calc(var(--navbar-h) + var(--space-8)) var(--container-pad) var(--space-10);
}

.home-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  z-index: -3;
}

/* The dreamy veil for centered content: a soft coral haze + a centered
   light bloom that keeps the ink headline legible, over a gentle bottom
   grounding to the page colour (so it still blends when the hero stacks
   above services in the small-screen fallback). The photo breathes at the
   top + edges rather than being washed flat. */
.home-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    var(--glow-coral),
    radial-gradient(86% 60% at 50% 50%,
      color-mix(in srgb, var(--paper-2) 64%, transparent) 0%,
      color-mix(in srgb, var(--paper-2) 24%, transparent) 50%,
      transparent 76%),
    linear-gradient(180deg,
      transparent 0%,
      color-mix(in srgb, var(--paper-2) 12%, transparent) 34%,
      color-mix(in srgb, var(--paper-2) 42%, transparent) 74%,
      var(--bg) 100%);
}

/* Fine grain ties the softness together (static — reduced-motion safe). */
.home-hero__grain {
  position: absolute;
  z-index: -1;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  max-width: 56rem;
}

/* Darker than --text-muted so the kicker clears AA over the photo. */
.home-hero__kicker {
  color: var(--text-soft);
}

.home-hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  max-width: 18ch;
}

.home-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* Scroll cue — a coral dot scrubbing down a fading line. */
.home-hero__scroll {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: grid;
  place-items: center;
  padding: var(--space-2);
}
.home-hero__scroll:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.home-hero__scroll-track {
  position: relative;
  display: block;
  width: 2px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.home-hero__scroll-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: var(--radius-pill);
  background: var(--accent-strong);
  animation: heroScroll 1.9s var(--ease-soft) infinite;
}
@keyframes heroScroll {
  0%   { transform: translateY(-2px); opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(50px); opacity: 0; }
}

/* ============================================================
   PINNED CROSS-FADE STAGE — home-specific slide compaction only.
   The generic stage rules (the pin, absolute slides, padding trim, the
   platform-slide band) were promoted to features/home_stage/home_stage.css
   so the service pages reuse them; home.html loads that file alongside this
   one. Below: only the home page's own per-slide shrink-to-fit, scoped to
   its slide --modifiers, under the same activation media query.
   ============================================================ */
@media (min-width: 1100px) and (min-height: 760px) {
  /* services — cards sized to content */
  .home-stage.is-active .home-slide--services .service-card {
    min-height: 0;
  }

  /* featured — flatten the carousel's decorative offsets + shrink so the
     pane (artwork + player) + the work link fit one screen. */
  .home-stage.is-active .home-slide--featured .news-carousel-container {
    margin-top: 0;
  }
  .home-stage.is-active .home-slide--featured .news-carousel-pane {
    margin-top: 0;
    margin-bottom: 0;
    padding: var(--space-5);
  }
  .home-stage.is-active .home-slide--featured .news-carousel-pane-info-img {
    flex-basis: min(36vh, 260px);
    max-width: 260px;
  }
  .home-stage.is-active .home-slide--featured .news-carousel-pane img {
    margin: 0 auto;
  }
  .home-stage.is-active .home-slide--featured .featured-actions {
    margin-top: var(--space-6);
  }
}

/* ============================================================
   THE SPACE — photo + copy split (a slide; also fine when stacked).
   ============================================================ */
.space-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
.space-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.space-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.space-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  color: var(--text);
  margin-top: var(--space-3);
}
.space-lead {
  margin: var(--space-4) 0 var(--space-7);
  font-size: var(--fs-lead);
  line-height: var(--lh-body);
  color: var(--text-muted);
}

/* Featured: the "see all work." action under the carousel. */
.featured-actions {
  margin-top: var(--space-8);
  text-align: center;
}

@media (max-width: 1024px) {
  .space-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .space-body {
    text-align: center;
  }
  .space-lead {
    margin-inline: auto;
    max-width: 44rem;
  }
}

/* Image-divider photo sizing + focal-point modifiers moved to style.css
   (global) so the home + service pages share them. */

/* ============================================================
   CONTACT FORM — branded fields (P2 system) in a squircle panel.
   ============================================================ */
.home-form {
  max-width: 44rem;
  margin: 0 auto;
}
.home-form__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-9);
}
.home-form__card .dd-btn--block {
  margin-top: var(--space-2);
}

/* The inline success / error panels (.form-state / .form-success /
   .form-error / .error-contacts) moved to components/form-state.css. */

/* ============================================================
   PROMO — "win two free hours." Soft warm band, photo + signup.
   ============================================================ */
.home-promo {
  background: var(--grad-soft);
}
.promo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
.promo-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.promo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-dreamy);
}
.promo-image:hover img {
  transform: scale(1.05);
}
.promo-content h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  color: var(--text);
  margin-top: var(--space-3);
}
.promo-content__lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  line-height: var(--lh-body);
  margin: var(--space-4) 0 var(--space-7);
}
.promo-form {
  max-width: 32rem;
}
.promo-form__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.promo-form__row .dd-field {
  margin-bottom: 0;
}
.promo-form__row .dd-btn {
  align-self: flex-start;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .promo-container {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .promo-content {
    text-align: center;
  }
  .promo-content__lead {
    margin-inline: auto;
    max-width: 44rem;
  }
  .promo-form {
    margin: 0 auto;
  }
  .promo-form__row .dd-btn {
    align-self: stretch;
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding-bottom: var(--space-11);
  }
  .home-hero__cta {
    flex-direction: column;
    width: 100%;
    max-width: 22rem;
  }
  .home-hero__cta .dd-btn {
    width: 100%;
  }
  .home-form__card {
    padding: var(--space-7);
  }
}

@media (max-width: 480px) {
  .home-hero {
    min-height: 88vh;
    min-height: 88svh;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .home-hero__scroll-dot {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .promo-image img {
    transition: none;
  }
  .promo-image:hover img {
    transform: none;
  }
}
