/* sora.market - Swiss Diagonal / Sepia Nostalgic */

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

:root {
    --bg-primary: #FAF0E0;
    --bg-alt: #F0E4D0;
    --text-primary: #3A2E18;
    --text-body: #5A4A38;
    --accent: #B8860B;
    --ghost: #E8D8C0;
    --circuit: #8B7A60;
    --highlight: #D4A840;
    --grain: #C8B898;
    --dark: #2A1E10;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-body);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.75;
    overflow-x: hidden;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Shell Watermark */
.shell-watermark {
    position: fixed;
    bottom: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    pointer-events: none;
    z-index: 0;
}

/* Market Ticker */
.ticker {
    position: relative;
    width: 100%;
    height: 32px;
    background-color: var(--dark);
    overflow: hidden;
    z-index: 10;
}

.ticker--bottom {
    position: relative;
}

.ticker__track {
    display: flex;
    white-space: nowrap;
    animation: tickerScroll 30s linear infinite;
}

.ticker__text {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--highlight);
    line-height: 32px;
    padding-right: 3rem;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Diagonal Sections */
.diagonal-section {
    position: relative;
    padding: 100px 0;
    clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%);
    margin-top: -30px;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    z-index: 1;
}

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

.diagonal-section--primary {
    background-color: var(--bg-primary);
}

.diagonal-section--alt {
    background-color: var(--bg-alt);
}

.diagonal-section--central {
    padding: 140px 0;
}

.diagonal-section--compact {
    padding: 80px 0;
}

/* Diagonal Shadow */
.diagonal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(168deg, rgba(42, 30, 16, 0.08), transparent);
    pointer-events: none;
}

/* 12-Column Grid */
.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.section-content {
    position: relative;
    z-index: 2;
}

.section-content--large .body-text {
    font-size: 1.125rem;
    line-height: 2.0;
}

/* Typography */
.display-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 6vw, 6rem);
    color: var(--text-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.display-heading--statement {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.15;
}

.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--text-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-body);
    max-width: 560px;
}

.data-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--circuit);
    display: block;
    margin-bottom: 1rem;
}

/* Ghost Numbers */
.ghost-number {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 12rem;
    color: var(--ghost);
    opacity: 0.15;
    line-height: 1;
    pointer-events: none;
    z-index: 0;
    grid-column: 10 / 13;
}

.ghost-number--large {
    font-size: 20rem;
    opacity: 0.12;
}

/* Section Visuals */
.section-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.line-illustration {
    width: 200px;
    height: 200px;
}

.draw-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.diagonal-section.visible .draw-path {
    stroke-dashoffset: 0;
}

/* Circuit Lines */
.circuit-line {
    position: absolute;
    right: 25%;
    top: 0;
    width: 2px;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.circuit-line line {
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.diagonal-section.visible .circuit-line line {
    stroke-dashoffset: 0;
}

.circuit-node {
    opacity: 0;
    transition: opacity 0.4s ease 1s;
}

.diagonal-section.visible .circuit-node {
    opacity: 0.3;
}

/* Footer */
.footer-section {
    background-color: var(--dark);
    padding: 60px 24px;
    text-align: center;
}

.footer-domain {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.15em;
    color: var(--bg-primary);
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: 1fr;
    }

    .section-content,
    .section-visual {
        grid-column: 1 / -1 !important;
    }

    .ghost-number {
        font-size: 6rem;
        right: 12px;
        position: relative;
        grid-column: 1 / -1;
    }

    .ghost-number--large {
        font-size: 8rem;
    }

    .diagonal-section {
        clip-path: polygon(0 0, 100% 2%, 100% 100%, 0 98%);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.3s !important;
    }

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

    .draw-path {
        stroke-dashoffset: 0;
    }

    .ticker__track {
        animation: none;
    }
}
