/*
Theme Name: Endless Ropportunities
Theme URI: https://endlessropportunities.com
Author: Endless Ropportunities
Description: Photo-led landing for Will Ropp's production company. Full-bleed imagery, warm white on warm black, hamburger menu.
Version: 1.7.0
License: Proprietary
Text Domain: endless-ropportunities
*/

*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #0a0908;
    --bg-soft: #141210;
    --bg-elev: #1a1816;
    --ink: #f5f2ec;
    --ink-80: rgba(245, 242, 236, 0.82);
    --ink-60: rgba(245, 242, 236, 0.60);
    --ink-40: rgba(245, 242, 236, 0.36);
    --rule: rgba(245, 242, 236, 0.16);
    --accent: #e8dfc8;

    --outer: #000000;
    --frame-m: clamp(32px, 4vw, 64px);
    --frame-m-y: clamp(26px, 3vw, 48px);
    --frame-r: clamp(22px, 2.6vw, 36px);

    --measure: 620px;
    --container: 1240px;
    --gutter: clamp(20px, 4vw, 56px);

    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-smooth: cubic-bezier(.85, 0, .15, 1);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: var(--outer);
    overflow: hidden;
    height: 100%;
}
body {
    margin: 0;
    background: var(--outer);
    color: var(--ink);
    font-family: 'Fraunces', 'Times New Roman', Georgia, serif;
    font-size: 17px;
    line-height: 1.5;
    font-variation-settings: 'opsz' 18, 'SOFT' 30;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* The fixed black frame — masthead + colophon stay on the border,
   .frame is the scrolling inner window between them. */
.frame {
    flex: 1 1 auto;
    min-height: 0;
    background: var(--bg);
    margin: 0 var(--frame-m);
    border-radius: var(--frame-r);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(245,242,236,0.25) transparent;
}
.frame::-webkit-scrollbar { width: 6px; }
.frame::-webkit-scrollbar-track { background: transparent; }
.frame::-webkit-scrollbar-thumb { background: rgba(245,242,236,0.22); border-radius: 3px; }
.frame::-webkit-scrollbar-thumb:hover { background: rgba(245,242,236,0.4); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ========================================
   SCROLL PROGRESS BAR — sits inside the frame top edge
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    z-index: 70;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 80ms linear;
    pointer-events: none;
}

/* ========================================
   MASTHEAD + HAMBURGER
   ======================================== */
.masthead {
    flex: 0 0 auto;
    padding: clamp(18px, 2vw, 28px) var(--frame-m);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--ink);
    background: var(--outer);
    z-index: 40;
    position: relative;
}
.masthead__brand {
    font-family: 'Homemade Apple', 'Fraunces', cursive;
    font-size: clamp(15px, 1.4vw, 19px);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.2;
    z-index: 41;
    transition: color 280ms ease;
}
.masthead__brand:hover { color: var(--accent); }

