/* ============================================
   Tube: Our Need for Imperfection
   slowglowfilms.com / tubethefilm.com — PRODUCTION

   Brand system locked 2026-05-03 (see brand-guide.md, decisions.md).

   Fonts:
     IBM Plex Serif — body + display title
     IBM Plex Mono  — nav, labels, captions ("field notation" voice)
     IBM Plex Sans  — available, used sparingly
   Palette tokens: --bg #0d0b09 / --text #e8ddd0 / --accent #c47a2a (see :root below)
   Logo: locked CSS-drawn soft-glow tube (see HERO TUBE section)
   ============================================ */


/* --- Custom Properties --- */

:root {
    --bg:             #0d0b09;
    --bg-elevated:    #141110;
    --text:           #e8ddd0;
    --text-secondary: #9a8d7f;
    --accent:         #c47a2a;
    --accent-glow:    rgba(196, 122, 42, 0.06);

    --font-sans:  'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    --font-mono:  'IBM Plex Mono', 'Menlo', 'Consolas', monospace;

    --measure:      660px;
    --measure-wide: 940px;
    --section-pad:  clamp(5rem, 10vw, 9rem);
}


/* --- Reset --- */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: clamp(17px, 1.15vw, 19px);
    line-height: 1.78;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

img {
    max-width: 100%;
    display: block;
}

section[id] {
    scroll-margin-top: 80px;
}


/* --- Links --- */

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}


/* --- Typography --- */

h2 {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

p + p {
    margin-top: 1.4rem;
}

.lede {
    font-size: clamp(20px, 2.4vw, 26px);
    line-height: 1.55;
    margin-bottom: 2rem;
}


/* --- Layout --- */

.section-inner {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 2rem;

    /* scroll reveal — starts hidden */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.section-inner.visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Filament --- */

.filament {
    width: 48px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto;
    opacity: 0.5;
}


/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.6rem 2.5rem;
    transition: background 0.4s ease, padding 0.4s ease;
}

.nav.scrolled {
    background: rgba(13, 11, 9, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2.5rem;
}

.nav-title {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.22em;
}

.nav-links {
    display: flex;
    gap: 2.2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}


/* ============================================
   HERO
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden; /* the 500px ::before glow must not widen the page on phones */
}

/* Subtle radial glow — the tube warming up */
.hero::before {
    content: '';
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-serif);
    font-weight: 300;
    font-size: clamp(60px, 12vw, 144px);
    letter-spacing: 0.02em;
    text-indent: 0;
    line-height: 1;
    margin-bottom: 0.8rem;

    opacity: 0;
    animation: fadeUp 2s ease 0.3s forwards;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(16px, 2.4vw, 23px);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;

    opacity: 0;
    animation: fadeUp 2s ease 0.7s forwards;
}

.hero .filament {
    margin-bottom: 2.5rem;

    opacity: 0;
    animation: filamentGrow 1.8s ease 1.1s forwards;
}

.hero-logline {
    font-family: var(--font-serif);
    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto;
    color: var(--text);

    opacity: 0;
    animation: fadeUp 2s ease 1.5s forwards;
}

.hero-credit {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);

    opacity: 0;
    animation: fadeUp 2s ease 2s forwards;
}


/* ============================================
   TRAILER
   ============================================ */

.trailer {
    padding: var(--section-pad) 0;
}

.trailer .section-inner {
    max-width: var(--measure-wide);
}

.trailer-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: var(--bg-elevated);
    border: 1px solid rgba(196, 122, 42, 0.08);
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.trailer-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
}

.trailer-play {
    font-size: 1.6rem;
    color: var(--accent);
    opacity: 0.3;
}

.trailer-placeholder p {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}


/* ============================================
   ABOUT
   ============================================ */

.about {
    padding: var(--section-pad) 0;
}


/* ============================================
   SOUND
   ============================================ */

.sound {
    padding: var(--section-pad) 0;
    background: var(--bg-elevated);
}

.sound .lede {
    font-style: italic;
}

.sound-tagline {
    margin-top: 2.2rem;
    font-style: italic;
    color: var(--text-secondary);
}


