/* ============================================================
   iggi.dev - Skeuomorphic Design Language
   Full-Bleed Plate System with Material Textures
   ============================================================ */

/* ============================================================
   ROOT & TYPOGRAPHY
   ============================================================ */

:root {
    /* Color Palette */
    --color-brass-light: #D8D0C4;
    --color-brass-dark: #A0652A;
    --color-walnut: #8B8578;
    --color-leather: #6B4D0A;
    --color-leather-dark: #2A1F14;
    --color-gold: #8B6914;
    --color-glass: #2E8B6E;
    --color-bg-dark: #1C1C1E;
    --color-bg-darker: #1A1A3E;
    --color-bg-black: #0A0A0F;
    --color-accent: #0F0E17;

    /* Typography */
    --font-display: 'Rokkitt', serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-sans: 'Inter', sans-serif;
    --font-weight-regular: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing & Layout */
    --plate-height: 100vh;
    --bezel-height: 3rem;
    --transition-duration: 0.8s;
    --transition-easing: cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-black);
    color: var(--color-brass-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================================
   PLATE SYSTEM - FULL BLEED
   ============================================================ */

.plate {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 1px solid rgba(139, 133, 120, 0.15);
    border-bottom: 1px solid rgba(139, 133, 120, 0.15);
}

.plate-bezel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--bezel-height);
    background: linear-gradient(to bottom,
        rgba(216, 208, 196, 0.08) 0%,
        rgba(216, 208, 196, 0.02) 100%);
    border-bottom: 1px solid rgba(139, 133, 120, 0.2);
    z-index: 10;
}

.plate-content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--bezel-height) 4rem 2rem;
    text-align: center;
    z-index: 5;
}

/* ============================================================
   PLATE I - FRONTISPIECE (Hero Section)
   ============================================================ */

.plate-frontispiece {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(160, 101, 42, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(46, 139, 110, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #0A0A0F 0%, #1A1A3E 50%, #1C1C1E 100%);
    position: relative;
}

.plate-frontispiece::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(139, 133, 120, 0.02) 2px,
            rgba(139, 133, 120, 0.02) 4px),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(139, 133, 120, 0.02) 2px,
            rgba(139, 133, 120, 0.02) 4px);
    pointer-events: none;
    z-index: 1;
}

.orrery-svg-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin-bottom: 3rem;
    z-index: 2;
}

.orrery-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(160, 101, 42, 0.15));
}

.orbit {
    animation: spin-slow 60s linear infinite;
}

.orbit-1 {
    animation-duration: 80s;
    animation-direction: reverse;
}

.orbit-2 {
    animation-duration: 60s;
}

.orbit-3 {
    animation-duration: 40s;
    animation-direction: reverse;
}

.orbit-4 {
    animation-duration: 20s;
}

.sun {
    animation: pulse-glow 3s ease-in-out infinite;
}

.planet {
    animation: orbit-rotate 30s linear infinite;
}

.planet-1 {
    animation-duration: 45s;
}

.planet-2 {
    animation-duration: 60s;
}

.planet-3 {
    animation-duration: 35s;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% {
        r: 6;
        filter: drop-shadow(0 0 4px rgba(160, 101, 42, 0.4));
    }
    50% {
        r: 8;
        filter: drop-shadow(0 0 12px rgba(160, 101, 42, 0.8));
    }
}

@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--color-brass-light);
    margin: 2rem 0 1rem;
    text-shadow: 0 4px 20px rgba(160, 101, 42, 0.2);
    z-index: 2;
    position: relative;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.15em;
    color: var(--color-gold);
    margin-bottom: 3rem;
    opacity: 0.8;
    z-index: 2;
    position: relative;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 4rem;
    position: relative;
    z-index: 2;
    animation: bounce-down 2s ease-in-out infinite;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--color-brass-light);
    opacity: 0.6;
}

.scroll-line {
    width: 1px;
    height: 2rem;
    background: linear-gradient(to bottom,
        var(--color-brass-light),
        transparent);
}

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

/* ============================================================
   PLATE II - MECHANISM (Grid of Cards)
   ============================================================ */

