/* =========================================================
   HOME HERO — "Curtain Up"  (WP-A, revision 2b: collage + velvet)
   Scoped to #hero / .hh-*. Only transform + opacity animate.
   Layers (z): 0 collage · 1 grade · 2 light · 3 content ·
               4 drapes+valance · 5 footlights · 6 grain
   ========================================================= */

#hero.hh {
    --hh-drape: 40px;
    --hh-valance: 36px;
    --hh-hdr: 80px; /* fixed header height: valance hangs just below it */
    --hh-settle: cubic-bezier(0.22, 1, 0.36, 1);
    --hh-curtain: cubic-bezier(0.65, 0, 0.35, 1);
    --hh-aspect: 0.76; /* collage width / height */
    --hh-cw: min(calc(100vw - 2 * var(--hh-drape) + 36px), 540px);
    --hh-ch: calc(var(--hh-cw) / var(--hh-aspect));
    --hh-pl: calc(var(--hh-drape) + 12px);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh; /* fallback */
    min-height: 100svh;
    background: #0A0A0A;
    display: flex;
    align-items: flex-start;
}
@media (min-width: 768px)  { #hero.hh { --hh-drape: 72px; --hh-valance: clamp(44px, 6vw, 84px); --hh-hdr: 88px; --hh-cw: min(78vw, 540px); --hh-pl: calc(var(--hh-drape) + 40px); } }
@media (min-width: 1024px) { #hero.hh { --hh-drape: 110px; --hh-hdr: 92px; --hh-pl: calc(var(--hh-drape) + 56px); } }
@media (min-width: 1280px) { #hero.hh { --hh-drape: 160px; } }
/* side-by-side (>=1024): the collage lives in the free column right of the lockup.
   cw = viewport - both drapes - lockup block - gaps; capped by viewport height. */
@media (min-width: 1024px) {
    #hero.hh {
        align-items: center;
        --hh-cw: min(clamp(260px, calc(100vw - 770px), 640px), calc((100svh - var(--hh-hdr) - var(--hh-valance) - 110px) * var(--hh-aspect)));
    }
}
@media (min-width: 1280px) {
    #hero.hh {
        --hh-cw: min(clamp(270px, calc(100vw - 1028px), 640px), calc((100svh - var(--hh-hdr) - var(--hh-valance) - 110px) * var(--hh-aspect)));
    }
}

/* ---------- 0 · collage ---------- */
#hero .hh-collage {
    position: relative; z-index: 0;
    width: var(--hh-cw); height: var(--hh-ch);
    margin: 28px 0 34px calc((100vw - var(--hh-cw)) / 2 - var(--hh-pl));
}
@media (min-width: 1024px) {
    #hero .hh-collage {
        position: absolute; margin: 0;
        right: calc(var(--hh-drape) - 30px);
        top: calc(var(--hh-hdr) + var(--hh-valance) + 16px + (100% - var(--hh-hdr) - var(--hh-valance) - 86px - var(--hh-ch)) / 2);
    }
}
#hero .hh-collage::before {
    content: ''; position: absolute; inset: -14% -18%; pointer-events: none; z-index: -1;
    background: radial-gradient(ellipse at 50% 46%, rgba(212,185,106,.2), rgba(139,0,0,.12) 45%, rgba(139,0,0,0) 70%);
    mix-blend-mode: screen;
    animation: hhFade 1400ms ease-out 600ms both;
}
#hero .hh-tile { position: absolute; will-change: transform; }
#hero .hh-t1 { --r: -6deg;  --n: 0; left: -3%; top: 15%; width: 52%; z-index: 1; }
#hero .hh-t2 { --r: 3deg;   --n: 1; left: 39%; top: 0;   width: 58%; z-index: 2; }
#hero .hh-t3 { --r: -3.5deg;--n: 2; left: 5%;  top: 38%; width: 44%; z-index: 3; filter: drop-shadow(0 14px 14px rgba(40,0,0,.5)) drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
#hero .hh-t4 { --r: 6deg;   --n: 3; left: 63%; top: 41%; width: 33%; z-index: 4; }
#hero .hh-t5 { --r: -2deg;  --n: 4; left: 18%; top: 63%; width: 66%; z-index: 5; }
#hero .hh-t6 { --r: 5deg;   --n: 5; left: 73%; top: 78%; width: 25%; z-index: 6; }

