/* ============================================================
   DESIGN MANIFESTO — STYLESHEET
   A dark luxury aesthetic for a scroll-driven experience
   ============================================================ */

/* ─── Custom Properties ─── */
:root {
    --bg:            #0a0a0a;
    --bg-secondary:  #111111;
    --bg-card:       #141414;
    --text:          #f0ece2;
    --text-dim:      #8a8578;
    --accent:        #c8a97e;
    --accent-dim:    rgba(200, 169, 126, 0.25);
    --border:        rgba(240, 236, 226, 0.08);
    --border-accent: rgba(200, 169, 126, 0.2);

    --font-display:    'Clash Display', sans-serif;
    --font-serif:      'Zodiak', serif;
    --font-editorial:  'Gambetta', serif;
    --font-body:       'Satoshi', sans-serif;
    --font-accent:     'Gambarino', serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

/* ─── Film Grain Overlay ─── */
.noise {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ─── Preloader ─── */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.preloader-word {
    font-family: var(--font-serif);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
    opacity: 0.7;
}

.preloader-bar {
    width: 120px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-progress {
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform-origin: left;
    transform: scaleX(0);
}

/* ─── Loading State (hide content until animations init) ─── */
body.is-loading #main-content {
    visibility: hidden;
}

body.is-loading .preloader {
    visibility: visible;
}

/* ─── Sections ─── */
.section {
    position: relative;
}

/* ===================================================================
   HERO
   =================================================================== */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: clamp(150px, 28vw, 500px);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(240, 236, 226, 0.03);
    letter-spacing: -0.04em;
    user-select: none;
    pointer-events: none;
    line-height: 1;
}

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

.hero-overline {
    margin-bottom: clamp(12px, 2vw, 24px);
    overflow: hidden;
}

.hero-overline-text {
    display: inline-block;
    font-family: var(--font-body);
    font-size: clamp(11px, 1.2vw, 16px);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(72px, 15vw, 280px);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin-bottom: clamp(16px, 3vw, 40px);
    overflow: hidden;
}

.hero-title .char {
    display: inline-block;
    will-change: transform, opacity;
}

.hero-subtitle {
    max-width: 560px;
    margin: 0 auto;
}

.hero-subtitle p {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.3vw, 18px);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-dim);
}

.hero-subtitle .word {
    display: inline-block;
    margin-right: 0.25em;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: clamp(24px, 4vh, 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.scroll-indicator span {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 400;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

/* ===================================================================
   PHILOSOPHY — Horizontal Scroll
   =================================================================== */
.philosophy {
    overflow: hidden;
}

.philosophy-track {
    display: flex;
    align-items: center;
    height: 100vh;
    gap: 8vw;
    padding: 0 10vw;
    will-change: transform;
}

.philosophy-panel {
    flex-shrink: 0;
    width: clamp(320px, 65vw, 900px);
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 3vh, 32px);
}

.philosophy-number {
    font-family: var(--font-display);
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--accent);
    display: block;
}

.philosophy-heading {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 72px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.philosophy-text {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-dim);
    max-width: 600px;
}

/* ===================================================================
   PRINCIPLES
   =================================================================== */
.principles {
    padding: clamp(100px, 15vh, 200px) 0;
}

.principles-header {
    text-align: center;
    margin-bottom: clamp(60px, 10vh, 120px);
}

.principles-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 100px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: clamp(12px, 2vh, 24px);
    overflow: hidden;
}

.principles-title .char {
    display: inline-block;
    will-change: transform;
}

.principles-subtitle {
    font-family: var(--font-editorial);
    font-size: clamp(14px, 1.4vw, 20px);
    font-weight: 400;
    font-style: italic;
    color: var(--text-dim);
}

.principles-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 32px);
}

.principle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(28px, 3vw, 48px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    will-change: transform, opacity;
    transition: border-color 0.5s ease, background-color 0.5s ease;
}

.principle-card:hover {
    border-color: var(--border-accent);
    background-color: #181818;
}

