/* ==========================================================================
   Boxing Nations — Scrapbook Editorial Stylesheet
   Professional design system for country-specific editorial pages
   ========================================================================== */

/* ===== Animations ===== */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(var(--rotation, 0deg));
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ===== Scrapbook Page Background ===== */
.scrapbook-page {
    background-color: #faf6ed;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139,115,85,0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    padding: 1rem 0;
    margin: 0 -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* ===== Hero Banner ===== */
.nations-hero {
    margin-top: -1.5rem;
    background-size: cover;
    background-position: center 40%;
    background-attachment: fixed;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    position: relative;
}

/* Vignette overlay */
.nations-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
    z-index: 1;
}

.nations-hero-overlay {
    width: 100%;
    padding: 4rem 0 3rem;
    background: linear-gradient(to top, rgba(26,26,46,0.95) 0%, rgba(26,26,46,0.6) 50%, transparent 100%);
    position: relative;
    z-index: 2;
}

.scrapbook-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: #c9a84c;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.scrapbook-hero-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(2.5rem, 8vw, 4.2rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.3);
}

.scrapbook-hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    line-height: 1.6;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ===== Notebook Narrative ===== */
.scrapbook-notebook {
    background: #fff;
    border-radius: 4px;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.08),
        0 16px 48px rgba(0,0,0,0.04);
    display: flex;
    overflow: hidden;
    position: relative;
}

.notebook-spine {
    width: 40px;
    min-width: 40px;
    background: linear-gradient(90deg, #c9a84c 0%, #d4b65c 40%, #c9a84c 50%, #b89640 100%);
    position: relative;
    overflow: hidden;
}

.notebook-spine::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    background: rgba(0,0,0,0.12);
}

/* Spine shimmer */
.notebook-spine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.15) 45%,
        rgba(255,255,255,0) 55%,
        rgba(255,255,255,0) 100%
    );
    background-size: 100% 200%;
    animation: shimmer 6s ease-in-out infinite;
}

.notebook-content {
    padding: 2.5rem 3rem;
    flex: 1;
    background-image:
        repeating-linear-gradient(transparent, transparent 31px, #e0dcd2 31px, #e0dcd2 32px);
    background-size: 100% 32px;
    background-position-y: 8px;
}

.scrapbook-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    position: relative;
    letter-spacing: -0.3px;
}

.notebook-content p {
    font-size: 1rem;
    line-height: 2;
    color: #3a3a3a;
    margin-bottom: 1.5rem;
}

.notebook-content p:last-child {
    margin-bottom: 0;
}

/* Drop cap on first paragraph */
.notebook-content p:first-of-type::first-letter {
    float: left;
    font-family: 'Caveat', cursive;
    font-size: 3.5em;
    font-weight: 700;
    color: #c9a84c;
    line-height: 0.8;
    margin-right: 0.08em;
    margin-top: 0.05em;
    text-shadow: 1px 1px 0 rgba(201,168,76,0.15);
}

/* ===== Section Titles ===== */
.scrapbook-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.scrapbook-section-sub {
    font-size: 1rem;
    font-style: italic;
    color: #888;
}

/* ===== Fighter Card Layout ===== */
.scrapbook-card-wide {
    margin-bottom: 2.5rem;
    animation: fadeSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
    animation-delay: var(--delay, 0s);
}

.scrapbook-polaroid-float {
    float: right;
    width: 260px;
    margin: 0 0 1rem 1.5rem;
}

/* ===== Fighter Card ===== */
.scrapbook-card {
    background: #ffffff;
    border-radius: 3px;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.06),
        0 8px 24px rgba(201,168,76,0.06);
    padding: 1.5rem;
    position: relative;
    transform: rotate(var(--rotation, 0deg));
    transition:
        transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.scrapbook-card:hover {
    transform: rotate(0deg) translateY(-6px) scale(1.005);
    box-shadow:
        0 4px 12px rgba(201,168,76,0.15),
        0 12px 32px rgba(0,0,0,0.12),
        0 20px 48px rgba(0,0,0,0.06);
    z-index: 2;
}

.scrapbook-card:hover .scrapbook-name {
    color: #b8953e;
    transition: color 0.3s ease;
}

/* ===== Tape Effects ===== */
.scrapbook-tape-top {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 100px;
    height: 24px;
    background: linear-gradient(
        180deg,
        rgba(255,238,185,0.92) 0%,
        rgba(245,220,150,0.82) 45%,
        rgba(235,205,130,0.72) 100%
    );
    border-radius: 1px;
    z-index: 3;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.12),
        inset 0 1px 1px rgba(255,255,255,0.5),
        inset 0 -1px 1px rgba(0,0,0,0.08);
    filter: brightness(0.97);
}

