/* ===== CSS Reset & Variables ===== */

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

:root {
    /* Colors */
    --color-midnight: #0F0A07;
    --color-umber: #1C140D;
    --color-teal: #00C9A7;
    --color-violet: #7B2FBE;
    --color-rose: #E84D8A;
    --color-gold: #C9A84C;
    --color-cream: #F2E8D5;
    --color-mahogany: #2A1A0E;
    --color-brass: #8A7A5A;
    --color-green: #00E5A0;
    --color-magenta: #C850C0;

    /* Gradients */
    --gradient-aurora: linear-gradient(110deg, #00E5A0, #00C9A7, #7B2FBE, #C850C0);
    --gradient-gaslight: radial-gradient(ellipse at 50% 40%, rgba(201,168,76,0.08) 0%, transparent 60%);

    /* Typography */
    --font-display: "Playfair Display", serif;
    --font-accent: "Abril Fatface", serif;
    --font-body: "Lora", serif;
    --font-mono: "Inconsolata", monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-midnight);
    color: var(--color-cream);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* ===== Background & Page Structure ===== */

.page-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22200%22 height=%22200%22%3E%3Cfilter id=%22noise%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.9%22 numOctaves=%221%22 result=%22noise%22 /%3E%3C/filter%3E%3Crect width=%22200%22 height=%22200%22 filter=%22url(%23noise)%22 opacity=%220.03%22/%3E%3C/svg%3E');
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

/* ===== Margin Rules (Vertical Borders) ===== */

body::after {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2240%22 height=%22120%22%3E%3Cline x1=%2220%22 y1=%220%22 x2=%2220%22 y2=%22120%22 stroke=%22%23C9A84C%22 stroke-width=%221%22 opacity=%220.3%22/%3E%3Ccircle cx=%2220%22 cy=%2260%22 r=%226%22 fill=%22none%22 stroke=%22%23C9A84C%22 stroke-width=%221%22 opacity=%220.3%22/%3E%3C/svg%3E');
    background-repeat: repeat-y;
    background-position: 0 0;
    pointer-events: none;
    z-index: 10;
}

/* ===== Hero Section ===== */

.section {
    position: relative;
    width: 100%;
    z-index: 2;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-midnight);
    background-image: var(--gradient-gaslight);
    overflow: hidden;
}

.aurora-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-aurora);
    background-size: 200% 100%;
    animation: auroraShift 12s ease-in-out infinite;
    box-shadow: 0 0 120px 40px rgba(0,201,167,0.04);
}

@keyframes auroraShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 3;
    padding: 2rem;
}

.hero-title-block {
    margin-bottom: 3rem;
}

.site-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    color: var(--color-gold);
    letter-spacing: 0.06em;
    text-transform: lowercase;
    margin-bottom: 1.5rem;
    animation: fadeInDown 1.5s ease-out;
}

.hero-tagline {
    font-family: var(--font-accent);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--color-teal);
    font-weight: 400;
    letter-spacing: 0.02em;
    animation: fadeInUp 1.8s ease-out 0.3s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Ornament (Discus Fish) */

.hero-ornament {
    margin: 3rem 0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 2s ease-out 0.6s backwards;
}

.discus-ornament {
    width: 180px;
    height: 180px;
    animation: floatRotate 30s linear infinite, shimmerPulse 3s ease-in-out infinite;
}

@keyframes floatRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shimmerPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Scroll Indicator */

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    animation: drawLine 1.5s ease-out;
}

@keyframes drawLine {
    from {
        height: 0;
    }
    to {
        height: 40px;
    }
}

.scroll-chevron {
    width: 24px;
    height: 24px;
    animation: bounce 2s ease-in-out infinite;
}

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

/* ===== Section Dividers ===== */

.section-divider {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    background: transparent;
    animation: fadeInScale 0.8s ease-out;
    animation-fill-mode: both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== Content Sections ===== */

.content-section {
    min-height: 80vh;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-midnight);
    position: relative;
}