.principle-number {
    font-family: var(--font-serif);
    font-size: clamp(48px, 5vw, 80px);
    font-weight: 600;
    color: var(--accent-dim);
    line-height: 1;
}

.principle-name {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 600;
    letter-spacing: 0.15em;
}

.principle-divider {
    width: 40px;
    height: 1px;
    background: var(--accent);
    opacity: 0.4;
}

.principle-desc {
    font-family: var(--font-body);
    font-size: clamp(13px, 1.1vw, 16px);
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-dim);
}

/* ===================================================================
   SHOWCASE — Typography in Motion
   =================================================================== */
.showcase {
    padding: clamp(80px, 12vh, 180px) 0;
    overflow: hidden;
}

.showcase-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 4vh, 48px);
    padding: 0 clamp(16px, 3vw, 40px);
}

.showcase-row {
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 60px);
    white-space: nowrap;
    will-change: transform;
}

.showcase-word {
    font-size: clamp(48px, 10vw, 160px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    will-change: transform, opacity;
}

.showcase-word.font-zodiak  { font-family: var(--font-serif); }
.showcase-word.font-clash   { font-family: var(--font-display); font-weight: 600; }
.showcase-word.font-gambetta{ font-family: var(--font-editorial); }
.showcase-word.font-gambarino{ font-family: var(--font-accent); }
.showcase-word.italic       { font-style: italic; }

.showcase-dot {
    width: clamp(6px, 0.8vw, 12px);
    height: clamp(6px, 0.8vw, 12px);
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.showcase-caption {
    margin-top: clamp(24px, 4vh, 60px);
    text-align: center;
}

.showcase-caption p {
    font-family: var(--font-editorial);
    font-size: clamp(14px, 1.3vw, 20px);
    font-weight: 400;
    font-style: italic;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ===================================================================
   MANIFESTO — Word-by-Word Reveal
   =================================================================== */
.manifesto {
    padding: clamp(120px, 18vh, 250px) 0;
}

.manifesto .container {
    max-width: 1000px;
}

.manifesto-label {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: clamp(32px, 5vh, 64px);
}

.manifesto-text {
    font-family: var(--font-serif);
    font-size: clamp(22px, 3.5vw, 52px);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.manifesto-text .word {
    display: inline-block;
    margin-right: 0.2em;
    will-change: opacity;
    transition: color 0.3s ease;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
    padding: clamp(80px, 10vh, 160px) 0 clamp(40px, 5vh, 80px);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(16px, 2vh, 24px);
}

.footer-line {
    width: 60px;
    height: 1px;
    background: var(--accent);
    opacity: 0.4;
    margin-bottom: clamp(16px, 3vh, 32px);
}

.footer-quote {
    font-family: var(--font-editorial);
    font-size: clamp(16px, 2vw, 28px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    max-width: 640px;
    color: var(--text);
    border: none;
}

.footer-cite {
    font-family: var(--font-body);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-style: normal;
}

.footer-bottom {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: clamp(40px, 6vh, 80px);
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.footer-tagline {
    font-style: italic;
    font-family: var(--font-editorial);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
    .principles-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .principles-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px;
        margin: 0 auto;
    }

    .philosophy-panel {
        width: 85vw;
    }

    .showcase-row {
        gap: 12px;
    }

    .showcase-word {
        font-size: clamp(32px, 10vw, 72px);
    }

    .manifesto-text {
        line-height: 1.5;
    }

    .hero-subtitle {
        padding: 0 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(56px, 20vw, 120px);
    }

    .philosophy-heading {
        font-size: clamp(28px, 8vw, 48px);
    }

    .showcase-word {
        font-size: clamp(24px, 11vw, 56px);
    }

    .showcase-row {
        gap: 8px;
    }

    .manifesto-text {
        font-size: clamp(18px, 5vw, 28px);
        line-height: 1.55;
    }

    .principle-card {
        padding: 24px;
    }
}