/* Hamburger toggle */
.menu-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 41;
    color: var(--ink);
}
.menu-toggle__line {
    display: block;
    width: 26px;
    height: 1.5px;
    background: currentColor;
    transform-origin: center;
    transition: transform 480ms var(--ease-smooth), width 320ms var(--ease);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__line:first-child {
    transform: translateY(3.75px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__line:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

/* ========================================
   FULL-SCREEN MENU OVERLAY
   ======================================== */
/* Liquid glass panel — pinned to the frame's visual bounds via
   --mh / --ch CSS vars (masthead + colophon heights, measured in JS).
   Lives at body level so it's unaffected by frame scroll state. */
.menu-overlay {
    position: fixed;
    top: var(--mh, 64px);
    bottom: var(--ch, 40px);
    left: var(--frame-m);
    right: var(--frame-m);
    z-index: 35;
    border-radius: var(--frame-r);
    padding: clamp(40px, 5vw, 72px) clamp(32px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    clip-path: circle(0% at calc(100% - 44px) 44px);
    transition: clip-path 720ms var(--ease-smooth);
    overflow: hidden;

    background: rgba(10, 9, 8, 0.42);
    backdrop-filter: blur(36px) saturate(170%) brightness(0.88);
    -webkit-backdrop-filter: blur(36px) saturate(170%) brightness(0.88);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}
.menu-overlay.is-open {
    pointer-events: auto;
    clip-path: circle(180% at calc(100% - 44px) 44px);
}

/* Slow drifting color wash — the "liquid" (warm cream tones, no orange) */
.menu-overlay::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(38% 42% at 22% 28%, rgba(245, 242, 236, 0.14), transparent 65%),
        radial-gradient(32% 38% at 78% 72%, rgba(232, 223, 200, 0.12), transparent 65%),
        radial-gradient(28% 34% at 55% 90%, rgba(210, 200, 180, 0.08), transparent 70%);
    filter: blur(40px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1200ms ease 260ms;
    animation: liquid-drift 22s ease-in-out infinite;
    will-change: transform;
}
.menu-overlay.is-open::before { opacity: 1; }

@keyframes liquid-drift {
    0%   { transform: translate3d(0%, 0%, 0)   scale(1);    }
    25%  { transform: translate3d(-6%, 4%, 0)  scale(1.08); }
    50%  { transform: translate3d(4%, -3%, 0)  scale(0.96); }
    75%  { transform: translate3d(-3%, -5%, 0) scale(1.04); }
    100% { transform: translate3d(0%, 0%, 0)   scale(1);    }
}

/* Specular highlight line along the top inner edge */
.menu-overlay::after {
    content: '';
    position: absolute;
    top: 1px; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.18), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1000ms ease 400ms;
    border-radius: inherit;
}
.menu-overlay.is-open::after { opacity: 1; }

/* Main grid: nav left, featured card right */
.menu-overlay__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(32px, 5vw, 72px);
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 1;
}
@media (min-width: 1000px) {
    .menu-overlay__grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: clamp(48px, 7vw, 120px);
    }
}

.menu-overlay__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(0px, 0.4vw, 6px);
}
.menu-overlay__item { overflow: hidden; }

.menu-overlay__link {
    display: inline-block;
    color: var(--ink);
    padding: clamp(4px, 0.7vw, 10px) 0;
    position: relative;
    transform: translateY(110%);
    transition: transform 780ms var(--ease), color 260ms ease, letter-spacing 360ms var(--ease), transform 360ms var(--ease);
}
.menu-overlay.is-open .menu-overlay__link { transform: translateY(0); }
.menu-overlay.is-open .menu-overlay__item:nth-child(1) .menu-overlay__link { transition-delay: 140ms; }
.menu-overlay.is-open .menu-overlay__item:nth-child(2) .menu-overlay__link { transition-delay: 200ms; }
.menu-overlay.is-open .menu-overlay__item:nth-child(3) .menu-overlay__link { transition-delay: 260ms; }
.menu-overlay.is-open .menu-overlay__item:nth-child(4) .menu-overlay__link { transition-delay: 320ms; }

.menu-overlay__link:hover { color: var(--accent); }
.menu-overlay.is-open .menu-overlay__link:hover .menu-overlay__word {
    transform: translateX(10px);
}
.menu-overlay__word {
    font-family: 'Fraunces', serif;
    font-size: clamp(36px, 6.2vw, 88px);
    line-height: 1;
    letter-spacing: -0.035em;
    font-style: italic;
    font-variation-settings: 'opsz' 96, 'wght' 380;
    font-weight: 400;
    display: inline-block;
    transition: transform 420ms var(--ease);
}

/* Featured project card (right column) */
.menu-overlay__featured {
    margin: 0;
    max-width: 440px;
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 900ms var(--ease) 460ms, transform 900ms var(--ease) 460ms;
}
.menu-overlay.is-open .menu-overlay__featured {
    opacity: 1;
    transform: translateX(0);
}
.menu-overlay__featured-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: var(--bg-soft);
}
.menu-overlay__featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: saturate(0.95);
    transition: transform 1200ms var(--ease);
}
.menu-overlay__featured:hover .menu-overlay__featured-image img { transform: scale(1.04); }