.content-section:nth-child(odd) {
    background-color: var(--color-umber);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.folio-number {
    font-family: var(--font-accent);
    font-size: 5rem;
    color: var(--color-gold);
    opacity: 0.15;
    transition: all 0.3s ease;
}

.section-header:hover .folio-number {
    opacity: 1;
    color: var(--color-teal);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    color: var(--color-gold);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    flex: 1;
    padding: 0 2rem;
    border-left: 1px solid var(--color-gold);
    border-right: 1px solid var(--color-gold);
    border-left-opacity: 0.3;
    border-right-opacity: 0.3;
}

.editorial-content {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.editorial-content p {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    margin-bottom: 1.75rem;
    text-align: justify;
    animation: fadeInUp 1.2s ease-out;
}

/* Pull Quote Styling */

.pull-quote {
    font-family: var(--font-accent);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--color-cream);
    padding-left: 3rem;
    margin: 3rem 0;
    position: relative;
    border-left: 3px solid;
    border-image: var(--gradient-aurora) 1;
    font-style: italic;
    animation: fadeInLeft 1.2s ease-out;
}

.pull-quote .betta-ornament {
    position: absolute;
    right: -35px;
    bottom: 0;
    width: 28px;
    height: 28px;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Footer ===== */

.footer {
    background-color: var(--color-mahogany);
    border-top: 1px solid var(--color-gold);
    border-top-opacity: 0.3;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-content {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.lionfish-ornament {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.footer-text {
    text-align: left;
}

.footer-tagline {
    font-family: var(--font-accent);
    font-size: 1.4rem;
    color: var(--color-teal);
    margin-bottom: 0.5rem;
}

.footer-metadata {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-brass);
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.footer-note {
    font-size: 0.95rem;
    color: var(--color-cream);
    opacity: 0.7;
}

/* ===== Ambient Fish ===== */

.ambient-fish {
    position: fixed;
    right: 3vw;
    opacity: 0.2;
    z-index: 5;
    animation: drift 30s ease-in-out infinite;
}

.ambient-fish:nth-child(1) {
    width: 50px;
    animation-duration: 28s;
    animation-delay: 0s;
}

.ambient-fish:nth-child(2) {
    width: 45px;
    right: 5vw;
    animation-duration: 35s;
    animation-delay: -5s;
}

.ambient-fish:nth-child(3) {
    width: 55px;
    right: 2vw;
    animation-duration: 32s;
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translateY(110vh) rotate(-5deg);
    }
    50% {
        transform: translateY(50vh) rotate(5deg);
    }
    100% {
        transform: translateY(-10vh) rotate(-5deg);
    }
}

/* Hide ambient fish on smaller screens */
@media (max-width: 1024px) {
    .ambient-fish {
        display: none;
    }
}

/* ===== Skeleton Loading ===== */

.skeleton {
    background-color: var(--color-umber);
    border-radius: 4px;
    animation: skeletonShimmer 2s infinite;
}

@keyframes skeletonShimmer {
    0% {
        background: linear-gradient(90deg, var(--color-umber) 0%, var(--color-brass) 20%, var(--color-umber) 40%);
        background-position: -1000px 0;
    }
    100% {
        background: linear-gradient(90deg, var(--color-umber) 0%, var(--color-brass) 20%, var(--color-umber) 40%);
        background-position: 1000px 0;
    }
}

.skeleton-heading {
    width: 60%;
    height: 2.5rem;
    margin-bottom: 1.5rem;
}

.skeleton-line {
    width: 100%;
    height: 1rem;
    margin-bottom: 0.75rem;
}

.skeleton-line:nth-last-child(1) {
    width: 40%;
}

/* ===== Responsive Design ===== */

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .section-title {
        border-left: none;
        border-right: none;
        padding: 0;
    }

    .folio-number {
        font-size: 3rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-text {
        text-align: center;
    }

    .pull-quote {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-ornament {
        height: 120px;
    }

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

    .content-section {
        padding: 3rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .editorial-content p {
        font-size: 1rem;
        text-align: left;
    }

    .pull-quote {
        font-size: 1.2rem;
        padding-left: 1rem;
    }
}

/* ===== Accessibility & Print ===== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .aurora-bar,
    .scroll-indicator,
    .ambient-fish {
        display: none;
    }

    body::after {
        display: none;
    }
}
