@import "tailwindcss";

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/fonts/inter-var.woff2') format('woff2');
}

@theme {
    --color-scout: #3578E5;
    --color-blitz: #E8612A;
    --color-nova: #7C3AED;
    --color-echo: #16A34A;
    --color-cream: #FFFDF7;
    --color-dark: #1A1D1F;

    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ── Buttons ── */

.btn {
    display: inline-block;
    text-align: center;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.btn-md {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
}

.btn-primary {
    background-color: var(--color-nova);
    color: #fff;
}
.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--color-dark);
    color: #fff;
}
.btn-secondary:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: #fff;
    color: var(--color-dark);
    border: 1px solid #e5e7eb;
}
.btn-outline:hover {
    border-color: #9ca3af;
}

.char-card {
    border-color: color-mix(in srgb, var(--char-color) 20%, transparent);
}
.char-card:hover {
    border-color: var(--char-color);
}

.text-gradient-brand {
    background: linear-gradient(to right, #3578E5, #4F46E5, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Stories index ── */

.stories-hero {
    position: relative;
    padding: 5rem 0 4rem;
    overflow: hidden;
}

.stories-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.stories-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 120, 229, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.season-header {
    position: relative;
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, var(--color-cream) 0%, #fff 100%);
    border: 2px solid #f0e6d6;
    margin-bottom: 2rem;
    overflow: hidden;
}

.season-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--color-scout), var(--color-nova), var(--color-blitz), var(--color-echo));
    border-radius: 1.5rem 1.5rem 0 0;
}

.season-number {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-nova);
    margin-bottom: 0.75rem;
}

.season-number::before {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2px;
    background: var(--color-nova);
    border-radius: 1px;
}

.season-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-dark);
    line-height: 1.2;
}

@media (min-width: 640px) {
    .season-title {
        font-size: 2.5rem;
    }
}

.season-meta {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

.episode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e8e0d4;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.episode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(26, 29, 31, 0.12);
    border-color: var(--card-accent, #e8e0d4);
}

@media (min-width: 640px) {
    .episode-card {
        flex-direction: row;
    }
}

.episode-card-visual {
    position: relative;
    width: 100%;
    height: 12rem;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 640px) {
    .episode-card-visual {
        width: 11rem;
        height: auto;
        min-height: 11rem;
    }
}

.episode-card-visual .episode-number-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
    background: var(--card-accent, var(--color-scout));
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
}

.episode-card-visual .episode-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.35s ease;
}

.episode-card:hover .episode-emoji {
    transform: scale(1.15) rotate(-5deg);
}

.episode-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.episode-card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.episode-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.episode-badge-new {
    background: rgba(232, 97, 42, 0.1);
    color: var(--color-blitz);
}

.episode-badge-finale {
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-nova);
}

.episode-badge-time {
    color: #9ca3af;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.episode-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.3;
    transition: color 0.2s ease;
}

.episode-card:hover .episode-card-title {
    color: var(--card-accent, var(--color-scout));
}

.episode-card-excerpt {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #6b7280;
}

.episode-card-cta {
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--card-accent, var(--color-scout));
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.episode-card:hover .episode-card-cta {
    gap: 0.5rem;
}

.episode-card-cta::after {
    content: '\2192';
    transition: transform 0.2s ease;
}

.episode-card:hover .episode-card-cta::after {
    transform: translateX(4px);
}

/* Staggered entrance */
.episode-card {
    animation: episodeFadeIn 0.5s ease both;
}

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

/* ── Board Game page ── */

.boardgame-hero {
    position: relative;
    padding: 5rem 0 4rem;
    background: linear-gradient(170deg, #FFFDF7 0%, #f0e6d6 40%, #e8dcc8 100%);
    overflow: hidden;
}

.boardgame-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(53, 120, 229, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(232, 97, 42, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

.boardgame-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--color-cream), transparent);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--color-nova);
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-badge::before {
    content: '\2728';
}

.character-power-card {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    background: #fff;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.character-power-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--char-accent);
}

.character-power-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 24px 48px -12px rgba(0,0,0,0.12);
    border-color: var(--char-accent);
}

