/* ============================================
   ppuzzl.in — Dark Academia + Translucent Frost
   Colors: #0d0b08, #1a1510, #2d2015, #4a3020,
           #c9a227, #c4857a, #f5edd6
   Fonts: Playfair Display, EB Garamond, Old Standard TT
   ============================================ */

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

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

body {
    background-color: #0d0b08;
    color: #f5edd6;
    font-family: 'EB Garamond', 'Georgia', serif;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* --- Texture Background --- */
#texture-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(74, 48, 32, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(196, 133, 122, 0.05) 0%, transparent 50%);
}

/* --- Paper Noise Overlay --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Geometric Ornaments (floating background) --- */
#geometric-ornaments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.ornament {
    position: absolute;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.ornament-compass {
    width: 250px;
    height: 250px;
    top: 5%;
    right: 8%;
    animation: drift-slow 30s ease-in-out infinite;
}

.ornament-arcs {
    width: 200px;
    height: 200px;
    bottom: 15%;
    left: 5%;
    animation: drift-slow 25s ease-in-out infinite reverse;
}

.ornament-grid {
    width: 180px;
    height: 180px;
    top: 45%;
    left: 60%;
    animation: drift-slow 35s ease-in-out infinite;
}

@keyframes drift-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -15px) rotate(2deg); }
    50% { transform: translate(-5px, 10px) rotate(-1deg); }
    75% { transform: translate(8px, 5px) rotate(1.5deg); }
}

/* --- Frost Panel --- */
.frost-panel {
    background: rgba(245, 237, 214, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 162, 39, 0.12);
    border-radius: 2px;
}

/* --- Typography --- */
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-weight: 900;
    font-style: italic;
    color: #f5edd6;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 0.3em;
    font-variation-settings: 'wght' 900;
    transition: font-variation-settings 0.4s ease;
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #f5edd6;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-bottom: 0.4em;
    font-variation-settings: 'wght' 700;
    transition: font-variation-settings 0.4s ease;
}

.label-small {
    font-family: 'Old Standard TT', serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: #c9a227;
    display: block;
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: rgba(245, 237, 214, 0.8);
    line-height: 1.8;
    margin-bottom: 1.2em;
}

.display-accent {
    font-family: 'Old Standard TT', serif;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-style: italic;
    color: #c9a227;
    letter-spacing: 0.05em;
}

.vertical-text {
    font-family: 'Old Standard TT', serif;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(201, 162, 39, 0.4);
    position: sticky;
    top: 50%;
}

/* --- Ruled Line --- */
.ruled-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, #c9a227, rgba(201, 162, 39, 0.1));
    margin: 1rem 0 1.5rem;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1.618fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-panel {
    padding: 3rem;
}

.hero-subtitle {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: rgba(245, 237, 214, 0.7);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: 'EB Garamond', serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    color: rgba(245, 237, 214, 0.55);
    font-style: italic;
    line-height: 1.7;
}

.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.collage-circle {
    width: 280px;
    height: 280px;
    animation: spin-very-slow 120s linear infinite;
}

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

.collage-quote {
    padding: 1.5rem 2rem;
    max-width: 320px;
    transform: rotate(-2deg);
}

.collage-quote blockquote {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-style: italic;
    color: rgba(245, 237, 214, 0.75);
    margin-bottom: 0.5rem;
}

.collage-quote cite {
    font-family: 'Old Standard TT', serif;
    font-size: 0.8rem;
    color: #c4857a;
    font-style: normal;
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.scroll-indicator span {
    font-family: 'Old Standard TT', serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #c9a227;
}

.scroll-indicator:hover {
    opacity: 0.9;
}

.scroll-indicator svg {
    animation: bob 2s ease-in-out infinite;
}

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

/* --- Asymmetric Sections --- */
.section-asymmetric {
    position: relative;
    z-index: 2;
    padding: 6rem 4rem;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1.618fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-asymmetric.reverse .section-grid {
    grid-template-columns: 1.618fr 1fr;
}

.col-narrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 1rem;
}

.col-wide {
    padding: 0 1rem;
}

/* --- About Section --- */
.about-panel {
    padding: 2.5rem 3rem;
    margin-bottom: 2rem;
}

.academic-ornament svg {
    width: 40px;
    height: 160px;
}

/* --- Mixed Media Block --- */
.mixed-media-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    position: relative;
    margin-top: 1rem;
}

.texture-swatch {
    height: 120px;
    border-radius: 2px;
    border: 1px solid rgba(201, 162, 39, 0.1);
}

.leather-texture {
    background: linear-gradient(135deg, #2d2015 0%, #4a3020 50%, #2d2015 100%);
    background-size: 200% 200%;
}

.parchment-texture {
    background: linear-gradient(135deg, rgba(245, 237, 214, 0.08) 0%, rgba(245, 237, 214, 0.03) 50%, rgba(245, 237, 214, 0.06) 100%);
}

.texture-overlay-text {
    position: absolute;
    bottom: -2rem;
    right: 0;
    text-align: right;
}

/* --- Discipline Cards --- */
.discipline-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.discipline-card {
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    cursor: default;
}

.discipline-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 162, 39, 0.3);
    background: rgba(245, 237, 214, 0.09);
}

