/* Force — full-page scroll storytelling (Haunted House tarzı akış) */

:root {
    --ink: #121212;
    --paper: #f4f1eb;
    --muted: rgba(244, 241, 235, 0.78);
    --accent: #ff6a1a;
    --accent-deep: #e2550c;
    --display: "Syne", system-ui, sans-serif;
    --body: "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: #0e0e0e;
    color: var(--paper);
    font-family: var(--body);
    -webkit-font-smoothing: antialiased;
}

body.is-booting {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Boot screen */
.boot {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    background: #101010;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.boot.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot__inner {
    width: min(22rem, calc(100% - 2.5rem));
    text-align: center;
}

.boot__brand {
    margin: 0 0 1.25rem;
    font-family: var(--display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.boot__bar {
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.boot__bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent);
}

.boot__label {
    margin: 0.85rem 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Top UI */
.top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    pointer-events: none;
}

.top a,
.top__meta {
    pointer-events: auto;
}

.top__brand {
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 0.95rem;
}

.top__meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(18, 18, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.top__exit {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Story stage — pinned full viewport */
.story {
    position: relative;
}

.stage {
    position: relative;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.stage__bg {
    position: absolute;
    inset: 0;
}

.bg {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.12);
    filter: saturate(0.95) contrast(1.05);
    transition: none;
    will-change: opacity, transform;
}

.bg.is-active {
    opacity: 1;
}

.veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(255, 106, 26, 0.18), transparent 45%),
        linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.55) 45%, rgba(10, 10, 10, 0.82) 100%);
}

/* Chapters overlay */
.chapter {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    align-content: center;
    justify-items: start;
    padding: clamp(5rem, 12vh, 7rem) clamp(1.25rem, 5vw, 4rem);
    max-width: 46rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(36px);
    pointer-events: none;
    will-change: opacity, transform;
}

.chapter.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.brand-title,
.chapter h2 {
    margin: 0 0 1rem;
    font-family: var(--display);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.brand-title {
    font-size: clamp(2.8rem, 8vw, 5.2rem);
}

.chapter h2 {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
}

.lead {
    margin: 0;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.body {
    margin: 0;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.65;
    color: var(--muted);
    max-width: 34rem;
}

.hint {
    margin: 2.5rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    animation: bob 1.8s ease-in-out infinite;
}

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

.chips {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.chips li {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-weight: 700;
    font-size: 0.92rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.3rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    border: 1px solid transparent;
    transition: background 0.2s, transform 0.15s;
}

.btn:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
}

.btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
}

.fine {
    margin: 1.5rem 0 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Progress rail */
.rail {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
}

.rail__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #ffb347);
    transform-origin: left center;
}

.noscript {
    padding: 2rem;
    color: #fff;
}

/* Reduced motion fallback: normal stacked page */
body.is-reduced .boot {
    display: none;
}

body.is-reduced .story {
    height: auto !important;
}

body.is-reduced .stage {
    height: auto;
    min-height: 100vh;
}

body.is-reduced .chapter {
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto;
    padding-block: 4rem;
}

body.is-reduced .bg {
    display: none;
}

body.is-reduced .stage__bg {
    display: none;
}

body.is-reduced .stage {
    background: #161616;
}

@media (max-width: 720px) {
    .top__meta span:first-child {
        max-width: 9.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .chapter {
        align-content: end;
        padding-bottom: 4.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hint {
        animation: none;
    }
}
