/* ============================================
   foryou.reviews - Dark Academia Design System
   Colors: #6B4226, #D4C4AE, #1A0F06, #2D7A6F, #3D2B1A, #A89274, #0F3D3A, #C49B2A, #F2E8D9, #E8D5B8, #C44040, #8B6B4A
   Fonts: Playfair Display, Cormorant Garamond, Inter
   ============================================ */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: #1A0F06;
    color: #F2E8D9;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: default;
}

/* --- Reading Progress Bar --- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000;
    background: rgba(26, 15, 6, 0.5);
}

.reading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #C49B2A, #8B6B4A);
    transition: width 0.15s ease-out;
}

/* --- Marginalia Navigation --- */
.marginalia-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.marginalia-nav.visible {
    opacity: 1;
}

.marginalia-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #A89274;
    transition: color 0.3s ease, transform 0.3s ease;
}

.marginalia-link:hover,
.marginalia-link.active {
    color: #C49B2A;
    transform: translateX(-4px);
}

.marginalia-numeral {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.marginalia-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 10px;
    font-style: italic;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.marginalia-link:hover .marginalia-label,
.marginalia-link.active .marginalia-label {
    opacity: 1;
    transform: translateX(0);
}

/* --- Candlelight Ambient Layer --- */
.candlelight-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 800;
    background: radial-gradient(ellipse 600px 400px at 20% 30%, rgba(196, 155, 42, 0.03), transparent),
                radial-gradient(ellipse 400px 300px at 80% 70%, rgba(196, 155, 42, 0.02), transparent);
    animation: candleFlicker 8s ease-in-out infinite alternate;
}

@keyframes candleFlicker {
    0% { opacity: 0.6; }
    25% { opacity: 0.8; }
    50% { opacity: 0.5; }
    75% { opacity: 0.9; }
    100% { opacity: 0.7; }
}

/* --- Folio Base --- */
.folio {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    scroll-snap-align: start;
    overflow: hidden;
}

.folio-dark {
    background: #1A0F06;
    color: #F2E8D9;
}

.folio-light {
    background: #F2E8D9;
    color: #1A0F06;
}

.folio-bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.folio-dark .folio-bg-texture {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 120px, rgba(196, 155, 42, 0.015) 120px, rgba(196, 155, 42, 0.015) 121px),
        repeating-linear-gradient(90deg, transparent, transparent 120px, rgba(196, 155, 42, 0.01) 120px, rgba(196, 155, 42, 0.01) 121px);
}

.folio-light .folio-bg-texture {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 100px, rgba(61, 43, 26, 0.04) 100px, rgba(61, 43, 26, 0.04) 101px),
        repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(61, 43, 26, 0.03) 100px, rgba(61, 43, 26, 0.03) 101px);
    opacity: 0.6;
}

.folio-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 90%;
    padding: 60px 0;
    text-align: center;
}

/* --- Marginalia Annotations --- */
.marginalia-annotation {
    position: absolute;
    z-index: 15;
    max-width: 200px;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.marginalia-annotation.visible {
    opacity: 1;
}

.marginalia-right {
    right: 40px;
    top: 65%;
    transform: rotate(2deg) translateX(20px);
}

.marginalia-right.visible {
    transform: rotate(2deg) translateX(0);
}

.marginalia-left {
    left: 40px;
    top: 60%;
    transform: rotate(-1.5deg) translateX(-20px);
}

.marginalia-left.visible {
    transform: rotate(-1.5deg) translateX(0);
}

.marginalia-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 13px;
    line-height: 1.5;
    color: #A89274;
    display: block;
    padding: 8px 12px;
    border-left: 1px solid rgba(196, 155, 42, 0.3);
}

.folio-light .marginalia-text {
    color: #8B6B4A;
    border-left-color: rgba(107, 66, 38, 0.3);
}

/* --- FOLIO I: Hero --- */
.wax-seal-hero:hover .seal-svg circle:first-child {
    fill: #8B2020;
    transition: fill 0.4s ease;
}

