/* ==========================================================================
   Hero: arrow-flight intro, cursor light, thumbnail trail, custom cursor
   Reference: approved mockup hero-a-v5.html
   ========================================================================== */

#home { position: relative; }

.hero {
    --brown: #4B3D39;
    --ink: #5e5249;
    --line: 94, 82, 73;
    --muted: #7d6f65;
    --text: #4f4540;
    --px: 50%; --py: 42%; --lx: 50%; --ly: 30%; --hv: 0; --ox: 0px; --oy: 0px;
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    isolation: isolate;
    background: #ccc8c2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 7vh;
    text-align: center;
}

/* original background layers (unchanged look) */
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 45% 40%, rgba(255,255,255,.65) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 70%, rgba(200,195,188,.35) 0%, transparent 45%),
        linear-gradient(160deg, rgba(222,218,212,.88) 0%, rgba(204,200,194,.88) 35%, rgba(216,212,206,.88) 65%, rgba(200,196,190,.88) 100%);
    box-shadow: inset 0 0 160px rgba(0,0,0,.06);
}
.hero-bg::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(125deg, transparent 0 60px, rgba(255,255,255,.04) 60px 61px);
}
.hero-spot {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: var(--hv);
    background: radial-gradient(24% 38% at var(--px) var(--py), rgba(255,255,255,.55), transparent 70%);
}

/* ---- thumbnail trail (always behind the logo) ---- */
.hero-trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-trail .ti {
    position: absolute; left: 0; top: 0; width: 9.5%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 2px;
    box-shadow: 0 14px 30px rgba(60,45,36,.28), 0 2px 6px rgba(60,45,36,.12);
    will-change: transform, opacity, filter;
    opacity: 0; filter: blur(2px);
    transform: translate(-50%,-50%) translate(var(--x), calc(var(--y) + 14px)) rotate(var(--r)) scale(.86);
    transition: transform 1.6s cubic-bezier(.16,1,.3,1), opacity .7s cubic-bezier(.33,1,.68,1), filter .4s ease-out;
}
.hero-trail .ti img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-trail .ti.in {
    opacity: 1; filter: blur(0);
    transform: translate(-50%,-50%) translate(var(--x), var(--y)) rotate(var(--r)) scale(1);
}
.hero-trail .ti.out {
    opacity: 0; filter: blur(3px);
    transform: translate(-50%,-50%) translate(var(--x), calc(var(--y) + 18px)) rotate(var(--r)) scale(.9);
    transition: transform 1.4s cubic-bezier(.4,0,.2,1), opacity 1.2s cubic-bezier(.4,0,.2,1), filter 1.2s ease;
}

/* ---- logo stage: box of the 2000x1035 artwork; arrow shaft centre = 49.13% ---- */
.hero-stage {
    position: relative; z-index: 3; flex: none;
    /* 1000px cap: the 2000px source is still >= 2x on Retina screens, so the logo never upscales */
    width: min(50vw, 78vh, 1000px);
    aspect-ratio: 2000 / 1035;
}
.hero-path {
    position: absolute; top: 49.13%; height: 1px; translate: 0 -50%; left: -300%; width: 700%; z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(var(--line),.5) 30%, rgba(var(--line),.5) 70%, transparent);
    opacity: 0; transition: opacity 1.2s ease;
}
.hero.is-lit .hero-path { opacity: .35; }
.hero-line {
    position: absolute; top: 49.13%; height: 1.5px; translate: 0 -50%; left: 0; width: 0; z-index: 1;
    background: linear-gradient(90deg, rgba(var(--line),0) 0%, rgba(var(--line),.45) 60%, rgba(var(--line),.95) 100%);
}
.hero-tip { position: absolute; top: 49.13%; left: 0; width: 0; height: 0; z-index: 3; opacity: 0; }
.hero-tip::before {
    content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ink); box-shadow: 0 0 0 3px rgba(var(--line),.15), 0 0 14px rgba(var(--line),.35);
}
.hero-reveal { position: absolute; inset: 0; z-index: 2; clip-path: inset(0 100% 0 0); }
.hero-logo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-sheen, .hero-glint {
    position: absolute; inset: 0;
    -webkit-mask: url(assets/logo-1000.png) 0 0 / 100% 100% no-repeat;
            mask: url(assets/logo-1000.png) 0 0 / 100% 100% no-repeat;
}
.hero-sheen {
    opacity: 0;
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.22) 50%, transparent 58%) -150% 0 / 250% 100% no-repeat;
}
.hero.is-lit .hero-sheen { animation: hero-sheen 1.8s cubic-bezier(.4,0,.2,1) .35s forwards; }
.hero-glint {
    mix-blend-mode: soft-light; opacity: calc(var(--hv) * .9);
    background: radial-gradient(32% 62% at var(--lx) var(--ly), rgba(255,255,255,.45), transparent 65%);
}

