/* ===================================
   doublestandard.xyz - Styles
   Mid-century modern duality design
   =================================== */

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

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

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    color: #1A1A1A;
    background-color: #FAF5EE;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Progress Indicator --- */
.progress-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 3px;
    height: 0%;
    background: linear-gradient(to bottom, #FFDE59, #3DD6D0, #C3A6FF);
    z-index: 1000;
    transition: height 0.1s linear;
}

/* --- Sections --- */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    overflow: hidden;
}

/* --- Hero Section --- */
.section-hero {
    background-color: #FAF5EE;
    flex-direction: column;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.hero-left {
    position: relative;
    padding-left: 40px;
}

.starburst-motif {
    position: absolute;
    pointer-events: none;
}

#starburstHero {
    top: -60px;
    left: -20px;
    width: 160px;
    height: 160px;
    opacity: 0;
    transform: rotate(-15deg) scale(0.8);
    animation: starburstIn 1s ease-out 0.5s forwards;
}

@keyframes starburstIn {
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 96px);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #1A1A1A;
    position: relative;
    z-index: 2;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: titleSlide 0.8s ease-out forwards;
}

.title-line-1 {
    animation-delay: 0.2s;
}

.title-line-2 {
    color: #2B2B2B;
    animation-delay: 0.4s;
}

@keyframes titleSlide {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 24px);
    color: #6B6560;
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-right {
    position: relative;
}

.hero-shadow-block {
    position: relative;
    background-color: #2B2B2B;
    padding: 60px 40px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(40px);
    animation: shadowBlockIn 0.8s ease-out 0.6s forwards;
}

@keyframes shadowBlockIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.diagonal-slice {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FAF5EE 0%, #FAF5EE 15%, transparent 15.5%);
    pointer-events: none;
}

.shadow-text {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(20px, 3vw, 36px);
    color: #BFBFBF;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.scroll-cue {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

.scroll-cue-text {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #BFBFBF;
}

.scroll-cue-arrow {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* --- Duality Panels --- */
.section-duality {
    background-color: #FAF5EE;
    padding: 100px 40px;
}

.section-offset-right .duality-container {
    transform: translateX(5vw);
}

.section-offset-left .duality-container {
    transform: translateX(-5vw);
}

.duality-container {
    display: flex;
    max-width: 1100px;
    width: 100%;
    gap: 0;
    align-items: stretch;
}

.duality-panel {
    flex: 1;
    padding: 50px 40px;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.duality-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-warm {
    background-color: #FAF5EE;
    border-left: 4px solid #FF9F43;
}

.panel-cool {
    background-color: #1A1A1A;
    border-right: 4px solid #3DD6D0;
}

.panel-cool .panel-label {
    color: #3DD6D0;
}

.panel-cool .panel-title {
    color: #FAF5EE;
}

.panel-cool .panel-text {
    color: #BFBFBF;
}

.duality-gap {
    width: 3px;
    background-color: #2B2B2B;
    flex-shrink: 0;
}

.panel-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #FF9F43;
    margin-bottom: 16px;
    display: block;
}

.panel-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 4vw, 56px);
    color: #1A1A1A;
    margin-bottom: 20px;
    line-height: 1.1;
}

.panel-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.7;
    color: #6B6560;
}

.boomerang-motif {
    margin-top: 30px;
    width: 80px;
    opacity: 0.6;
}

.boomerang-svg {
    width: 100%;
    height: auto;
}

/* --- Split-Frame Sections --- */
.section-splitframe {
    background-color: #2B2B2B;
    padding: 100px 40px;
}

.splitframe-container {
    max-width: 1000px;
    width: 100%;
}

