/* "An Invitation to Grow" hero prototype for Ezekiel Family Services.
   Default (no script, reduced motion): a still welcome composition, everything visible.
   .is-cinematic (added by hero.js): the pinned, scroll driven entrance through the French doors.
   Colors come from ../site/css/tokens.css; the few photo-matched tones below are named here. */

.entry {
  --wall: #f1dcc6;            /* sampled from the door image wall */
  --floor: #6a3a22;           /* sampled from the door image floor */
  --ink-on-glass: #ffffff;
  --wash: 248 243 234;        /* ivory, as rgb for the reading wash */
  --ease-entry: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  background: var(--color-bg);
  color: var(--color-text);
  overflow: hidden;
}

/* ---------- Layers ---------- */
.entry__stage { position: relative; isolation: isolate; }
.entry__room { position: absolute; inset: 0; z-index: 0; }
.entry__room img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.entry__wash { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--wash) / 0.94) 0%, rgb(var(--wash) / 0.86) 38%, rgb(var(--wash) / 0.35) 62%, rgb(var(--wash) / 0.15) 100%); }
.entry__place, .entry__scrim, .entry__cue { display: none; }

/* ---------- Copy ---------- */
.entry__content { position: relative; z-index: 4; padding-block: clamp(2.5rem, 1rem + 5vw, 5.5rem); }
.entry__intro { margin-bottom: var(--space-4); }
.entry__welcome-grid { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 960px) { .entry__welcome-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 430px); gap: clamp(3rem, 6vw, 6rem); } }
.entry__eyebrow { display: block; margin: 0 0 var(--space-3); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-label, var(--color-muted)); }
.entry h1 { font-size: var(--text-xl); max-width: none; margin-bottom: var(--space-4); }
.entry__display { font-family: var(--font-heading); font-size: var(--text-4xl); line-height: 1.04; letter-spacing: -0.01em; max-width: 15ch; margin: 0 0 var(--space-4); text-wrap: balance; }
.entry__lead { font-size: var(--text-lg); line-height: 1.55; color: var(--color-muted); max-width: 44ch; margin-bottom: var(--space-5); }
.entry__note { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.entry__photo { margin: 0; width: 100%; max-width: 470px; }
.entry__photo img { width: 100%; aspect-ratio: 4 / 5; object-position: 50% 6%; border-radius: var(--radius-card); box-shadow: 0 24px 48px rgb(15 53 51 / 0.18); }
.entry__photo figcaption { display: none; }
.entry .btn:active { transform: scale(0.97); }

/* ---------- Cinematic mode ---------- */
.entry.is-cinematic .entry__stage { height: calc(100svh - var(--header-height, 72px)); min-height: 520px; background: var(--wall); }
.entry.is-cinematic .entry__room img { transform-origin: 50% 50%; will-change: transform; }

/* The door wall, placed by hero.js in the photo's own pixel space (3344 x 1882) */
.entry.is-cinematic .entry__place { display: block; position: absolute; left: 0; top: 0; width: 3344px; height: 1882px; z-index: 1; transform-origin: 0 0; pointer-events: none; }
.entry__scene { position: absolute; inset: 0; transform-origin: 1696px 949px; perspective: 2600px; perspective-origin: 1696px 949px; will-change: transform; }
.entry__wall { position: absolute; inset: 0; width: 3344px; height: 1882px; max-width: none; }
.entry__leaf { position: absolute; top: 112px; height: 1674px; overflow: hidden; backface-visibility: hidden; will-change: transform; }
.entry__leaf img { width: 100%; height: 100%; max-width: none; }
.entry__leaf--l { left: 1000px; width: 700px; transform-origin: 0 50%; }
.entry__leaf--r { left: 1700px; width: 692px; transform-origin: 100% 50%; }
.entry__shade { position: absolute; inset: 0; background: #0b1424; opacity: 0; }

/* Desktop: the welcome sits centered over the doors, softly lit from behind */
.entry.is-cinematic .entry__scrim { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 42% 38% at 50% 48%, rgb(11 20 36 / 0.72), rgb(11 20 36 / 0.5) 45%, rgb(11 20 36 / 0) 100%); }
.entry.is-cinematic .entry__content { position: absolute; inset: 0; padding: 0; display: block; }
.entry.is-cinematic .entry__intro { position: absolute; left: 50%; top: 50%; width: min(92%, 760px); transform: translate(-50%, -50%); text-align: center; color: var(--ink-on-glass); }
.entry.is-cinematic .entry__intro .entry__eyebrow { color: rgb(255 255 255 / 0.92); text-shadow: 0 1px 12px rgb(11 20 36 / 0.6); }
.entry.is-cinematic .entry__intro h1 { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.25rem); line-height: 1.04; max-width: 14ch; margin: 0 auto; color: inherit; text-shadow: 0 2px 24px rgb(11 20 36 / 0.55); }
.entry.is-cinematic .entry__cue { display: inline-flex; flex-direction: column; align-items: center; gap: var(--space-2); position: absolute; left: 50%; bottom: var(--space-5); transform: translateX(-50%); z-index: 4; font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.95); text-shadow: 0 1px 10px rgb(11 20 36 / 0.7); }
.entry__cue-line { display: block; width: 1px; height: 40px; background: currentColor; transform-origin: top; }
@media (prefers-reduced-motion: no-preference) { .entry__cue-line { animation: cue 1.8s var(--ease-entry) 3; } }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Final welcome: text left on the room's wall, founders on the right */
.entry.is-cinematic .entry__welcome { position: absolute; inset: 0; display: grid; align-content: center; }
.entry.is-cinematic .entry__photo figcaption { display: none; }
.entry.is-cinematic .entry__photo img { max-height: calc(100svh - var(--header-height, 72px) - 7rem); width: auto; max-width: 100%; aspect-ratio: 4 / 5; }