.wax-seal-hero {
    margin: 0 auto 40px;
    width: 100px;
    height: 100px;
    animation: sealPulse 4s ease-in-out infinite;
}

@keyframes sealPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(196, 64, 64, 0.3)); }
    50% { transform: scale(1.03); filter: drop-shadow(0 0 16px rgba(196, 64, 64, 0.5)); }
}

.seal-svg {
    width: 100%;
    height: 100%;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(42px, 6vw, 80px);
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 28px;
    color: #F2E8D9;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: titleReveal 0.8s ease forwards;
}

.title-line-1 { animation-delay: 0.3s; }
.title-line-2 { animation-delay: 0.6s; }
.title-line-3 { animation-delay: 0.9s; }

@keyframes titleReveal {
    to { opacity: 1; transform: translateY(0); }
}

.hero-divider {
    width: 200px;
    margin: 0 auto 24px;
}

.divider-svg {
    width: 100%;
    height: 20px;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 20px;
    color: #A89274;
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeIn 1s ease 1.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1s ease 1.8s forwards, floatDown 2s ease-in-out 2.5s infinite;
}

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

.scroll-text {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #A89274;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
}

/* --- FOLIO II: Philosophy --- */
.folio-header {
    margin-bottom: 60px;
}

.folio-number {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.folio-dark .folio-number {
    color: #A89274;
}

.folio-light .folio-number {
    color: #8B6B4A;
}

.folio-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(32px, 4vw, 56px);
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.folio-dark .folio-title {
    color: #F2E8D9;
}

.folio-light .folio-title {
    color: #1A0F06;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: left;
}

.philosophy-card {
    background: rgba(26, 15, 6, 0.04);
    border: 1px solid rgba(61, 43, 26, 0.12);
    border-radius: 4px;
    padding: 36px 28px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 2px 8px rgba(26, 15, 6, 0.08);
}

.philosophy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26, 15, 6, 0.15);
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
}

.icon-svg {
    width: 100%;
    height: 100%;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 12px;
    color: #3D2B1A;
}

.card-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    line-height: 1.7;
    color: #6B4226;
}

/* --- FOLIO III: Method --- */
.method-steps {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.method-step {
    display: flex;
    gap: 28px;
    position: relative;
    padding-bottom: 40px;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    text-align: right;
}

.roman-numeral {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 28px;
    color: #C49B2A;
    line-height: 1;
}

.step-content {
    flex: 1;
}

.step-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 24px;
    color: #F2E8D9;
    margin-bottom: 8px;
}

.step-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    line-height: 1.7;
    color: #D4C4AE;
}

.step-connector {
    position: absolute;
    left: 19px;
    top: 36px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, #C49B2A, rgba(196, 155, 42, 0.1));
}

/* --- FOLIO IV: Collection --- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: left;
}

.review-card {
    display: flex;
    background: #FFF8EE;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 15, 6, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.review-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(26, 15, 6, 0.2);
}

.review-spine {
    width: 8px;
    flex-shrink: 0;
}

.review-body {
    padding: 28px 24px;
    flex: 1;
}

.review-category {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8B6B4A;
    margin-bottom: 10px;
}

.review-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    color: #1A0F06;
    margin-bottom: 14px;
    line-height: 1.2;
}

.review-quote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 15px;
    line-height: 1.6;
    color: #6B4226;
    margin-bottom: 14px;
    padding-left: 16px;
    border-left: 2px solid #C49B2A;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.rating-stars {
    font-size: 14px;
    color: #C49B2A;
    letter-spacing: 2px;
}

.rating-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #A89274;
}

.review-excerpt {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    line-height: 1.6;
    color: #3D2B1A;
}

/* --- FOLIO V: Testament --- */
.testament-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 60px;
    text-align: left;
}