#hero .hh-card {
    position: relative; margin: 0;
    transform: rotate(var(--r));
    animation: hhTile 1100ms var(--hh-settle) calc(700ms + var(--n) * 140ms) both;
    box-shadow: 0 1px 1px rgba(0,0,0,.45), 0 8px 14px -4px rgba(0,0,0,.55), 0 26px 42px -14px rgba(70,0,0,.6);
}
#hero .hh-ph { display: block; position: relative; overflow: hidden; }
#hero .hh-ph img { display: block; width: 100%; height: auto; }
/* stage-light vignette + warm red wash keeps every print in one colour world */
#hero .hh-ph::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(10,10,10,0) 42%, rgba(10,10,10,.55) 100%),
        linear-gradient(rgba(150,40,20,.16), rgba(150,40,20,.16));
}

/* polaroid */
#hero .hh-card--polaroid { padding: 3.4% 3.4% 13%; background: linear-gradient(160deg, #F3EEE3, #E0D8C7); }
/* film frame with sprocket holes */
#hero .hh-card--film { padding: 4.5% 10%; background: #0D0D0D; }
#hero .hh-card--film::before, #hero .hh-card--film::after {
    content: ''; position: absolute; top: 3%; bottom: 3%; width: 4.6%;
    background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(237,232,221,.82) 5px 11px, transparent 11px 17px);
    border-radius: 1px;
}
#hero .hh-card--film::before { left: 2.4%; }
#hero .hh-card--film::after { right: 2.4%; }
/* torn paper */
#hero .hh-card--torn {
    padding: 4.5%; background: linear-gradient(150deg, #F1ECE0, #DDD4C2); box-shadow: none;
    clip-path: polygon(0% 2%, 6% 0%, 12% 1.5%, 19% 0%, 27% 1.8%, 35% 0%, 44% 1.5%, 52% 0%, 61% 1.8%, 70% 0%, 79% 1.5%, 88% 0%, 95% 1.8%, 100% .5%, 99% 8%, 100% 17%, 98.6% 27%, 100% 38%, 98.8% 49%, 100% 60%, 98.6% 71%, 100% 82%, 99% 92%, 100% 100%, 92% 98.5%, 84% 100%, 75% 98.2%, 66% 100%, 57% 98.5%, 47% 100%, 38% 98.3%, 28% 100%, 19% 98.6%, 9% 100%, 0% 99%, 1.2% 90%, 0% 79%, 1.4% 68%, 0% 56%, 1.2% 44%, 0% 33%, 1.3% 21%, 0% 12%);
}
/* plain print with a red pin */
#hero .hh-card--plain { padding: 2.6%; background: #F5F0E8; }
/* gold-edged */
#hero .hh-card--gold { padding: 2.6%; background: linear-gradient(145deg, #F0DD9A, #C9A84C 45%, #8A6D25); }

#hero .hh-tape {
    position: absolute; z-index: 2; top: -4%; left: 50%; width: 38%; margin-left: -19%; aspect-ratio: 3.2 / 1;
    background: linear-gradient(100deg, rgba(240,234,220,.86), rgba(226,218,198,.7));
    clip-path: polygon(2% 0, 100% 0, 98% 20%, 100% 40%, 98% 60%, 100% 80%, 98% 100%, 2% 100%, 0 80%, 2% 60%, 0 40%, 2% 20%);
    transform: rotate(-6deg);
}
#hero .hh-t2 .hh-tape { left: 22%; transform: rotate(-17deg); }
#hero .hh-t5 .hh-tape { left: 78%; transform: rotate(12deg); }
#hero .hh-t6 .hh-tape { transform: rotate(8deg); }
#hero .hh-pin {
    position: absolute; z-index: 2; top: -3.5%; left: 50%; width: 9%; margin-left: -4.5%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FF7A7A, #A52A2A 55%, #3A0000);
    box-shadow: 0 3px 4px rgba(0,0,0,.55);
}