.splitframe-image {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.split-warm, .split-cool {
    flex: 1;
    overflow: hidden;
}

.split-warm {
    filter: sepia(0.15) saturate(0.85);
}

.split-cool {
    filter: contrast(1.2) hue-rotate(10deg) saturate(1.1);
}

.split-gap {
    width: 3px;
    background-color: #2B2B2B;
    flex-shrink: 0;
}

.placeholder-photo {
    width: 100%;
    aspect-ratio: 4/3;
}

.photo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.splitframe-caption {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: #BFBFBF;
    text-align: center;
    margin-top: 24px;
    letter-spacing: 0.05em;
}

.splitframe-reverse .splitframe-image {
    flex-direction: row-reverse;
}

/* --- Interstitial Sections --- */
.section-interstitial {
    background-color: #FAF5EE;
    min-height: 70vh;
    position: relative;
}

.section-interstitial-dark {
    background-color: #1A1A1A;
}

.interstitial-content {
    text-align: center;
    max-width: 800px;
    position: relative;
}

.starburst-interstitial {
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
}

.interstitial-quote {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-size: clamp(20px, 3.5vw, 40px);
    line-height: 1.4;
    color: #2B2B2B;
    padding: 0 20px;
}

.section-interstitial-dark .interstitial-quote {
    color: #FAF5EE;
}

.interstitial-quote-large {
    font-size: clamp(28px, 5vw, 64px);
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
}

.quote-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #FFDE59, #FF6B8A);
    margin: 30px auto 0;
}

/* --- Flip Cards --- */
.section-flipcards {
    background-color: #FAF5EE;
    flex-direction: column;
    padding: 100px 40px;
}

.flipcards-heading {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(24px, 4vw, 48px);
    color: #1A1A1A;
    text-align: center;
    margin-bottom: 12px;
}

.flipcards-subheading {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    color: #BFBFBF;
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 0.05em;
}

.flipcards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    width: 100%;
}

.flip-card {
    perspective: 1000px;
    height: 220px;
    cursor: pointer;
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #2B2B2B;
}

.flip-card-front {
    background-color: #FAF5EE;
}

.flip-prompt {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(18px, 2.5vw, 28px);
    color: #1A1A1A;
    text-align: center;
    padding: 20px;
}

.flip-card-back {
    background-color: #2B2B2B;
    transform: rotateY(180deg);
    flex-direction: column;
    padding: 24px;
    gap: 0;
}

.flip-back-warm, .flip-back-cool {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    padding: 12px;
    text-align: center;
}

.flip-back-warm {
    color: #FF9F43;
}

.flip-back-cool {
    color: #3DD6D0;
}

.flip-back-divider {
    width: 60%;
    height: 2px;
    background-color: #6B6560;
    margin: 0 auto;
    flex-shrink: 0;
}

.flip-label {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    margin-right: 6px;
}

/* --- Closing Section --- */
.section-closing {
    background-color: #1A1A1A;
    flex-direction: column;
    text-align: center;
    min-height: 100vh;
}

.closing-content {
    position: relative;
    max-width: 800px;
}

.starburst-closing {
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
}

.closing-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 64px);
    color: #FAF5EE;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
}

.closing-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #FF9F43, #FF6B8A, #3DD6D0);
    margin: 0 auto 40px;
}

.closing-text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(16px, 2vw, 22px);
    color: #BFBFBF;
    line-height: 1.7;
    margin-bottom: 40px;
}

.closing-cta {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(20px, 3vw, 36px);
    color: #FFDE59;
    margin-bottom: 60px;
}

.closing-domain {
    display: inline-block;
    border: 1px solid #5C5C5C;
    padding: 12px 30px;
}

.domain-text {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #BFBFBF;
    letter-spacing: 0.1em;
}

/* --- Fault Line Overlay --- */
.fault-line-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
    opacity: 0.06;
    background: linear-gradient(
        to bottom right,
        transparent 0%,
        transparent calc(15% - 1px),
        #2B2B2B calc(15%),
        #2B2B2B calc(15% + 1px),
        transparent calc(15% + 2px),
        transparent 100%
    );
    mix-blend-mode: multiply;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section {
        padding: 60px 20px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-left {
        padding-left: 0;
    }

    #starburstHero {
        top: -40px;
        left: -10px;
        width: 100px;
    }

    .duality-container {
        flex-direction: column;
    }

    .duality-gap {
        width: 100%;
        height: 3px;
    }

    .section-offset-right .duality-container,
    .section-offset-left .duality-container {
        transform: none;
    }

    .splitframe-image {
        flex-direction: column;
    }

    .splitframe-reverse .splitframe-image {
        flex-direction: column-reverse;
    }

    .split-gap {
        width: 100%;
        height: 3px;
    }

    .flipcards-grid {
        grid-template-columns: 1fr;
    }

    .flip-card {
        height: 180px;
    }

    .starburst-closing {
        width: 200px;
        height: 200px;
    }
}

/* --- Scroll Reveal Utility --- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