.menu-overlay__featured-caption {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.menu-overlay__featured-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.menu-overlay__featured-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(24px, 2.8vw, 32px);
    font-style: italic;
    font-variation-settings: 'opsz' 36, 'wght' 380;
    font-weight: 400;
    line-height: 1.1;
    color: var(--ink);
}
.menu-overlay__featured-detail {
    font-size: 13px;
    color: var(--ink-60);
    line-height: 1.45;
    margin-top: 4px;
}


/* ========================================
   HERO — full viewport, pinned while content scrolls
   ======================================== */
.hero {
    position: relative;
    height: calc(100svh - clamp(140px, 14vw, 200px));
    min-height: 520px;
    width: 100%;
    overflow: hidden;
    z-index: 1;
}
.hero__image,
.hero__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 32%;
}
.hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(10, 9, 8, 0.55) 0%,
            rgba(10, 9, 8, 0.15) 28%,
            rgba(10, 9, 8, 0.0) 48%,
            rgba(10, 9, 8, 0.55) 82%,
            rgba(10, 9, 8, 0.95) 100%);
    pointer-events: none;
}
.hero__body {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    bottom: clamp(40px, 6vw, 88px);
    max-width: 1100px;
    color: var(--ink);
    z-index: 2;
}
.hero__title {
    font-size: clamp(60px, 12.5vw, 208px);
    line-height: 0.86;
    letter-spacing: -0.04em;
    margin: 0 0 clamp(20px, 2.4vw, 32px);
    font-variation-settings: 'opsz' 144, 'wght' 380;
    font-weight: 400;
    text-wrap: balance;
}
.hero__title em { font-style: italic; font-variation-settings: 'opsz' 144, 'wght' 340; }
.hero__title .w {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: hero-word 1000ms var(--ease) forwards;
}
.hero__title .w--1 { animation-delay: 300ms; }
.hero__title .w--2 { animation-delay: 460ms; }
@keyframes hero-word { to { opacity: 1; transform: translateY(0); } }

.hero__lede {
    font-size: clamp(18px, 1.9vw, 22px);
    line-height: 1.38;
    max-width: 640px;
    color: var(--ink-80);
    margin: 0;
    font-variation-settings: 'opsz' 22, 'wght' 380;
    text-wrap: pretty;
    opacity: 0;
    animation: hero-word 900ms var(--ease) 700ms forwards;
}
.hero__lede strong { color: var(--ink); font-variation-settings: 'opsz' 22, 'wght' 500; }
.hero__lede em { font-style: italic; }

/* SXSW badge top-right on hero */
.hero__badge {
    position: absolute;
    top: clamp(32px, 4vw, 56px);
    right: var(--gutter);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    opacity: 0;
    animation: hero-word 900ms var(--ease) 900ms forwards;
}
.hero__badge-logo {
    width: clamp(74px, 8vw, 108px);
    height: auto;
    filter: invert(1) brightness(1.04);
    opacity: 0.96;
}
.hero__badge-text {
    font-size: 11px;
    line-height: 1.5;
    color: var(--ink-80);
    text-align: right;
    font-family: 'Fraunces', serif;
    font-variation-settings: 'opsz' 14, 'wght' 400;
    max-width: 200px;
}
.hero__badge-text strong { color: var(--ink); font-variation-settings: 'opsz' 12, 'wght' 500; font-style: italic; }

/* Legacy wrapper — no-op inside frame */
.content-stack { position: relative; }

/* ========================================
   SECTION
   ======================================== */
.section { padding: clamp(72px, 9vw, 140px) 0; position: relative; }

/* Full-bleed — fills frame width (not viewport) */
.bleed {
    width: 100%;
    position: relative;
    overflow: hidden;
}
.bleed img { width: 100%; display: block; }

