/* ============================================
   THE GABS REVIEW - A Journal of Value & Estimation
   Victorian-era Critical Journal Design System
   ============================================ */

/* CSS Custom Properties - Color System */
:root {
    --parchment: #F4EDE4;
    --foxed-vellum: #EDE4D8;
    --lamp-black: #2A1A1A;
    --dark-umber: #3A2E28;
    --warm-greystone: #6B5B4F;
    --dried-claret: #6B3A3A;
    --oxidized-copper: #8B7355;
    --sienna-press: #A0522D;
    --binding-leather: #1E1218;

    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
    --font-annotation: 'EB Garamond', Garamond, serif;
    --font-mono: 'Courier Prime', 'Courier New', monospace;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--parchment);
    color: var(--dark-umber);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    line-height: 1.78;
    font-weight: 400;
    position: relative;
    overflow-x: hidden;
}

/* Paper Texture via SVG Filter */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
}

.paper-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: rgba(244, 237, 228, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    border-bottom: 1px solid var(--oxidized-copper);
}

.nav-bar.visible {
    opacity: 1;
    pointer-events: auto;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--lamp-black);
    font-variant: small-caps;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-annotation);
    font-size: 0.9rem;
    color: var(--warm-greystone);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--dried-claret);
    transition: width 0.3s ease-out, left 0.3s ease-out;
}

.nav-link:hover {
    color: var(--dried-claret);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ============================================
   MASTHEAD
   ============================================ */

.masthead {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--parchment);
    position: relative;
}

.masthead-content {
    text-align: center;
    padding: 2rem;
}

.masthead-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: var(--lamp-black);
    opacity: 0;
    transition: opacity 600ms ease;
    margin-right: -0.35em; /* compensate for letter-spacing */
}

.masthead-title.visible {
    opacity: 1;
}

.masthead-divider {
    margin: 2rem auto;
    max-width: 500px;
}

.masthead-divider .ornament-svg {
    overflow: visible;
}

.masthead-divider .ornament-line-left,
.masthead-divider .ornament-line-right {
    stroke-dasharray: 270;
    stroke-dashoffset: 270;
    transition: stroke-dashoffset 800ms ease;
}

.masthead-divider.animate .ornament-line-left,
.masthead-divider.animate .ornament-line-right {
    stroke-dashoffset: 0;
}

.masthead-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--warm-greystone);
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 400ms ease;
}

.masthead-subtitle.visible {
    opacity: 1;
}

/* ============================================
   ORNAMENTAL ELEMENTS
   ============================================ */

.ornament-divider {
    text-align: center;
    margin: 1.5rem 0;
}

.ornament-svg {
    width: 100%;
    max-width: 500px;
    height: 24px;
}

.ornament-svg.ornament-small {
    max-width: 350px;
    height: 12px;
}

.section-separator {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-separator .ornament-svg {
    max-width: 100%;
}

/* Rosette hover rotation */
.rosette {
    transition: transform 0.1s ease;
    transform-origin: center;
}

.ornament-divider:hover .rosette,
.section-separator:hover .rosette {
    animation: rosetteSpin 3s linear infinite;
}

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

/* Correct transform-origin for translated rosettes */
.section-separator .rosette,
.masthead-divider .rosette {
    transform-origin: 0px 0px;
}

/* ============================================
   JOURNAL CONTENT
   ============================================ */

.journal-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Review Entry */
.review-entry {
    margin-bottom: 0;
}

.review-columns {
    display: grid;
    grid-template-columns: 62% 34%;
    gap: 4%;
}

.review-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--lamp-black);
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Drop Capitals */
.drop-cap {
    font-family: var(--font-display);
    font-size: 4.5rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.3rem;
    margin-top: 0.1rem;
    color: var(--dried-claret);
    transition: color 300ms ease;
}

.drop-cap:hover {
    color: var(--sienna-press);
}

.drop-cap.bordered {
    border: 1px solid var(--oxidized-copper);
    padding: 8px;
}

/* Review Text */
.review-text {
    margin-bottom: 1.4em;
    color: var(--dark-umber);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.review-text:not(.has-drop-cap) {
    text-indent: 1.5em;
}

.review-text em {
    font-style: italic;
    color: var(--dried-claret);
}

/* ============================================
   MARGINALIA
   ============================================ */

.marginalia {
    padding-top: 3rem;
}

.pull-quote {
    border-left: 3px solid var(--dried-claret);
    padding: 1rem 0 1rem 1.2rem;
    margin-bottom: 2rem;
    margin-left: -0.5rem;
}

.pull-quote p {
    font-family: var(--font-annotation);
    font-style: italic;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.6;
    color: var(--dark-umber);
}

.pull-quote cite {
    display: block;
    font-family: var(--font-annotation);
    font-style: normal;
    font-variant: small-caps;
    font-size: 0.85rem;
    color: var(--warm-greystone);
    margin-top: 0.5rem;
}

.annotation {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 1px solid var(--oxidized-copper);
}

.annotation p {
    font-family: var(--font-annotation);
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.6;
    color: var(--warm-greystone);
}

.annotation cite {
    display: block;
    font-family: var(--font-annotation);
    font-style: normal;
    font-variant: small-caps;
    font-size: 0.8rem;
    color: var(--oxidized-copper);
    margin-top: 0.4rem;
}

/* ============================================
   VERDICT PANELS
   ============================================ */

.verdict-panel {
    margin: 2.5rem 0;
}

.verdict-frame {
    position: relative;
    text-align: center;
    padding: 2.5rem 2rem;
    border: 1px solid var(--oxidized-copper);
    outline: 1px solid var(--oxidized-copper);
    outline-offset: 4px;
    background: var(--foxed-vellum);
    overflow: hidden;
}

/* Border draw animation */
.verdict-frame {
    clip-path: inset(0 100% 100% 0);
    transition: clip-path 600ms ease;
}

.verdict-panel.animated .verdict-frame {
    clip-path: inset(0 0 0 0);
}

.verdict-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    width: 120px;
    height: 120px;
    pointer-events: none;
}