/* Phones: the doors fill the screen and the welcome sits on the glass, softly lit from behind */
@media (max-width: 699px) {
  .entry.is-cinematic .entry__stage { background: linear-gradient(var(--wall) 0 80%, var(--floor) 80% 100%); }
  .entry.is-cinematic .entry__scrim { background: radial-gradient(ellipse 78% 32% at 50% 40%, rgb(11 20 36 / 0.82), rgb(11 20 36 / 0.58) 50%, rgb(11 20 36 / 0) 100%); }
  .entry.is-cinematic .entry__intro { top: 40%; width: 88%; }
  .entry.is-cinematic .entry__intro .entry__eyebrow { font-size: 0.8rem; letter-spacing: 0.12em; }
  .entry.is-cinematic .entry__intro h1 { font-size: clamp(2.2rem, 1.4rem + 4.4vw, 2.9rem); }
  .entry.is-cinematic .entry__cue { bottom: var(--space-4); font-size: 0.75rem; }
  .entry.is-cinematic .entry__wash { background: linear-gradient(0deg, rgb(var(--wash) / 0.97) 0%, rgb(var(--wash) / 0.94) 48%, rgb(var(--wash) / 0.4) 100%); }
  .entry.is-cinematic .entry__welcome { align-content: end; padding-bottom: var(--space-4); }
  .entry.is-cinematic .entry__welcome-grid { gap: var(--space-3); }
  .entry.is-cinematic .entry__photo { order: -1; max-width: none; }
  .entry.is-cinematic .entry__photo img { width: 100%; max-height: 38svh; aspect-ratio: auto; object-position: 50% 4%; }
  .entry.is-cinematic .entry__photo figcaption { display: none; }
  .entry.is-cinematic .entry__display { font-size: 2.15rem; margin-bottom: var(--space-2); }
  .entry.is-cinematic .entry__lead { font-size: var(--text-base); margin-bottom: var(--space-3); }
}