/* Titles */
.h-display {
    font-size: clamp(64px, 10vw, 156px);
    line-height: 0.9;
    letter-spacing: -0.035em;
    margin: 0 0 clamp(28px, 4vw, 44px);
    font-variation-settings: 'opsz' 144, 'wght' 380;
    font-weight: 400;
    font-style: italic;
    overflow: hidden;
    text-wrap: balance;
}
.h-display > span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 900ms var(--ease);
}
.h-display.is-in > span { transform: translateY(0); }

.body { max-width: var(--measure); }
.body > p { margin: 0 0 18px; font-size: 17px; line-height: 1.5; color: var(--ink-80); text-wrap: pretty; }
.body > p:last-child { margin-bottom: 0; }
.body em { font-style: italic; color: var(--ink); }
.body strong { color: var(--ink); font-variation-settings: 'opsz' 17, 'wght' 500; }
.body .dropcap::first-letter {
    font-size: 4.4em;
    line-height: 0.88;
    float: left;
    padding: 6px 10px 0 0;
    font-style: italic;
    font-variation-settings: 'opsz' 144, 'wght' 380;
    color: var(--ink);
}

/* ========================================
   PRESS
   ======================================== */
.press {
    margin-top: clamp(40px, 5vw, 64px);
}
.press__item {
    padding: clamp(26px, 3vw, 38px) 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0;
}
@media (min-width: 820px) {
    .press__item {
        grid-template-columns: 1fr 260px;
        gap: 56px;
        align-items: center;
    }
}
.press__quote {
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.012em;
    margin: 0;
    font-style: italic;
    font-variation-settings: 'opsz' 36, 'wght' 360;
    max-width: 720px;
    color: var(--ink);
    text-wrap: pretty;
}
.press__source {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.press__logo {
    height: 30px;
    width: auto;
    max-width: 220px;
    display: block;
    filter: invert(1) brightness(1.05);
    opacity: 0.94;
}
/* PNG logo — force pure white so the red ampersand doesn't invert to cyan */
.press__logo--austin {
    height: 34px;
    filter: brightness(0) invert(1);
    opacity: 0.96;
}
.press__logo--collider { height: 24px; }
.press__logo--screen-rant { height: 16px; }
.press__byline {
    font-size: 12px;
    color: var(--ink-60);
    line-height: 1.3;
    font-variation-settings: 'opsz' 14, 'wght' 400;
}
.press__byline::before { content: '— '; color: var(--ink-40); }

/* ========================================
   LINKOUTS — centered pill buttons
   ======================================== */
.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 18px;
    margin: clamp(40px, 5vw, 64px) auto 0;
    max-width: 100%;
}
.linkout {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    font-size: 14px;
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 999px;
    transition: color 220ms ease, background 220ms ease, border-color 220ms ease, transform 260ms var(--ease);
}
.linkout:hover {
    color: var(--bg);
    background: var(--ink);
    border-color: var(--ink);
    transform: translateY(-2px);
}
.linkout__logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.94;
    flex-shrink: 0;
    transition: filter 220ms ease;
}
.linkout:hover .linkout__logo {
    filter: brightness(0);
}

/* ========================================
   WILL ROPP SPLIT
   ======================================== */
.ropp-split {
    display: grid;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .ropp-split {
        grid-template-columns: 1fr 1fr;
        min-height: 92vh;
    }
}
.ropp-split__image {
    position: relative;
    overflow: hidden;
    background: var(--bg-soft);
    aspect-ratio: 4 / 5;
}
@media (min-width: 900px) { .ropp-split__image { aspect-ratio: auto; } }
.ropp-split__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: saturate(0.95) contrast(1.02);
    transform: scale(1.05);
    transition: transform 900ms var(--ease);
}
.ropp-split__image.is-in img { transform: scale(1); }
.ropp-split__text {
    padding: clamp(40px, 6vw, 88px) var(--gutter);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
}
.ropp-split__text .h-display { margin-bottom: clamp(28px, 3.5vw, 44px); }
.ropp-split__text .body { max-width: 520px; }