.plate-mechanism {
    background:
        linear-gradient(180deg,
            rgba(139, 133, 120, 0.03) 0%,
            transparent 40%,
            rgba(42, 31, 20, 0.05) 100%),
        linear-gradient(135deg, #1C1C1E 0%, #1A1A3E 100%);
    position: relative;
}

.plate-mechanism::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(160, 101, 42, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(46, 139, 110, 0.02) 0%, transparent 40%);
    pointer-events: none;
}

.engraved-border {
    position: absolute;
    inset: 4rem 2rem;
    border: 1px solid rgba(139, 133, 120, 0.25);
    border-radius: 2px;
    pointer-events: none;
}

.plate-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.04em;
    color: var(--color-brass-light);
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.mechanism-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.mechanism-card {
    background:
        radial-gradient(ellipse at top left,
            rgba(216, 208, 196, 0.05) 0%,
            transparent 50%),
        linear-gradient(135deg,
            rgba(42, 31, 20, 0.3) 0%,
            rgba(26, 26, 62, 0.2) 100%);
    border: 1px solid rgba(139, 133, 120, 0.2);
    border-radius: 1px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.6s var(--transition-easing);
    position: relative;
    overflow: hidden;
}

.mechanism-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg,
            transparent,
            transparent 1px,
            rgba(139, 133, 120, 0.02) 1px,
            rgba(139, 133, 120, 0.02) 2px);
    pointer-events: none;
}

.mechanism-card:hover {
    border-color: rgba(160, 101, 42, 0.5);
    background:
        radial-gradient(ellipse at top left,
            rgba(216, 208, 196, 0.08) 0%,
            transparent 50%),
        linear-gradient(135deg,
            rgba(42, 31, 20, 0.4) 0%,
            rgba(26, 26, 62, 0.3) 100%);
    box-shadow: 0 0 20px rgba(160, 101, 42, 0.15),
                inset 0 0 20px rgba(216, 208, 196, 0.02);
}

.card-dial {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dial-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(160, 101, 42, 0.2));
}

.dial-hand {
    animation: dial-sweep 4s ease-in-out infinite;
    transform-origin: 50px 50px;
}

@keyframes dial-sweep {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

.mechanism-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.03em;
    color: var(--color-brass-light);
    margin-bottom: 0.75rem;
}

.card-text {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-brass-light);
    opacity: 0.85;
    line-height: 1.7;
}

/* ============================================================
   PLATE III - OBSERVATORY (Two-Column Layout)
   ============================================================ */

.plate-observatory {
    background:
        linear-gradient(180deg,
            rgba(42, 31, 20, 0.08) 0%,
            transparent 50%,
            rgba(46, 139, 110, 0.05) 100%),
        linear-gradient(135deg, #1A1A3E 0%, #1C1C1E 100%);
    position: relative;
}

.observatory-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    align-items: center;
    position: relative;
    z-index: 2;
}

.telescope-column {
    display: flex;
    justify-content: center;
    align-items: center;
}

.telescope-svg {
    width: 100%;
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(160, 101, 42, 0.2));
}

.observation-notes {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.note-entry {
    text-align: left;
    padding-left: 2rem;
    border-left: 2px solid rgba(139, 133, 120, 0.3);
    opacity: 0.8;
    transition: all 0.6s var(--transition-easing);
    position: relative;
}

.note-entry:hover {
    opacity: 1;
    border-left-color: var(--color-brass-dark);
    padding-left: 2.5rem;
}

.note-number {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-gold);
    margin-right: 0.5rem;
}

.note-entry p {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-brass-light);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .observatory-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .note-entry {
        text-align: center;
        border-left: none;
        border-top: 2px solid rgba(139, 133, 120, 0.3);
        padding-left: 0;
        padding-top: 1.5rem;
    }

    .note-entry:hover {
        border-top-color: var(--color-brass-dark);
        padding-left: 0;
    }
}

/* ============================================================
   PLATE IV - LIBRARY (Book Shelf)
   ============================================================ */