.testament-card {
    background: rgba(242, 232, 217, 0.04);
    border: 1px solid rgba(196, 155, 42, 0.15);
    border-radius: 4px;
    padding: 32px 24px;
    position: relative;
}

.testament-mark {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    color: #C49B2A;
    opacity: 0.3;
    line-height: 0.8;
    margin-bottom: 8px;
}

.testament-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    line-height: 1.7;
    color: #D4C4AE;
    margin-bottom: 16px;
}

.testament-attribution {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attribution-dash {
    color: #C49B2A;
}

.attribution-name {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #A89274;
}

.pull-quote {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(196, 155, 42, 0.2);
}

.pull-quote-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.4;
    color: #C49B2A;
    letter-spacing: -0.01em;
}

/* --- FOLIO VI: Epilogue --- */
.folio-epilogue {
    background: linear-gradient(180deg, #1A0F06 0%, #0D0804 100%);
}

.epilogue-seal {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
}

.seal-svg-large {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(196, 64, 64, 0.3));
}

.epilogue-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 48px);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: #F2E8D9;
    margin-bottom: 20px;
}

.epilogue-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    line-height: 1.7;
    color: #D4C4AE;
    max-width: 540px;
    margin: 0 auto 40px;
}

.subscribe-form {
    max-width: 480px;
    margin: 0 auto 60px;
}

.form-field {
    display: flex;
    gap: 0;
    border: 1px solid rgba(196, 155, 42, 0.3);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.form-field:focus-within {
    border-color: #C49B2A;
}

.email-input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(242, 232, 217, 0.05);
    border: none;
    outline: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    color: #F2E8D9;
}

.email-input::placeholder {
    color: #8B6B4A;
    font-style: italic;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #C49B2A;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1A0F06;
    transition: background 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background: #D4AB3A;
    transform: translateX(2px);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

.epilogue-footer {
    padding-top: 20px;
}

.footer-divider {
    width: 300px;
    margin: 0 auto 20px;
}

.footer-divider-svg {
    width: 100%;
    height: 20px;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: #A89274;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.footer-colophon {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 12px;
    color: #6B4226;
}

/* --- Scroll Reveal Animations --- */
.folio-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.folio.in-view .folio-content {
    opacity: 1;
    transform: translateY(0);
}

/* First folio always visible */
#folio-1 .folio-content {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card reveals */
.philosophy-card,
.review-card,
.testament-card,
.method-step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.folio.in-view .philosophy-card,
.folio.in-view .review-card,
.folio.in-view .testament-card,
.folio.in-view .method-step {
    opacity: 1;
    transform: translateY(0);
}

.folio.in-view .philosophy-card:nth-child(1),
.folio.in-view .review-card:nth-child(1),
.folio.in-view .testament-card:nth-child(1),
.folio.in-view .method-step:nth-child(1) { transition-delay: 0.1s; }

.folio.in-view .philosophy-card:nth-child(2),
.folio.in-view .review-card:nth-child(2),
.folio.in-view .testament-card:nth-child(2),
.folio.in-view .method-step:nth-child(2) { transition-delay: 0.25s; }

.folio.in-view .philosophy-card:nth-child(3),
.folio.in-view .review-card:nth-child(3),
.folio.in-view .testament-card:nth-child(3),
.folio.in-view .method-step:nth-child(3) { transition-delay: 0.4s; }

.folio.in-view .method-step:nth-child(4) { transition-delay: 0.55s; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .philosophy-grid,
    .collection-grid,
    .testament-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .marginalia-nav {
        display: none;
    }

    .marginalia-annotation {
        display: none;
    }

    .folio-content {
        width: 85%;
        padding: 40px 0;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 36px;
    }

    .folio-title {
        font-size: 28px;
    }

    .folio-content {
        width: 90%;
    }

    .method-step {
        gap: 16px;
    }

    .roman-numeral {
        font-size: 22px;
    }

    .step-number {
        width: 30px;
    }

    .step-connector {
        left: 14px;
    }
}
