/* ============================================
   Cover — cinematic video hero
   Only loaded by cover.html. The legacy .cover-*
   starfield rules still live in styles.css so the
   previous front page (cover-original.html) can be
   restored without touching anything else.
   ============================================ */

/* This page no longer loads styles.css, so it carries its own copy of the
   site-wide reset — without border-box, padded pills compute wider than their
   max-width and get clipped. */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --hero-dark: #1a2238;          /* site navy — used over the "Deep Woods" clip */
    --hero-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body.hero-body {
    height: 100%;
    /* Single viewport-height experience — never scrolls. */
    overflow: hidden;
}

body.hero-body {
    margin: 0;
    background: #000;
    font-family: 'Instrument Serif', Georgia, serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;              /* dodges mobile browser chrome */
    overflow: hidden;
    background: #000;            /* prevents a flash before the video paints */
}

/* ---------- Background video layer ---------- */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1000ms ease-in-out;
    z-index: 0;
    pointer-events: none;
}

.hero-video.is-active {
    opacity: 1;
}

/* ---------- Transparent PNG overlay ---------- */
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    /* Constant scale keeps the edges off-screen while it bobs. */
    animation: hero-train-bob 3s ease-in-out infinite;
    will-change: transform;
}

@keyframes hero-train-bob {
    0%, 100% { transform: translateY(0) scale(1.03); }
    50%      { transform: translateY(-6px) scale(1.03); }
}

/* ---------- Liquid glass ---------- */
.liquid-glass {
    background: rgba(255, 255, 255, 0.01);
    background-blend-mode: luminosity;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0.15) 80%,
        rgba(255, 255, 255, 0.45) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* ---------- Content layer ---------- */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem 1.25rem 1.5rem;
}

/* ---------- Navigation ---------- */
.hero-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.hero-logo {
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.hero-logo span {
    font-style: normal;
}

.hero-nav-pill {
    display: none;               /* desktop only */
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.4rem 0.4rem 0.85rem;
    border-radius: 999px;
}

.hero-nav-link {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    transition: color 200ms var(--hero-ease);
    white-space: nowrap;
}

.hero-nav-link:hover {
    color: #fff;
}

.hero-nav-cta {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 200ms var(--hero-ease), background 200ms var(--hero-ease);
}

.hero-nav-cta:hover {
    background: rgba(255, 255, 255, 0.88);
    transform: translateY(-1px);
}

/* Mobile hamburger */
.hero-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.hero-menu-btn svg {
    position: absolute;
    transition: opacity 300ms var(--hero-ease), transform 300ms var(--hero-ease);
}

.hero-menu-btn .icon-menu  { opacity: 1; transform: rotate(0) scale(1); }
.hero-menu-btn .icon-close { opacity: 0; transform: rotate(-90deg) scale(0.75); }

.hero-menu-btn.is-open .icon-menu  { opacity: 0; transform: rotate(90deg) scale(0.75); }
.hero-menu-btn.is-open .icon-close { opacity: 1; transform: rotate(0) scale(1); }

/* ---------- Mobile menu overlay ---------- */
.hero-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 500ms var(--hero-ease), visibility 500ms var(--hero-ease);
}

.hero-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.hero-mobile-menu a {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.875rem;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 500ms var(--hero-ease), transform 500ms var(--hero-ease);
}

.hero-mobile-menu.is-open a { opacity: 1; transform: translateY(0); }

.hero-mobile-menu.is-open a:nth-child(1) { transition-delay: 100ms; }
.hero-mobile-menu.is-open a:nth-child(2) { transition-delay: 150ms; }
.hero-mobile-menu.is-open a:nth-child(3) { transition-delay: 200ms; }
.hero-mobile-menu.is-open a:nth-child(4) { transition-delay: 250ms; }

.hero-mobile-cta {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    background: #fff;
    border-radius: 999px;
    padding: 0.85rem 2.25rem;
    text-decoration: none;
    margin-top: 0.5rem;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 500ms var(--hero-ease), transform 500ms var(--hero-ease);
}