/* ---------- 0b · back tier (full-bleed, dimmed + softly blurred) ---------- */
#hero .hh-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#hero .hh-bg .hh-tile { --o: 1; }
#hero .hh-b1 { --r: -4deg; --b: 2px;   --n: 0; left: 2%;  top: 56%; width: 31%; }
#hero .hh-b2 { --r: 4deg;  --b: 1.5px; --n: 1; left: 28%; top: 72%; width: 25%; }
#hero .hh-b3 { --r: 5deg;  --b: 1px;   --n: 2; left: 43%; top: 7%;  width: 17%; }
#hero .hh-b4 { --r: -3deg; --b: 2.5px; --n: 3; left: 49%; top: 66%; width: 26%; }
#hero .hh-b5 { --r: -6deg; --b: 2.5px; --n: 4; left: 50%; top: 50%; width: 14%; }
#hero .hh-bgcard {
    position: relative;
    margin: 0; padding: 2%; background: #2A2420;
    transform: rotate(var(--r));
    filter: blur(var(--b)); /* desktop only; see the <=1023px block */
    box-shadow: 0 18px 30px -10px rgba(0,0,0,.7);
    animation: hhBg 1500ms var(--hh-settle) calc(900ms + var(--n) * 160ms) both;
}
#hero .hh-bgcard img { display: block; width: 100%; height: auto; }
/* dimming as a cheap overlay instead of a brightness filter */
#hero .hh-bgcard::after { content: ''; position: absolute; inset: 0; background: rgba(10,10,10,.42); }
@media (max-width: 1023px) {
    #hero .hh-b1 { left: -8%; top: 60%; width: 54%; }
    #hero .hh-b2 { left: 46%; top: 66%; width: 52%; }
    #hero .hh-b3 { left: 12%; top: 80%; width: 48%; }
    #hero .hh-b4 { left: 52%; top: 86%; width: 48%; }
    #hero .hh-b5 { display: none; }
    #hero .hh-bgcard { filter: none; } /* no blur filters on small screens */
}
/* phones: fewer prints, lighter work */
@media (max-width: 767px) {
    #hero .hh-t6, #hero .hh-b3, #hero .hh-b4 { display: none; }
    #hero .hh-b1 { top: 62%; }
    #hero .hh-b2 { top: 74%; }
}
@media (hover: none) { #hero .hh-tile, #hero .hh-light, #hero .hh-curtains { will-change: auto; } }

/* ---------- 1 · grade ---------- */
#hero .hh-grade {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(to top, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 22%),
        linear-gradient(90deg, rgba(10,10,10,.62) 0%, rgba(10,10,10,.5) 46%, rgba(10,10,10,0) 66%),
        radial-gradient(ellipse at 72% 46%, rgba(10,10,10,0) 48%, rgba(10,10,10,.55) 100%);
}
@media (max-width: 1023px) {
    #hero .hh-grade {
        background:
            linear-gradient(to top, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 22%),
            linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,0) 52%, rgba(10,10,10,.45) 62%, rgba(10,10,10,.3) 100%),
            radial-gradient(ellipse at 50% 30%, rgba(10,10,10,0) 48%, rgba(10,10,10,.5) 100%);
    }
}
#hero .hh-grade::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(139,0,0,.1); mix-blend-mode: multiply;
}