.card-number {
    font-family: 'Old Standard TT', serif;
    font-size: 2rem;
    color: #c9a227;
    opacity: 0.5;
    margin-bottom: 0.8rem;
}

.discipline-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #f5edd6;
    margin-bottom: 0.6rem;
}

.discipline-card p {
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    color: rgba(245, 237, 214, 0.6);
    line-height: 1.6;
}

.geometric-stack {
    margin-top: 2rem;
}

.geometric-stack svg {
    width: 80px;
    height: 300px;
}

/* --- Manifesto Section --- */
#manifesto {
    position: relative;
    z-index: 2;
    padding: 8rem 4rem;
}

.manifesto-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.manifesto-bg-ornament {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
}

.manifesto-bg-ornament svg {
    width: 100%;
    height: 100%;
}

.manifesto-panel {
    padding: 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.manifesto-panel .ruled-line {
    margin: 1rem auto 2rem;
}

.manifesto-heading {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.manifesto-text {
    margin-top: 1rem;
}

.manifesto-line {
    font-family: 'EB Garamond', serif;
    font-size: clamp(1.15rem, 1.5vw, 1.4rem);
    color: rgba(245, 237, 214, 0.75);
    line-height: 2;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.manifesto-line.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Archive Section --- */
.archive-entries {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.archive-entry {
    padding: 2rem 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.archive-entry:hover {
    transform: translateX(8px);
    border-color: rgba(201, 162, 39, 0.25);
    background: rgba(245, 237, 214, 0.08);
}

.entry-date {
    font-family: 'Old Standard TT', serif;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: #c4857a;
    margin-bottom: 0.6rem;
}

.entry-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #f5edd6;
    margin-bottom: 0.5rem;
}

.entry-excerpt {
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    color: rgba(245, 237, 214, 0.6);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.entry-link {
    font-family: 'Old Standard TT', serif;
    font-size: 0.85rem;
    color: #c9a227;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.archive-entry:hover .entry-link {
    color: #f5edd6;
}

/* --- Footer --- */
#footer {
    position: relative;
    z-index: 2;
    padding: 6rem 4rem 3rem;
}

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

.footer-ornament {
    margin-bottom: 3rem;
}

.footer-ornament svg {
    width: 300px;
    height: 45px;
}

.footer-panel {
    padding: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #f5edd6;
    margin-bottom: 0.8rem;
}

.footer-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.05rem;
    color: rgba(245, 237, 214, 0.6);
    margin-bottom: 2rem;
}

.footer-form {
    display: flex;
    gap: 0;
    max-width: 450px;
    margin: 0 auto;
}

.footer-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(245, 237, 214, 0.05);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-right: none;
    border-radius: 2px 0 0 2px;
    color: #f5edd6;
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.footer-input::placeholder {
    color: rgba(245, 237, 214, 0.3);
}

.footer-input:focus {
    border-color: rgba(201, 162, 39, 0.5);
    background: rgba(245, 237, 214, 0.08);
}

.footer-button {
    padding: 0.8rem 2rem;
    background: rgba(201, 162, 39, 0.15);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 0 2px 2px 0;
    color: #c9a227;
    font-family: 'Old Standard TT', serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.footer-button:hover {
    background: rgba(201, 162, 39, 0.3);
    color: #f5edd6;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(201, 162, 39, 0.08);
}

.footer-mark {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(245, 237, 214, 0.4);
}

.footer-year {
    font-family: 'Old Standard TT', serif;
    font-size: 0.8rem;
    color: rgba(201, 162, 39, 0.3);
    letter-spacing: 0.2em;
}

.footer-motto {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(196, 133, 122, 0.4);
}

/* --- Micro Interactions --- */
[data-micro] {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.3s ease;
}

[data-micro]:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .section-asymmetric.reverse .section-grid {
        grid-template-columns: 1fr;
    }

    .col-narrow {
        flex-direction: row;
        justify-content: flex-start;
        padding-top: 0;
    }

    .vertical-text {
        writing-mode: horizontal-tb;
    }

    #hero {
        padding: 3rem 2rem;
    }

    .section-asymmetric {
        padding: 4rem 2rem;
    }

    #manifesto {
        padding: 5rem 2rem;
    }

    #footer {
        padding: 4rem 2rem 2rem;
    }
}

@media (max-width: 768px) {
    .discipline-cards {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 2rem;
    }

    .manifesto-panel {
        padding: 2.5rem 2rem;
    }

    .collage-circle {
        width: 200px;
        height: 200px;
    }

    .footer-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-input {
        border-right: 1px solid rgba(201, 162, 39, 0.2);
        border-radius: 2px;
    }

    .footer-button {
        border-radius: 2px;
    }

    .mixed-media-block {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.8rem;
    }

    .ornament-compass {
        width: 150px;
        height: 150px;
    }

    .ornament-arcs {
        width: 120px;
        height: 120px;
    }

    .ornament-grid {
        width: 100px;
        height: 100px;
    }
}

/* --- Selection color --- */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #f5edd6;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0d0b08;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 162, 39, 0.4);
}