/* ===== Polaroid Photo Frame ===== */
.scrapbook-polaroid {
    background: #fff;
    padding: 8px 8px 2px 8px;
    border: 1.5px solid #ddd8cc;
    box-shadow:
        inset 0 0 12px rgba(0,0,0,0.05),
        inset 0 0 3px rgba(0,0,0,0.03),
        1px 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.scrapbook-photo {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: top;
    display: block;
    filter: contrast(1.04) saturate(0.96) sepia(0.04) brightness(0.99);
    transition: filter 0.5s ease, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.scrapbook-card:hover .scrapbook-photo {
    filter: contrast(1.08) saturate(1.02) sepia(0) brightness(1.01);
    transform: scale(1.03);
}

.scrapbook-photo-fallback {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #1a1a2e, #2d2d4e);
    color: #c9a84c;
    font-size: 4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scrapbook-photo-credit {
    display: block;
    font-size: 0.72rem;
    color: #777;
    text-align: right;
    padding: 4px 2px 6px;
    font-style: italic;
    letter-spacing: 0.2px;
}

/* ===== Card Content ===== */
.scrapbook-rank {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: #c9a84c;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.scrapbook-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.1rem;
    transition: color 0.3s ease;
}

.scrapbook-nickname {
    font-family: 'Caveat', cursive;
    font-size: 1.2rem;
    color: #c9a84c;
    display: block;
    margin-bottom: 0.2rem;
}

.scrapbook-hometown {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.scrapbook-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.scrapbook-badge-div {
    background: #1a1a2e;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25em 0.7em;
    border-radius: 2px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.scrapbook-badge-rec {
    background: linear-gradient(135deg, #c9a84c, #d4b65c);
    color: #1a1a2e;
    font-size: 0.75rem;
    padding: 0.25em 0.7em;
    border-radius: 2px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.scrapbook-facts {
    padding-left: 1.1rem;
    margin-bottom: 0;
}

.scrapbook-facts li {
    font-size: 0.88rem;
    color: #4a4a4a;
    margin-bottom: 0.6rem;
    line-height: 1.65;
}

.scrapbook-facts li:last-child {
    margin-bottom: 0;
}

/* ===== Section Breaks ===== */
.scrapbook-break {
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.08),
        0 8px 24px rgba(0,0,0,0.12);
}

.scrapbook-break-inner {
    background: rgba(26,26,46,0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
}

.scrapbook-quote {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-style: italic;
    color: rgba(255,255,255,0.95);
    max-width: 650px;
    margin: 0 auto 0.75rem;
    line-height: 1.6;
    position: relative;
    padding: 0 2.5rem;
    letter-spacing: 0.2px;
}

/* Decorative quotation marks */
.scrapbook-quote::before,
.scrapbook-quote::after {
    position: absolute;
    font-family: Georgia, serif;
    color: rgba(201,168,76,0.5);
    font-size: 3.5rem;
    line-height: 1;
    font-style: normal;
}

.scrapbook-quote::before {
    content: '\201C';
    left: 0;
    top: -0.3rem;
}

.scrapbook-quote::after {
    content: '\201D';
    right: 0;
    bottom: -1.2rem;
}

.scrapbook-quote-attr {
    font-size: 0.85rem;
    color: #c9a84c;
    font-style: italic;
    display: block;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

.scrapbook-tape {
    position: absolute;
    width: 80px;
    height: 22px;
    background: linear-gradient(
        180deg,
        rgba(255,238,185,0.75) 0%,
        rgba(245,220,150,0.55) 45%,
        rgba(235,205,130,0.45) 100%
    );
    border-radius: 1px;
    z-index: 2;
    box-shadow:
        0 1px 3px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.35);
}

.scrapbook-tape-left {
    top: 12px;
    left: 20px;
    transform: rotate(-15deg);
}

.scrapbook-tape-right {
    bottom: 12px;
    right: 20px;
    transform: rotate(12deg);
}

/* ===== Buttons ===== */
.btn-outline-gold {
    color: #c9a84c;
    border-color: #c9a84c;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-gold:hover {
    background: #c9a84c;
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,168,76,0.3);
}

.btn-gold {
    background: linear-gradient(135deg, #c9a84c, #f0d78c);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b8953e, #e0c77c);
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,168,76,0.3);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nations-hero {
        min-height: 320px;
        background-attachment: scroll;
    }
    .scrapbook-hero-title { font-size: 2.8rem; }
    .scrapbook-hero-sub { font-size: 0.95rem; }

    .scrapbook-card {
        transform: rotate(0deg) !important;
    }

    .scrapbook-polaroid-float {
        float: none;
        width: 100%;
        margin: 0 0 1rem 0;
    }

    .notebook-spine { width: 24px; min-width: 24px; }
    .notebook-content { padding: 1.5rem; }

    .scrapbook-quote { font-size: 1.3rem; padding: 0 2rem; }
    .scrapbook-quote::before { font-size: 2.5rem; }
    .scrapbook-quote::after { font-size: 2.5rem; }
    .scrapbook-break-inner { padding: 2.5rem 1.5rem; }

    .scrapbook-section-title { font-size: 2.2rem; }

    .scrapbook-page {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .notebook-content p:first-of-type::first-letter {
        font-size: 3em;
    }
}

@media (max-width: 480px) {
    .scrapbook-hero-title { font-size: 2.2rem; }
    .scrapbook-photo { height: 200px; }
}

/* ===== Accessibility: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .scrapbook-card-wide {
        animation: none;
        opacity: 1;
    }
    .scrapbook-card {
        transition: none;
    }
    .scrapbook-photo {
        transition: none;
    }
    .notebook-spine::before {
        animation: none;
    }
    .btn-outline-gold,
    .btn-gold {
        transition: none;
    }
}