/* ---------- 2 · spotlight ---------- */
#hero .hh-light {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
    pointer-events: none; mix-blend-mode: screen; will-change: transform;
    animation: hhFade 900ms ease-out 1100ms both;
}
@media (max-width: 767px) { #hero .hh-light { opacity: .7; } }

/* ---------- 3 · content ---------- */
#hero .hh-content {
    width: 100%; max-width: 760px;
    padding: 0 var(--hh-pl) 120px;
    padding-top: calc(var(--hh-hdr) + var(--hh-valance) + 16px); /* lockup starts below header + valance */
}
#hero .hh-content > :not(.hh-collage) { position: relative; z-index: 3; }
@media (min-width: 768px) { #hero .hh-content { padding-right: 24px; } }
@media (min-width: 1024px) { #hero .hh-content { max-width: 780px; } }
#hero .hh-lead { max-width: 33rem; text-shadow: 0 1px 18px rgba(10,10,10,.8); }
@media (min-width: 1024px) and (max-width: 1279px) { #hero .hh-lead { max-width: 28rem; } }
@media (max-width: 767px) { #hero .hh-lead { font-size: 1.0625rem; max-width: none; } }

#hero .hh-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
@media (max-width: 639px) {
    #hero .hh-cta { flex-direction: column; align-items: stretch; gap: 4px; }
    #hero .hh-cta .btn-anniversary-cta { width: 100%; min-width: 0; padding-inline: 24px; }
    #hero .hh-cta .btn-anniversary-cta-text { white-space: normal; text-align: center; }
    #hero .hh-textlink { align-self: center; }
}
#hero .hh-cta .btn-anniversary-cta { min-width: 0; padding-inline: 36px; }
@media (max-width: 480px) { #hero .hh-cta .btn-anniversary-cta { font-size: 1rem; letter-spacing: .1em; } } /* keep button label >= 16px */

/* AA (3:1 large text) for the rotating word over the dark scrim: a lifted kRed (#DB3A3A) instead of #8B0000 */
#hero .rotating-word { color: #DB3A3A; }

/* narrow phones: "of Storytelling" must stay inside the drapes */
@media (max-width: 389px) { #hero h1 > span.whitespace-nowrap { font-size: 2.2rem; } }
@media (max-width: 339px) { #hero h1 > span.whitespace-nowrap { font-size: 1.9rem; } }

/* text link: real underline, hover / focus / active */
#hero .hh-textlink {
    display: inline-flex; align-items: center; min-height: 44px;
    font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.2rem;
    color: #F5F0E8;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
    text-decoration-color: rgba(201,168,76,.4);
    transition: color 250ms ease, text-decoration-color 250ms ease, opacity 150ms ease;
}
#hero .hh-textlink:hover { color: #D4B96A; text-decoration-color: #D4B96A; }
#hero .hh-textlink:focus-visible { outline: 2px solid #D4B96A; outline-offset: 4px; }
#hero .hh-textlink:active { opacity: .8; }
#hero .btn-anniversary-cta:focus-visible { outline-color: #D4B96A; outline-offset: 3px; }

/* ---------- 4 · drapes + valance ---------- */
#hero .hh-curtains { position: absolute; inset: 0; z-index: 4; pointer-events: none; will-change: transform; }
#hero .hh-drape { position: absolute; top: 0; height: 100%; width: var(--hh-drape); display: block; overflow: visible; }
#hero .hh-drape--l { left: 0; transform-origin: 0 50%;   animation: hhDrapeL 1400ms var(--hh-curtain) 150ms both; }
#hero .hh-drape--r { right: 0; transform-origin: 100% 50%; animation: hhDrapeR 1400ms var(--hh-curtain) 150ms both; }
#hero .hh-valance {
    position: absolute; top: var(--hh-hdr); left: 0; width: 100%;
    height: var(--hh-valance); display: block; overflow: visible;
    animation: hhValance 900ms var(--hh-settle) 900ms both;
}

/* ---------- 5 · footlights ---------- */
#hero .hh-footlights {
    position: absolute; z-index: 5; pointer-events: none;
    left: var(--hh-drape); right: var(--hh-drape); bottom: 18px;
    display: flex; justify-content: space-around; align-items: flex-end;
}
#hero .hh-footlights::before {
    content: ''; position: absolute; left: calc(var(--hh-drape) * -1); right: calc(var(--hh-drape) * -1); bottom: 2px; height: 1px;
    background: rgba(201,168,76,.25);
}
#hero .hh-lamp {
    position: relative; width: 6px; height: 6px; border-radius: 50%;
    background: #D4B96A; box-shadow: 0 0 8px 1px rgba(212,185,106,.55);
    animation: hhFade 500ms ease-out calc(1200ms + var(--i) * 60ms) both;
}
#hero .hh-lamp::before {
    content: ''; position: absolute; left: 50%; bottom: 3px; width: 60px; height: 24px; margin-left: -30px;
    background: radial-gradient(ellipse at 50% 100%, rgba(212,185,106,.22) 0%, rgba(212,185,106,0) 70%);
}
@media (max-width: 767px) { #hero .hh-lamp:nth-child(even) { display: none; } }

/* ---------- 6 · grain + red line ---------- */
#hero .hh-grain { position: absolute; inset: 0; z-index: 6; opacity: .05; pointer-events: none; }
#hero .hh-redline { z-index: 6; }

/* short landscape phones */
@media (max-height: 500px) {
    #hero .hh-footlights, #hero .hh-valance { display: none; }
    #hero .hh-content { padding-top: 96px; padding-bottom: 48px; }
}
/* landscape phones: type first, no collage (it would push the copy off screen) */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1023px) {
    #hero .hh-collage { display: none; }
    #hero .hh-b3, #hero .hh-b4, #hero .hh-b5 { display: none; }
    #hero .hh-b1 { top: 40%; left: 40%; width: 30%; } #hero .hh-b2 { top: 20%; left: 66%; width: 28%; }
    #hero .hh-content { max-width: 62%; }
    #hero .hh-grade { background: linear-gradient(90deg, rgba(10,10,10,.7), rgba(10,10,10,.5) 55%, rgba(10,10,10,0) 80%); }
}

/* ---------- keyframes ---------- */
@keyframes hhTile {
    from { opacity: 0; transform: translateY(34px) rotate(calc(var(--r) + 4deg)) scale(.94); }
    to   { opacity: 1; transform: translateY(0) rotate(var(--r)) scale(1); }
}
@keyframes hhBg { from { opacity: 0; transform: translateY(24px) rotate(var(--r)); } to { opacity: 1; transform: translateY(0) rotate(var(--r)); } }
@keyframes hhFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hhValance { from { transform: translateY(-30%); } to { transform: translateY(0); } }
@keyframes hhDrapeL { from { transform: translateX(52vw) scaleX(1.6); } to { transform: translateX(0) scaleX(1); } }
@keyframes hhDrapeR { from { transform: translateX(-52vw) scaleX(1.6); } to { transform: translateX(0) scaleX(1); } }

/* ---------- reduced motion: everything at rest ---------- */
@media (prefers-reduced-motion: reduce) {
    #hero .hh-card, #hero .hh-bgcard, #hero .hh-collage::before, #hero .hh-light, #hero .hh-drape, #hero .hh-valance, #hero .hh-lamp,
    #hero .reveal-up { animation: none !important; }
    #hero .reveal-up { opacity: 1; transform: none; }
    #hero .hh-textlink, #hero .btn-anniversary-cta { transition: none; }
}

/* ---------- home page, below the hero: mobile tap targets (index.html only loads this file) ---------- */
.btn-gallery-more { min-height: 44px; }
@media (max-width: 767px) { .btn-gallery-more { font-size: 1rem; } }