.character-power-card .card-emoji {
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.4s ease;
}

.character-power-card:hover .card-emoji {
    transform: scale(1.2) rotate(8deg);
}

.character-power-card .card-image {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.4s ease;
}

.character-power-card:hover .card-image {
    transform: scale(1.15) rotate(-5deg);
}

.character-power-card .card-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: 1rem;
    color: var(--char-accent);
}

.character-power-card .power-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-top: 0.5rem;
}

.character-power-card .power-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
    line-height: 1.5;
}

.difficulty-card {
    position: relative;
    padding: 2rem;
    border-radius: 1.25rem;
    background: #fff;
    border: 2px solid #e8e0d4;
    transition: all 0.3s ease;
}

.difficulty-card:hover {
    border-color: var(--diff-color);
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.08);
}

.difficulty-card .diff-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--diff-color) 12%, transparent);
    color: var(--diff-color);
}

.print-option {
    position: relative;
    padding: 2rem;
    border-radius: 1.25rem;
    border: 2px solid #e8e0d4;
    background: #fff;
    transition: all 0.3s ease;
    text-align: center;
}

.print-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.1);
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid #e8e0d4;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    border-color: var(--color-scout);
    background: rgba(53, 120, 229, 0.03);
}

.checklist-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f0e6d6, #e8dcc8);
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 4rem 0;
    color: #d1c4b0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1c4b0, transparent);
}

/* ── Legal pages ── */

.legal-doc {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #374151;
}

.legal-doc h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0e6d6;
    letter-spacing: -0.01em;
}

.legal-doc h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-doc p {
    margin-bottom: 1rem;
}

.legal-doc ul,
.legal-doc ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.legal-doc ul {
    list-style: none;
    padding-left: 0;
}

.legal-doc ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-doc ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-nova);
    opacity: 0.5;
}

.legal-doc ol {
    list-style: none;
    counter-reset: legal-counter;
    padding-left: 0;
}

.legal-doc ol li {
    counter-increment: legal-counter;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.legal-doc ol li::before {
    content: counter(legal-counter) '.';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--color-nova);
    font-size: 0.875rem;
}

.legal-doc ol li ol {
    counter-reset: legal-sub;
    margin-top: 0.5rem;
}

.legal-doc ol li ol li {
    counter-increment: legal-sub;
}

.legal-doc ol li ol li::before {
    content: counter(legal-sub, lower-alpha) ')';
}

.legal-doc table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.5rem 0;
    font-size: 0.8125rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e8e0d4;
}

.legal-doc thead th {
    background: #f9f5ef;
    color: var(--color-dark);
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 2px solid #e8e0d4;
}

.legal-doc tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0ebe3;
    vertical-align: top;
}

.legal-doc tbody tr:last-child td {
    border-bottom: none;
}

.legal-doc tbody tr:hover {
    background: #fdfaf5;
}

.legal-doc strong {
    color: var(--color-dark);
    font-weight: 600;
}

.legal-doc a {
    color: var(--color-scout);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-doc a:hover {
    color: var(--color-nova);
}

.legal-doc hr {
    border: none;
    height: 1px;
    background: #e8e0d4;
    margin: 3rem 0;
}

.legal-toc {
    background: #fff;
    border: 1px solid #e8e0d4;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.legal-toc p {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.legal-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
    columns: 2;
    column-gap: 2rem;
}

.legal-toc ol li {
    counter-increment: toc;
    padding: 0.35rem 0;
    font-size: 0.875rem;
    break-inside: avoid;
}

.legal-toc ol li a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s ease;
}

.legal-toc ol li a:hover {
    color: var(--color-nova);
}

.legal-toc ol li a::before {
    content: counter(toc) '. ';
    font-weight: 600;
    color: var(--color-nova);
    opacity: 0.5;
}

/* Story — dialogi */
.story-dialogue {
    padding-left: 1.5rem;
    border-left: 3px solid var(--dialogue-color, #9ca3af);
    margin: 1.25rem 0;
}

/* Story — separator scen */
.story-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0;
    color: #d1d5db;
}
.story-separator::before,
.story-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