.hero-mobile-menu.is-open .hero-mobile-cta {
    opacity: 1;
    transform: scale(1);
    transition-delay: 300ms;
}

/* ---------- Hero copy ---------- */
.hero-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    gap: 1.1rem;
    padding: 1.5rem 0;
    min-height: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: #fff;
    transition: color 700ms var(--hero-ease);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
    flex-shrink: 0;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: #fff;
    max-width: 56rem;
    margin: 0;
    transition: color 700ms var(--hero-ease);
}

.hero-title em {
    font-style: italic;
}

.hero-subtext {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    max-width: 36rem;
    margin: 0;
    transition: color 700ms var(--hero-ease);
}

/* Enter pill (the spec's email capture — this site has no mailing list, so the
   pill carries the one action that matters: stepping into the collection). */
.hero-enter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    max-width: 320px;
    padding: 0.35rem 0.35rem 0.35rem 1.1rem;
    border-radius: 999px;
    margin-top: 0.2rem;
}

.hero-enter-label {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    transition: color 700ms var(--hero-ease);
}

.hero-enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
    background: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.6rem 1.15rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 200ms var(--hero-ease), transform 200ms var(--hero-ease);
}

.hero-enter-btn:hover {
    background: rgba(255, 255, 255, 0.88);
    transform: translateY(-1px);
}

.hero-enter-btn svg {
    transition: transform 200ms var(--hero-ease);
}

.hero-enter-btn:hover svg {
    transform: translateX(3px);
}

/* ---------- Video switcher ---------- */
.hero-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.1rem;
    margin-top: 0.5rem;
}

.hero-switch-btn {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    padding: 0.3rem 0.1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 300ms var(--hero-ease),
                color 700ms var(--hero-ease),
                border-color 300ms var(--hero-ease);
    -webkit-tap-highlight-color: transparent;
}

.hero-switch-btn:hover {
    opacity: 0.8;
}

.hero-switch-btn.is-active {
    opacity: 1;
    border-bottom-color: currentColor;
}

/* ---------- Bottom stats ---------- */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.85rem;
    flex-shrink: 0;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.hero-stat-divider {
    display: none;
    color: rgba(255, 255, 255, 0.35);
}

/* ---------- Dark treatment over "Deep Woods" ---------- */
.hero-content.is-dark .hero-badge,
.hero-content.is-dark .hero-title,
.hero-content.is-dark .hero-switch-btn {
    color: var(--hero-dark);
}

.hero-content.is-dark .hero-subtext,
.hero-content.is-dark .hero-enter-label {
    color: rgba(26, 34, 56, 0.85);
}

/* Nav + stats stay white in every scene. */

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .hero-content { padding: 1.75rem 2rem 2rem; }
    .hero-logo    { font-size: 1.5rem; }
    .hero-title   { font-size: 3rem; }
    .hero-subtext { font-size: 1rem; }
    .hero-badge   { font-size: 0.78rem; }
    .hero-enter   { max-width: 24rem; }
    .hero-stats   { font-size: 0.8rem; gap: 0.4rem 1.1rem; }
    .hero-stat-divider { display: inline; }
}

@media (min-width: 768px) {
    .hero-content   { padding: 2rem 3rem 2.25rem; }
    .hero-title     { font-size: 4.5rem; }
    .hero-menu-btn  { display: none; }
    .hero-nav-pill  { display: inline-flex; }
    .hero-main      { gap: 1.35rem; }
}

@media (min-width: 1024px) {
    .hero-title { font-size: 5.5rem; }
}

/* Short viewports (landscape phones): tighten so nothing clips. */
@media (max-height: 640px) {
    .hero-title   { font-size: 1.9rem; }
    .hero-main    { gap: 0.75rem; padding: 0.75rem 0; }
    .hero-subtext { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-overlay { animation: none; transform: scale(1.03); }
    .hero-video   { transition-duration: 200ms; }
    .hero-mobile-menu,
    .hero-mobile-menu a,
    .hero-mobile-cta { transition-duration: 120ms; }
}
