/* ============================================
   infra.limited - Styles
   Surreal editorial-flow, high-contrast,
   star-celestial, bebas-bold display
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: #FAFAF8;
    color: #0A0A0A;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    line-height: 1.9;
    font-size: clamp(16px, 1.15vw, 18px);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    letter-spacing: 0.06em;
}

.space-mono {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
}

/* ============================================
   HERO SECTION - Split Black/White
   ============================================ */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-upper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: #FAFAF8;
    z-index: 1;
}

.hero-lower {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: #0A0A0A;
    z-index: 1;
}

/* Logotype straddling the boundary */
.logotype {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(48px, 8vw, 120px);
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logotype.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.logo-upper {
    color: #0A0A0A;
    display: block;
    position: relative;
    z-index: 2;
}

.logo-lower {
    color: #FAFAF8;
    display: block;
    position: relative;
    z-index: 2;
    margin-top: -0.15em;
}

.hero-tagline {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 600ms ease 1200ms;
}

.hero-tagline.visible {
    opacity: 1;
}

.tagline-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #A0B0C0;
}

/* Surreal collage */
.surreal-collage {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 300px;
    z-index: 2;
}

.collage-shape {
    position: absolute;
    opacity: 0;
    transition: opacity 500ms ease, transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.collage-shape.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

.shape-1 {
    top: 0;
    left: 20px;
    transform: translateX(-50px);
}

.shape-2 {
    top: 40px;
    right: 20px;
    transform: translateY(-50px);
}

.shape-3 {
    top: 60px;
    left: 50%;
    margin-left: -70px;
    transform: translateX(50px);
}

.shape-4 {
    top: 100px;
    left: 40px;
    transform: translateY(50px);
}

.shape-5 {
    top: 20px;
    right: 60px;
    transform: translateX(-30px) translateY(-30px);
}

/* Stars in collage */
.collage-star {
    position: absolute;
    opacity: 0;
    transition: opacity 200ms ease;
}

.collage-star.visible {
    opacity: 1;
}

.star-1 {
    top: 10px;
    right: 30px;
}

.star-2 {
    top: 140px;
    left: 10px;
}

.star-3 {
    bottom: 30px;
    right: 80px;
}

.crescent-1 {
    bottom: 50px;
    left: 60px;
}

/* ============================================
   EDITORIAL SECTION
   ============================================ */
.editorial {
    background: #FAFAF8;
    padding: 120px 20px 100px;
    position: relative;
}

.editorial-column {
    max-width: 60ch;
    margin: 0 auto;
    position: relative;
}

.editorial-element {
    margin-bottom: 2.5em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.editorial-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.editorial-body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    line-height: 1.9;
    font-size: clamp(16px, 1.15vw, 18px);
    color: #0A0A0A;
}

/* Pull quotes */
.pull-quote {
    margin: 3em -10%;
    padding: 1.5em 0;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 500ms ease, transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pull-quote.visible {
    opacity: 1;
    transform: translateX(0);
}

.pull-quote blockquote {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 52px);
    letter-spacing: 0.04em;
    line-height: 1.15;
    color: #0A0A0A;
}

/* Margin decorations */
.margin-decoration {
    position: absolute;
    opacity: 0;
    transition: opacity 400ms ease, transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.margin-decoration.visible {
    opacity: 1;
    transform: translateX(0) !important;
}

.margin-left {
    left: -80px;
    transform: translateX(-30px);
}

.margin-right {
    right: -70px;
    transform: translateX(30px);
}

/* ============================================
   CONSTELLATION SECTION (Dark)
   ============================================ */
.constellation {
    background: #0A0A0A;
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
}

.constellation-field {
    position: relative;
    width: 100%;
    height: 100%;
}

.const-star {
    position: absolute;
    transition: opacity 300ms ease;
    pointer-events: none;
}

.orbital-path {
    position: absolute;
    pointer-events: none;
}

.infra-term {
    position: absolute;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 2vw, 22px);
    letter-spacing: 0.12em;
    color: #FAFAF8;
    opacity: 0.15;
    transition: opacity 300ms ease, color 300ms ease;
    pointer-events: none;
    user-select: none;
}

/* ============================================
   CASE STUDIES SECTION
   ============================================ */
.case-studies {
    background: #FAFAF8;
    padding: 120px 20px 100px;
}

.case-study {
    max-width: 60ch;
    margin: 0 auto 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.case-study.visible {
    opacity: 1;
    transform: translateY(0);
}

.case-study:last-child {
    margin-bottom: 0;
}

.case-header {
    margin-bottom: 2em;
    position: relative;
}

.case-illustration {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 1.5em;
}

.case-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(32px, 5vw, 56px);
    letter-spacing: 0.06em;
    line-height: 1.1;
    color: #4060A0;
    margin-bottom: 0.3em;
}

.case-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6A6A6A;
}

.case-body {
    margin-top: 1.5em;
}

.case-body .editorial-body {
    color: #0A0A0A;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #0A0A0A;
    padding: 60px 20px 40px;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-nav {
    margin-bottom: 2em;
}

.footer-link {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: #FAFAF8;
    text-decoration: none;
    margin: 0 1.5em;
    transition: color 200ms ease;
}

.footer-link:hover {
    color: #D4A060;
}

.footer-brand {
    margin-bottom: 1.5em;
}

.footer-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 0.06em;
    color: #FAFAF8;
}

.footer-ornament {
    margin-bottom: 1.5em;
    display: flex;
    justify-content: center;
}

.footer-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 14px;
    color: #6A6A6A;
    letter-spacing: 0.02em;
}

/* ============================================
   STAGGER HIGHLIGHT
   ============================================ */
.stagger-item.highlight {
    background-color: #E0D0B0;
    transition: background-color 800ms ease;
}

/* ============================================
   ANIMATIONS (Keyframes)
   ============================================ */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.logotype.visible {
    animation: fadeInScale 800ms ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .surreal-collage {
        width: 260px;
        height: 220px;
    }

    .pull-quote {
        margin: 2em -5%;
    }

    .margin-decoration {
        display: none;
    }

    .editorial {
        padding: 80px 20px 60px;
    }

    .case-studies {
        padding: 80px 20px 60px;
    }

    .footer-link {
        margin: 0 0.8em;
        font-size: 16px;
    }

    .constellation {
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    .surreal-collage {
        width: 200px;
        height: 180px;
    }

    .collage-shape {
        transform: scale(0.7);
    }

    .pull-quote blockquote {
        font-size: clamp(22px, 6vw, 36px);
    }

    .footer-nav {
        display: flex;
        flex-direction: column;
        gap: 0.5em;
    }

    .footer-link {
        margin: 0;
    }
}