/* ---- name / role / button ---- */
.hero-meta {
    position: relative; z-index: 4; margin-top: clamp(28px, 6vh, 64px);
    transform: translate(var(--ox), var(--oy));
}
.hero-meta .line { display: block; overflow: hidden; margin: 0; font: inherit; }
.hero-meta .line > span { display: inline-block; transform: translateY(110%); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.hero.is-lit .hero-meta .line > span { transform: none; }
.hero.is-lit .hero-meta .line:nth-child(2) > span { transition-delay: .12s; }
.hero.is-lit .hero-meta .line:nth-child(3) > span { transition-delay: .26s; }
.hero-name, .hero-role { text-shadow: 0 0 10px rgba(232,228,222,.95), 0 0 22px rgba(232,228,222,.8); }
.hero-name { font: 500 12px/1.9 var(--font-main); letter-spacing: .45em; color: var(--muted); }
.hero-role {
    font: 400 clamp(14px, 1.55vw, 22px)/1.5 Georgia, "Times New Roman", serif;
    letter-spacing: .26em; text-transform: uppercase; color: var(--text);
}
.hero-cta { margin-top: clamp(16px, 3vh, 30px) !important; padding: 4px 0 8px; }
.hero-btn {
    position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden;
    background: var(--brown); color: #fff; text-decoration: none;
    font: 600 14px/1 var(--font-main); letter-spacing: .05em; padding: 14px 30px;
}
/* hide the system pointer only while the custom cursor is actually showing */
.hero.is-lit.is-hover, .hero.is-lit.is-hover .hero-btn { cursor: none; }
.hero-btn::before {
    content: ""; position: absolute; inset: 0; background: #2f2523;
    transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.65,0,.35,1);
}
.hero-btn span, .hero-btn i { position: relative; }
.hero-btn i { font-style: normal; display: inline-block; transition: transform .45s cubic-bezier(.65,0,.35,1); }
.hero-btn:hover::before, .hero-btn:focus-visible::before { transform: scaleX(1); }
.hero-btn:hover i, .hero-btn:focus-visible i { transform: translateY(2px); }

.hero-scroll {
    position: absolute; bottom: 3.5vh; left: 50%; width: 1px; height: 6vh; z-index: 4;
    background: linear-gradient(var(--muted), transparent); opacity: 0; transition: opacity .8s 1s;
}
.hero.is-lit .hero-scroll { opacity: 1; animation: hero-scroll 2s ease-in-out 1.6s infinite; }

/* ---- custom cursor ---- */
.hero-cursor { position: absolute; left: 0; top: 0; z-index: 8; pointer-events: none; opacity: 0; transition: opacity .3s; }
.hero.is-hover.is-lit .hero-cursor { opacity: 1; }
.hero-cursor .ring { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(75,61,57,.65); }
.hero-cursor .dot { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--brown); }
.hero-cursor-label {
    position: absolute; left: 22px; top: -9px; white-space: nowrap;
    font: 500 10px/14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text); padding: 2px 7px; border-radius: 2px; background: rgba(240,237,233,.82); backdrop-filter: blur(4px);
}
.hero-cursor-label:empty { display: none; }
.hero-cursor.flip .hero-cursor-label { left: auto; right: 22px; }
.hero-cursor-label b { color: var(--muted); font-weight: 500; margin-right: 8px; }

@keyframes hero-sheen { 0% { opacity: 1; background-position: -150% 0; } 100% { opacity: 1; background-position: 250% 0; } }
@keyframes hero-scroll {
    0% { transform: scaleY(0); transform-origin: top; }
    45% { transform: scaleY(1); transform-origin: top; }
    55% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 768px) {
    .hero-stage { width: 82vw; }
    .hero-role { letter-spacing: .14em; }
}
@media (pointer: coarse) {
    .hero, .hero-btn { cursor: auto; }
    .hero-cursor, .hero-trail, .hero-spot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero.is-lit .hero-scroll { animation: none; }
}

/* ---- header over the hero (home page only) ---- */
body.home header {
    position: fixed; left: 0; right: 0; background: transparent; box-shadow: none;
    transition: background .4s ease, box-shadow .4s ease, padding .4s ease;
}
body.home header.is-scrolled {
    background: rgba(245,244,242,.86); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(62,52,49,.08);
    padding: 14px 0;
}
.header-logo { height: 32px; }