.plate-library {
    background:
        linear-gradient(180deg,
            rgba(26, 26, 62, 0.1) 0%,
            transparent 50%),
        linear-gradient(135deg, #1C1C1E 0%, #1A1A3E 100%);
    position: relative;
}

.library-shelves {
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.shelf-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.book-spine {
    height: 12rem;
    width: var(--spine-width);
    background: var(--spine-color);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem 0.5rem;
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.2),
        inset -1px 0 0 rgba(0, 0, 0, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.4s var(--transition-easing);
    position: relative;
    overflow: hidden;
}

.book-spine::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.08) 3px,
            rgba(0, 0, 0, 0.08) 6px);
    pointer-events: none;
}

.book-spine:hover {
    transform: translateY(-4px) scaleX(1.05);
    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.3),
        inset -1px 0 0 rgba(0, 0, 0, 0.6),
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 0 12px rgba(216, 208, 196, 0.15);
}

.spine-title {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: var(--font-weight-semibold);
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.shelf-divider {
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(139, 133, 120, 0.2),
        transparent);
    margin: 1rem 0;
}

.library-quote {
    margin-top: 3rem;
    padding: 2rem;
    border-top: 1px solid rgba(139, 133, 120, 0.2);
    border-bottom: 1px solid rgba(139, 133, 120, 0.2);
    position: relative;
    z-index: 2;
}

blockquote {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: var(--font-weight-regular);
    letter-spacing: 0.02em;
    color: var(--color-brass-light);
    font-style: italic;
    line-height: 1.8;
}

/* ============================================================
   PLATE V - COLOPHON (Closing)
   ============================================================ */

.plate-colophon {
    background:
        radial-gradient(ellipse at 50% 50%,
            rgba(160, 101, 42, 0.08) 0%,
            transparent 60%),
        linear-gradient(180deg, #1A1A3E 0%, #1C1C1E 100%);
    position: relative;
}

.colophon-ornament {
    width: 100%;
    max-width: 400px;
    height: 60px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ornament-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 6px rgba(160, 101, 42, 0.15));
}

.colophon-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    color: var(--color-brass-light);
    margin-bottom: 1.5rem;
}

.colophon-text {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--color-brass-light);
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.colophon-mark {
    margin-top: 2rem;
}

.mark-symbol {
    font-size: 2rem;
    color: var(--color-gold);
    opacity: 0.6;
    display: inline-block;
    animation: pulse-symbol 3s ease-in-out infinite;
}

@keyframes pulse-symbol {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ============================================================
   MATERIAL TEXTURE & GLASS EFFECT
   ============================================================ */

.glass-effect {
    background: rgba(216, 208, 196, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(216, 208, 196, 0.15);
    border-radius: 2px;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 1024px) {
    .plate-content {
        padding: var(--bezel-height) 2rem 1rem;
    }

    .mechanism-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mechanism-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --bezel-height: 2.5rem;
    }

    .plate-content {
        padding: var(--bezel-height) 1.5rem 1rem;
    }

    .orrery-svg-container {
        max-width: 300px;
        margin-bottom: 2rem;
    }

    .hero-title {
        margin: 1rem 0 0.5rem;
    }

    .hero-subtitle {
        margin-bottom: 2rem;
    }

    .scroll-indicator {
        margin-top: 2rem;
    }

    .plate-heading {
        margin-bottom: 2rem;
    }

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

    .card-dial {
        width: 100px;
        height: 100px;
    }

    .shelf-row {
        gap: 0.25rem;
    }

    .book-spine {
        height: 10rem;
        width: var(--spine-width);
        padding: 0.75rem 0.35rem;
    }

    blockquote {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .plate-bezel {
        height: 2rem;
    }

    .hero-title {
        margin-bottom: 0.5rem;
    }

    .scroll-indicator {
        margin-top: 1.5rem;
    }

    .mechanism-card {
        padding: 1rem;
    }

    .card-dial {
        width: 80px;
        height: 80px;
        margin-bottom: 1rem;
    }

    .mechanism-card h3 {
        font-size: 1.2rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .shelf-row {
        gap: 0.2rem;
    }

    .book-spine {
        height: 8rem;
        width: calc(var(--spine-width) * 0.8);
    }

    .colophon-text {
        font-size: 0.9rem;
    }
}