/* ============================================
   VISION
   ============================================ */

.vision {
    padding: var(--section-pad) 0;
}

.vision blockquote {
    border-left: 2px solid var(--accent);
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

.vision blockquote p {
    font-size: clamp(20px, 2.4vw, 26px);
    line-height: 1.55;
    font-style: italic;
}

.vision-thesis {
    margin-top: 2.5rem;
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--accent);
}


/* ============================================
   SCREENINGS
   ============================================ */

.screenings {
    padding: var(--section-pad) 0;
    background: var(--bg-elevated);
}

.screenings-inner {
    text-align: center;
}

.screenings-year {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(26px, 3.6vw, 42px);
    letter-spacing: 0.02em;
    line-height: 1.3;
    margin-bottom: 0.8rem;
}

.screenings-status {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}


/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 4rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: var(--measure);
    margin: 0 auto;
}

.footer .filament {
    margin-bottom: 2rem;
}

.footer-production {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.footer-contact {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-contact a {
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(154, 141, 127, 0.3);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.4;
}


/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes filamentGrow {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 0.5;
        transform: scaleX(1);
    }
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {

    .nav {
        padding: 1.2rem 1.5rem;
    }

    .nav.scrolled {
        padding: 0.8rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 11px;
    }

    .hero {
        padding: 5rem 1.5rem;
    }

    .hero-title {
        letter-spacing: 0.1em;
        text-indent: 0.1em;
    }

    .hero-logline {
        max-width: 420px;
    }

    .section-inner {
        padding: 0 1.5rem;
    }

    h2 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {

    .nav-links {
        gap: 1.2rem;
    }

    .nav-links a {
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    .hero {
        padding: 4rem 1.25rem;
    }

    .hero-title {
        letter-spacing: 0.08em;
        text-indent: 0.08em;
    }

    .section-inner {
        padding: 0 1.25rem;
    }

    .vision blockquote {
        padding-left: 1rem;
    }
}


/* --- Accessibility: reduced motion --- */

@media (prefers-reduced-motion: reduce) {

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .section-inner {
        opacity: 1;
        transform: none;
    }
}


/* ============================================
   HERO TUBE — locked logo (CSS soft-glow, log-midpoint outline)
   See brand-guide.md §4 and decisions.md (2026-05-03) for spec.
   ============================================ */

.hero-tube {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.5rem;

    opacity: 0;
    animation: fadeUp 2s ease 0.1s forwards;
}

.hero-tube .ht-glass {
    width: 90px;
    height: 210px;
    border: 1.5px solid rgba(196, 122, 42, 0.37);
    border-radius: 45px 45px 8px 8px;
    background: radial-gradient(ellipse at 50% 60%, rgba(196, 122, 42, 0.08) 0%, transparent 70%);
    position: relative;
}

.hero-tube .ht-glass::before {
    content: '';
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 110px;
    background: radial-gradient(ellipse, rgba(196, 122, 42, 0.4) 0%, rgba(196, 122, 42, 0.1) 50%, transparent 80%);
    border-radius: 50%;
}

.hero-tube .ht-plates {
    position: absolute;
    top: 28%;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 88px;
    border-left: 1px solid rgba(196, 122, 42, 0.23);
    border-right: 1px solid rgba(196, 122, 42, 0.23);
}

.hero-tube .ht-filament {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 72px;
    background: linear-gradient(to top, rgba(196, 122, 42, 0.95), rgba(255, 170, 70, 0.7), rgba(196, 122, 42, 0.3));
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(196, 122, 42, 0.6), 0 0 25px rgba(196, 122, 42, 0.25);
}

.hero-tube .ht-base {
    width: 64px;
    height: 32px;
    background: linear-gradient(to bottom, #1a1510, #0d0a08);
    border: 1px solid rgba(196, 122, 42, 0.23);
    border-radius: 3px 3px 6px 6px;
    margin-top: -2px;
    position: relative;
}

.hero-tube .ht-base::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        rgba(196, 122, 42, 0.41) 4px,
        rgba(196, 122, 42, 0.41) 6px,
        transparent 6px,
        transparent 10px
    );
}
