/* ============================================
   STORIOGRAPHER.COM
   Street-style scholarly horizontal scroll
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --aurora-violet: #4a2a6a;
    --aurora-teal: #2a6a8a;
    --aurora-green: #4ade80;
    --marble-cream: #f0e8e0;
    --ink-black: #1a1a1a;
    --tag-pink: #e86090;
    --stone-gray: #8a8480;
    --scroll-position: 0;
}

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

html {
    overflow-y: hidden;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    color: var(--ink-black);
    background: var(--aurora-violet);
    height: 100%;
    overflow: hidden;
}

/* --- Aurora Gradient Backdrop --- */
.aurora-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(
        135deg,
        var(--aurora-violet) 0%,
        var(--aurora-teal) 50%,
        var(--aurora-green) 100%
    );
    background-size: 300% 300%;
    transition: background-position 0.3s ease;
}

/* --- Horizontal Canvas --- */
.horizontal-canvas {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--tag-pink) transparent;
}

.horizontal-canvas::-webkit-scrollbar {
    height: 6px;
}

.horizontal-canvas::-webkit-scrollbar-track {
    background: transparent;
}

.horizontal-canvas::-webkit-scrollbar-thumb {
    background: var(--tag-pink);
    border-radius: 3px;
}

/* --- Panel (Section) Base --- */
.panel {
    min-width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    padding: 40px;
}

/* --- Panel Border Animation --- */
.panel-border-anim {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    pointer-events: none;
}

.panel-border-anim::before,
.panel-border-anim::after {
    content: '';
    position: absolute;
    background: var(--tag-pink);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-border-anim::before {
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
}

.panel-border-anim::after {
    top: 0;
    right: 0;
    width: 2px;
    height: 0;
}

.panel.in-view .panel-border-anim::before {
    width: 100%;
}

.panel.in-view .panel-border-anim::after {
    height: 100%;
}

/* Extra pseudo-elements via a child span approach for the remaining two borders */
.panel-border-anim {
    overflow: visible;
}

/* --- Marble Card --- */
.marble-card {
    position: relative;
    background:
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 40px,
            rgba(138, 132, 128, 0.05) 40px,
            rgba(138, 132, 128, 0.05) 41px
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 60px,
            rgba(138, 132, 128, 0.03) 60px,
            rgba(138, 132, 128, 0.03) 61px
        ),
        var(--marble-cream);
    border: 2px solid var(--ink-black);
    padding: 60px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.panel.in-view .marble-card {
    opacity: 1;
    transform: translateY(0);
}

/* --- Art Nouveau SVG Curves --- */
.art-nouveau-curve {
    position: absolute;
    pointer-events: none;
}

.art-nouveau-curve path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 1.5s ease;
}

.panel.in-view .art-nouveau-curve path {
    stroke-dashoffset: 0;
}

.curve-top-left {
    top: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
}

.curve-bottom-right {
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
}

.curve-frame-left {
    left: -30px;
    top: 10%;
    width: 40px;
    height: 80%;
}

.curve-frame-right {
    right: -30px;
    top: 10%;
    width: 40px;
    height: 80%;
}

.curve-top-arch {
    top: -30px;
    left: 5%;
    width: 90%;
    height: 60px;
}

.curve-bottom-wave {
    bottom: -20px;
    left: 0;
    width: 100%;
    height: 50px;
}

.curve-closing-frame {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    opacity: 0.3;
}

/* --- Typography --- */
.title-main {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(32px, 6vw, 72px);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-black);
    text-align: center;
    margin-bottom: 16px;
}

.title-tagline {
    text-align: center;
    color: var(--tag-pink);
    font-size: clamp(18px, 2.5vw, 28px);
    margin-bottom: 0;
}

.display-font {
    font-family: 'Permanent Marker', cursive;
}

.section-heading {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(24px, 4vw, 48px);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-black);
    margin-bottom: 12px;
}

.accent-label {
    color: var(--tag-pink);
    font-size: clamp(14px, 1.8vw, 20px);
    margin-bottom: 28px;
}

.body-text {
    color: var(--ink-black);
    margin-bottom: 16px;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* --- Scroll Hint --- */
.scroll-hint {
    position: absolute;
    bottom: 50px;
    right: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--aurora-green);
    font-size: 14px;
    animation: pulseRight 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 40px;
    height: 20px;
}

@keyframes pulseRight {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50% { transform: translateX(10px); opacity: 1; }
}

/* --- Hero Card --- */
.marble-card-hero {
    text-align: center;
    padding: 80px 60px;
}

/* --- Method Grid --- */
.method-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 8px;
}

.method-item {
    position: relative;
    padding-left: 60px;
}

.method-number {
    position: absolute;
    left: 0;
    top: -4px;
    font-size: 36px;
    color: var(--tag-pink);
    opacity: 0.6;
}

.method-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    color: var(--aurora-violet);
}

/* --- Archive Entries --- */
.archive-entries {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 8px;
}

.archive-entry {
    position: relative;
    padding-left: 100px;
    border-left: 2px solid var(--stone-gray);
}

.archive-date {
    position: absolute;
    left: 12px;
    top: 2px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--stone-gray);
    letter-spacing: 0.05em;
}

.archive-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--aurora-teal);
    margin-bottom: 6px;
}

/* --- Pull Quote --- */
.pull-quote {
    position: relative;
    margin: 20px 0 28px 0;
    padding: 20px 30px;
    border-left: 3px solid var(--tag-pink);
}

.quote-mark {
    font-size: 48px;
    color: var(--tag-pink);
    line-height: 1;
    opacity: 0.5;
}

.quote-mark-end {
    text-align: right;
    display: block;
}

.quote-text {
    font-family: 'Merriweather', Georgia, serif;
    font-style: italic;
    font-size: clamp(15px, 1.6vw, 19px);
    line-height: 1.9;
    color: var(--ink-black);
    margin: 8px 0;
}

/* --- Closing Panel --- */
.marble-card-closing {
    text-align: center;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.closing-title {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(28px, 5vw, 60px);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-black);
    margin-bottom: 12px;
}

.closing-subtitle {
    color: var(--tag-pink);
    font-size: clamp(16px, 2vw, 24px);
    margin-bottom: 24px;
}

.closing-text {
    max-width: 480px;
    text-align: center;
    margin-bottom: 32px;
}

.closing-sigil {
    width: 60px;
    height: 60px;
}

.closing-sigil svg {
    width: 100%;
    height: 100%;
}

/* --- Panel-specific Tweaks --- */
.panel-chronicle .marble-card {
    display: flex;
    align-items: center;
    gap: 0;
}

.panel-chronicle .card-content {
    padding: 0 20px;
}

/* --- Responsive (narrow viewports keep horizontal) --- */
@media (max-width: 768px) {
    .panel {
        padding: 24px;
    }

    .marble-card {
        padding: 36px 28px;
        max-width: 95%;
    }

    .marble-card-hero {
        padding: 48px 28px;
    }

    .method-item {
        padding-left: 48px;
    }

    .method-number {
        font-size: 28px;
    }

    .archive-entry {
        padding-left: 80px;
    }

    .scroll-hint {
        right: 30px;
        bottom: 30px;
    }

    .curve-frame-left,
    .curve-frame-right {
        display: none;
    }
}