.verdict-text {
    font-family: var(--font-body);
    font-variant: small-caps;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--warm-greystone);
    margin-bottom: 0.8rem;
    opacity: 0;
    transition: opacity 200ms ease 600ms;
}

.verdict-panel.animated .verdict-text {
    opacity: 1;
}

.verdict-score {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: var(--dried-claret);
    margin-bottom: 1rem;
    opacity: 0;
    transition: opacity 200ms ease 600ms;
}

.verdict-panel.animated .verdict-score {
    opacity: 1;
}

.score-number {
    font-weight: 400;
}

.score-suffix {
    font-size: 1.2rem;
    color: var(--warm-greystone);
}

.verdict-summary {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.6;
    color: var(--dark-umber);
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 200ms ease 600ms;
}

.verdict-panel.animated .verdict-summary {
    opacity: 1;
}

/* ============================================
   COLOPHON TRANSITION & FOOTER
   ============================================ */

.colophon-transition {
    height: 200px;
    background: linear-gradient(to bottom, var(--parchment), var(--binding-leather));
}

.colophon {
    background: var(--binding-leather);
    padding: 4rem 2rem;
    text-align: center;
}

.colophon-content {
    max-width: 600px;
    margin: 0 auto;
}

.printers-mark {
    margin-bottom: 2rem;
}

.printers-mark svg {
    display: inline-block;
}

.colophon-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--foxed-vellum);
    margin-bottom: 0.5rem;
    font-variant: small-caps;
}

.colophon-detail {
    font-family: var(--font-annotation);
    font-size: 0.95rem;
    color: var(--foxed-vellum);
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.colophon-ornament {
    text-align: center;
    margin: 1.5rem auto;
    max-width: 250px;
}

.colophon-ornament .ornament-svg {
    max-width: 100%;
    height: 12px;
}

.colophon-credits {
    font-family: var(--font-annotation);
    font-size: 0.85rem;
    color: var(--foxed-vellum);
    opacity: 0.6;
    margin-bottom: 0.3rem;
    font-variant: small-caps;
}

.colophon-korean {
    font-variant: normal;
    font-style: italic;
    margin-top: 1rem;
    font-size: 1rem;
    opacity: 0.7;
}

/* ============================================
   FADE REVEAL ANIMATION
   ============================================ */

.fade-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.fade-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Drop cap entrance - subtle scale */
.fade-reveal .drop-cap {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 400ms ease, transform 400ms ease, color 300ms ease;
}

.fade-reveal.revealed .drop-cap {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--dried-claret);
    text-decoration: none;
    position: relative;
}

a:not(.nav-link)::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--dried-claret);
    transition: width 0.3s ease-out, left 0.3s ease-out;
}

a:not(.nav-link):hover::after {
    width: 100%;
    left: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .review-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .marginalia {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
        border-top: 1px solid var(--oxidized-copper);
    }

    .pull-quote {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-inner {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .masthead-title {
        letter-spacing: 0.15em;
        margin-right: -0.15em;
    }

    .journal-content {
        padding: 2rem 1rem;
    }

    .drop-cap {
        font-size: 3.5rem;
    }

    .verdict-score {
        font-size: 2rem;
    }

    .section-separator {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .masthead-title {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
        letter-spacing: 0.1em;
        margin-right: -0.1em;
    }

    .drop-cap {
        font-size: 3rem;
        padding: 4px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .nav-bar,
    .paper-texture,
    .colophon-transition {
        display: none;
    }

    .masthead-title,
    .masthead-subtitle {
        opacity: 1;
    }

    .fade-reveal {
        opacity: 1;
        transform: none;
    }

    .verdict-frame {
        clip-path: none;
    }

    .verdict-text,
    .verdict-score,
    .verdict-summary {
        opacity: 1;
    }

    body {
        background: white;
    }

    .colophon {
        background: white;
        color: black;
    }

    .colophon-title,
    .colophon-detail,
    .colophon-credits,
    .colophon-korean {
        color: black;
    }
}
