/* ============================================================
   rational.love — Cinematic Monochrome Film Strip
   Palette: strict monochrome based on 35mm photography
   Fonts: Bebas Neue (display) + Outfit (body)
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --near-black: #0f0f0f;
    --dark-charcoal: #161616;
    --lifted-dark: #1e1e1e;
    --deep-bg: #1a1a1a;
    --mid-dark: #2a2a2a;
    --charcoal-2: #303030;
    --neutral-gray: #505050;
    --silver-gray: #9a9a9a;
    --lighter-silver: #b0b0b0;
    --near-light: #c8c8c8;
    --paper-white: #f4f0eb;
    --pure-white: #ffffff;

    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--near-black);
    color: var(--paper-white);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------- Fixed Header ---------- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, border-color 0.4s ease;
}

#site-header.scrolled {
    background: #0f0f0f;
    border-bottom-color: #252525;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-wordmark {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.05em;
    color: var(--paper-white);
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    gap: 36px;
}

.header-nav a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--silver-gray);
    transition: color 0.25s ease;
}

.header-nav a:hover {
    color: var(--paper-white);
}

/* ---------- Scenes (Film Strip sections) ---------- */
.scene {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ---------- Scene 1 — Hero / Fade In ---------- */
.scene-hero {
    min-height: 100vh;
    background-color: var(--near-black);
    display: flex;
    align-items: center;
    padding: 60px 48px 60px 10vw;
}

.hero-bg-motif {
    position: absolute;
    width: 70vw;
    right: -10vw;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    pointer-events: none;
}

.rotating-motif {
    width: 100%;
    height: auto;
    animation: rotateSlow 200s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    animation: heroBreathe 3s ease-out both;
}

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

.hero-wordmark {
    font-family: var(--font-display);
    font-size: clamp(60px, 8vw, 96px);
    letter-spacing: 0.05em;
    color: var(--paper-white);
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 18px;
    font-style: italic;
    color: var(--silver-gray);
    letter-spacing: 0.02em;
}

/* ---------- Scene 2 — The Statement ---------- */
.scene-statement {
    min-height: 90vh;
    background-color: var(--lifted-dark);
    display: flex;
    align-items: center;
    padding: 60px 48px;
    gap: 0;
}

.statement-left {
    width: 50%;
    padding-right: 48px;
    padding-left: 6vw;
}

.statement-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--neutral-gray);
    margin-bottom: 24px;
}

.statement-heading {
    font-family: var(--font-display);
    font-size: clamp(40px, 5.5vw, 64px);
    line-height: 0.95;
    color: var(--paper-white);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.statement-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: var(--near-light);
    max-width: 480px;
}

.statement-right {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-heart {
    width: min(280px, 40vw);
    height: auto;
}

/* ---------- Scene 3 — Content Grid ---------- */
.scene-grid {
    min-height: 90vh;
    background-color: var(--dark-charcoal);
    /* Diagonal grid background lines */
    background-image: repeating-linear-gradient(
        15deg,
        transparent,
        transparent 40px,
        #1f1f1f 40px,
        #1f1f1f 41px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    max-width: 900px;
    width: 100%;
}

.grid-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icon-feature {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.grid-heading {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 0.04em;
    color: var(--paper-white);
    text-transform: uppercase;
    line-height: 1;
}

.grid-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    color: var(--near-light);
}

/* ---------- Scene 4 — Morph Sequence ---------- */
.scene-morph {
    min-height: 100vh;
    background-color: var(--near-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.morph-shape {
    width: min(60vw, 500px);
    aspect-ratio: 1;
    background-color: var(--mid-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: morphShape 8s ease-in-out infinite;
}

@keyframes morphShape {
    0%   { clip-path: circle(50%); }
    25%  { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
    50%  { clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); }
    75%  { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
    100% { clip-path: circle(50%); }
}

.morph-text {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: 0.06em;
    color: var(--paper-white);
    text-transform: uppercase;
    text-align: center;
    line-height: 1.1;
    pointer-events: none;
    user-select: none;
}

/* ---------- Scene 5 — Details ---------- */
.scene-details {
    min-height: 90vh;
    background-color: var(--deep-bg);
    display: flex;
    align-items: center;
    padding: 60px 48px;
    gap: 0;
}

.details-left {
    width: 60%;
    padding-right: 64px;
    padding-left: 6vw;
}

.details-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--neutral-gray);
    margin-bottom: 20px;
}

.details-heading {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: 0.04em;
    color: var(--paper-white);
    text-transform: uppercase;
    line-height: 1.0;
    margin-bottom: 28px;
}

.details-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--lighter-silver);
    margin-bottom: 20px;
    max-width: 520px;
}

.details-right {
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: flex-start;
}

.icon-badge {
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.icon-badge.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Badge shape containers */
.badge-diamond svg,
.badge-hexagon svg,
.badge-triangle svg {
    position: relative;
    z-index: 1;
}

/* Diamond badge wrapper */
.badge-diamond {
    position: relative;
}

.badge-diamond::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 52px;
    height: 52px;
    border: 1px solid var(--neutral-gray);
    background: transparent;
}

/* Hexagon badge wrapper */
.badge-hexagon {
    position: relative;
}

.badge-hexagon::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 48px;
    background: transparent;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border: none;
    box-shadow: inset 0 0 0 1px var(--neutral-gray);
}

/* Triangle badge wrapper */
.badge-triangle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 48px;
    background: transparent;
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    box-shadow: inset 0 0 0 1px var(--neutral-gray);
}

.badge-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--silver-gray);
    padding-left: 62px;
}

/* When badge has both an SVG and a label, position properly */
.icon-badge {
    flex-wrap: wrap;
    position: relative;
    min-height: 60px;
}

.icon-badge svg {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
}

/* ---------- Scene 6 — Closing Frame ---------- */
.scene-closing {
    min-height: 100vh;
    background-color: var(--near-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.closing-rule-top,
.closing-rule-bottom {
    width: 320px;
    height: 1px;
    background-color: var(--charcoal-2);
}

.closing-wordmark {
    font-family: var(--font-display);
    font-size: clamp(64px, 10vw, 120px);
    letter-spacing: 0.05em;
    color: var(--paper-white);
    text-transform: uppercase;
    line-height: 1;
}

.closing-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    font-style: italic;
    color: var(--silver-gray);
    letter-spacing: 0.04em;
}

/* ---------- Path-Draw Animation ---------- */
/* SVGs with draw-icon class will have paths animated on scroll entry */
.draw-icon {
    transition: opacity 0.3s ease;
}

/* Animated paths via stroke-dashoffset in JS */
.draw-icon path,
.draw-icon polygon,
.draw-icon circle,
.draw-icon line,
.draw-icon rect {
    transition: stroke-dashoffset 1.2s ease;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    .header-inner {
        padding: 16px 24px;
    }

    .header-nav {
        gap: 20px;
    }

    .scene-hero {
        padding: 80px 24px 60px;
        justify-content: center;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-bg-motif {
        width: 120vw;
        right: -30vw;
        opacity: 0.2;
    }

    .scene-statement {
        flex-direction: column;
        padding: 80px 24px 60px;
        gap: 48px;
        align-items: flex-start;
    }

    .statement-left {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    .statement-right {
        width: 100%;
        justify-content: flex-start;
    }

    .scene-grid {
        padding: 60px 24px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .scene-details {
        flex-direction: column;
        padding: 80px 24px 60px;
        gap: 48px;
        align-items: flex-start;
    }

    .details-left {
        width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    .details-right {
        width: 100%;
    }

    .badge-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
