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

:root {
    --dark-bg: #0d0b0f;
    --dark-surface: #1a1520;
    --cream: #f2e8d5;
    --cream-light: #ede5d9;
    --lavender: #b8a9c4;
    --rose: #d4a89c;
    --muted: #6b5f6d;
    --gold: #c9a54e;
    --skew-angle: -4deg;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--dark-bg);
    color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    line-height: 1.7;
}

/* Geometric Fragments */
.geo-fragments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.geo-fragment {
    position: absolute;
    opacity: 0.08;
    transition: transform 8s ease-out;
}

.geo-fragment--circle {
    border-radius: 50%;
    border: 2px solid var(--lavender);
}

.geo-fragment--triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid var(--rose);
}

.geo-fragment--line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Diagonal Sections */
.diagonal-section {
    position: relative;
    padding: 12rem 2rem 10rem;
    transform: skewY(var(--skew-angle));
    margin-top: -6rem;
    z-index: 2;
}

.diagonal-section:first-of-type {
    margin-top: 0;
    padding-top: 15rem;
}

.section-content {
    transform: skewY(calc(var(--skew-angle) * -1));
    max-width: 900px;
    margin: 0 auto;
}

/* Section Themes */
.section-dark {
    background: var(--dark-surface);
}

.section-cream {
    background: var(--cream);
    color: var(--dark-surface);
}

.section-cream .article-number {
    color: var(--muted);
}

.section-cream h2 {
    color: var(--dark-surface);
}

.section-cream .body-text {
    color: var(--dark-surface);
}

/* Typography */
h1, h2 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0.02em;
}

h2 {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 7rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--lavender);
    max-width: 600px;
    margin-bottom: 3rem;
}

.article-number {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--cream-light);
    margin-bottom: 2rem;
}

.section-cream .body-text {
    color: #3a3040;
}

/* Decree Stamp */
.decree-stamp {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 0.5rem 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: var(--gold);
    animation: pulseDown 2s ease-in-out infinite;
}

@keyframes pulseDown {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* Blockquote */
.decree-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--muted);
    border-left: 3px solid var(--gold);
    padding-left: 1.5rem;
    margin: 2.5rem 0;
}

.decree-quote cite {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--rose);
    margin-top: 0.8rem;
}

/* Timeline */
.timeline {
    margin-top: 2rem;
}

.timeline-entry {
    display: flex;
    gap: 2rem;
    align-items: baseline;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(184, 169, 196, 0.15);
}

.timeline-year {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gold);
    min-width: 80px;
}

.timeline-entry p {
    font-family: 'Lora', serif;
    font-size: 1rem;
    color: var(--cream-light);
    line-height: 1.6;
}

/* Mechanisms Grid */
.mechanisms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.mechanism-card {
    background: rgba(13, 11, 15, 0.05);
    border: 1px solid rgba(107, 95, 109, 0.2);
    padding: 2rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mechanism-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(13, 11, 15, 0.15);
}

.mechanism-card h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--dark-surface);
}

.mechanism-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Mechanism Icons */
.mechanism-icon {
    width: 40px;
    height: 40px;
}

.circle-icon {
    border-radius: 50%;
    border: 2px solid var(--rose);
}

.triangle-icon {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--lavender);
}

.hex-icon {
    width: 40px;
    height: 40px;
    background: var(--gold);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.lines-icon {
    width: 40px;
    height: 40px;
    background: repeating-linear-gradient(
        0deg,
        var(--muted),
        var(--muted) 2px,
        transparent 2px,
        transparent 8px
    );
}

/* Limits List */
.limits-list {
    margin-top: 2rem;
}

.limit-item {
    display: flex;
    gap: 1.5rem;
    align-items: baseline;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(184, 169, 196, 0.12);
}

.limit-number {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--gold);
    font-size: 1.1rem;
    min-width: 40px;
}

.limit-item p {
    font-family: 'Lora', serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--cream-light);
}

/* Gold Seal */
.gold-seal {
    width: 80px;
    height: 80px;
    margin: 3rem 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--gold), var(--rose), var(--gold), var(--lavender), var(--gold));
    opacity: 0.6;
    animation: rotateSeal 20s linear infinite;
}

@keyframes rotateSeal {
    to { transform: rotate(360deg); }
}

.closing-note {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--muted);
}

/* Reveal animations */
.diagonal-section {
    opacity: 0;
    transform: skewY(var(--skew-angle)) translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .diagonal-section {
        padding: 8rem 1.5rem 6rem;
    }

    .timeline-entry {
        flex-direction: column;
        gap: 0.5rem;
    }

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