/* ========================================
   FILMOGRAPHY — horizontal scroll-snap
   ======================================== */
.filmography-strip {
    padding: clamp(48px, 6vw, 80px) 0 clamp(72px, 9vw, 120px);
    overflow: hidden;
}
.filmography-strip__row {
    display: flex;
    gap: 20px;
    padding: 0 var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
}
.filmography-strip__row::-webkit-scrollbar { display: none; }
.film {
    position: relative;
    flex: 0 0 220px;
    aspect-ratio: 2 / 3;
    scroll-snap-align: start;
    overflow: hidden;
    background: var(--bg-soft);
}
@media (min-width: 900px) { .film { flex-basis: 260px; } }
.film img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 800ms var(--ease), filter 400ms;
    filter: saturate(0.92);
}
.film:hover img { transform: scale(1.05); filter: saturate(1.05); }
.film__cap {
    position: absolute;
    inset: auto 0 0 0;
    padding: 18px 16px 14px;
    background: linear-gradient(to top, rgba(10,9,8,0.96) 0%, rgba(10,9,8,0.7) 60%, transparent 100%);
    font-variation-settings: 'opsz' 14, 'wght' 400;
    transform: translateY(20%);
    opacity: 0;
    transition: transform 400ms var(--ease), opacity 400ms;
}
.film:hover .film__cap,
.film:focus-within .film__cap { transform: translateY(0); opacity: 1; }
.film__title {
    display: block;
    font-size: 15px;
    font-style: italic;
    color: var(--ink);
    line-height: 1.2;
    margin: 0 0 2px;
}
.film__year { font-size: 12px; color: var(--ink-60); }

/* ========================================
   STUDIO
   ======================================== */
.studio__statement {
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.15;
    letter-spacing: -0.018em;
    font-style: italic;
    font-variation-settings: 'opsz' 72, 'wght' 360;
    max-width: 960px;
    margin: 0 0 clamp(40px, 5vw, 72px);
    font-weight: 400;
    color: var(--ink);
    text-wrap: balance;
}
.studio__info {
    max-width: var(--measure);
    color: var(--ink-80);
}
.studio__info p { margin: 0 0 10px; font-size: 16px; line-height: 1.55; }
.studio__info p:last-child { margin-bottom: 0; }
.studio__info a {
    color: var(--ink);
    border-bottom: 1px solid var(--ink-40);
    transition: color 220ms, border-color 220ms;
}
.studio__info a:hover { color: var(--accent); border-color: var(--accent); }
.studio__info em { color: var(--ink); font-style: italic; }

/* ========================================
   COLOPHON
   ======================================== */
.colophon {
    flex: 0 0 auto;
    padding: clamp(10px, 1vw, 16px) var(--frame-m);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 11px;
    letter-spacing: 0.01em;
    color: var(--ink-40);
    background: var(--outer);
    z-index: 40;
    position: relative;
}
.colophon a {
    color: var(--ink-60);
    transition: color 220ms ease;
}
.colophon a:hover { color: var(--accent); }
.colophon__credit { color: var(--ink-40); }
.colophon__heart {
    display: inline-block;
    color: var(--ink-60);
    margin: 0 1px;
    transform: translateY(1px);
    font-size: 12px;
}
@media (max-width: 720px) {
    .colophon { justify-content: center; text-align: center; }
}

/* ========================================
   REVEAL
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Ken-burns on hero */
@media (prefers-reduced-motion: no-preference) {
    .hero__image img {
        animation: ken-burns 22s ease-out both;
    }
    @keyframes ken-burns {
        from { transform: scale(1.08); }
        to   { transform: scale(1.00); }
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01s !important;
        animation-duration: 0.01s !important;
    }
    .reveal, .h-display > span { opacity: 1 !important; transform: none !important; }
}
