/* ═══════════ BİR AŞK HİKAYESİ — sinematik tema ═══════════ */
:root {
    --bg: #0d0f14;
    --bg-soft: #14171f;
    --ink: #efe9dd;
    --ink-dim: #9a9488;
    --accent: #c9a06c;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ── film greni ── */
.grain {
    position: fixed; inset: -50%;
    width: 200%; height: 200%;
    pointer-events: none; z-index: 3;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}
@keyframes grain {
    0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
    40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); }
    80% { transform: translate(3%,3%); }
}

/* ── giriş jeneriği ── */
.intro {
    position: fixed; inset: 0; z-index: 50;
    background: #000;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 1.2s ease;
}
.intro.done { opacity: 0; pointer-events: none; }
.intro-bar {
    position: absolute; left: 0; right: 0; height: 11vh; background: #000; z-index: 2;
}
.intro-bar.top { top: 0; border-bottom: 1px solid #1c1c1c; }
.intro-bar.bottom { bottom: 0; border-top: 1px solid #1c1c1c; }
.intro-lines { text-align: center; padding: 0 24px; }
.intro-line {
    font-family: var(--serif);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-dim);
    opacity: 0;
    position: absolute; left: 0; right: 0; top: 50%;
    transform: translateY(-50%);
    transition: opacity 1.4s ease;
}
.intro-line.show { opacity: 1; }
.intro-title {
    font-size: clamp(2rem, 7vw, 4.2rem);
    color: var(--ink);
    letter-spacing: .08em;
    font-style: italic;
    text-transform: none;
}
.accent { color: var(--accent); }
.intro-skip {
    position: absolute; bottom: 4vh; right: 24px; z-index: 3;
    background: none; border: none; color: #555;
    font-family: var(--sans); font-size: .8rem; letter-spacing: .1em;
    cursor: pointer; padding: 8px;
}
.intro-skip:hover { color: var(--ink-dim); }

/* ── ortak ── */
.eyebrow {
    font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
    color: var(--accent); font-weight: 500; margin-bottom: 14px;
}
.eyebrow.center { text-align: center; }
.sec-title {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(2rem, 6vw, 3.4rem);
    text-align: center; margin-bottom: 48px;
}
.btn {
    background: var(--accent); color: #14120c;
    border: none; border-radius: 999px;
    padding: 13px 34px; font-family: var(--sans);
    font-weight: 700; font-size: .95rem; letter-spacing: .04em;
    cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,160,108,.25); }
.btn:focus-visible, .intro-skip:focus-visible, .music-btn:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 3px;
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── hero ── */
.hero {
    min-height: 100svh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 80px 24px 60px;
    position: relative;
    background: radial-gradient(ellipse 90% 60% at 50% 30%, #1a1e28 0%, var(--bg) 70%);
}
.hero-names {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(2.6rem, 10vw, 6rem);
    line-height: 1.08; letter-spacing: .01em;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35em;
}
.amp { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-sub {
    margin-top: 18px; color: var(--ink-dim);
    font-family: var(--serif); font-style: italic;
    font-size: clamp(1.05rem, 3vw, 1.35rem);
}

/* zaman sayacı — film timecode */
.timecode {
    margin-top: 54px;
    display: flex; align-items: baseline; gap: 10px;
    padding: 20px 28px;
    border: 1px solid #262b36; border-radius: 12px;
    background: rgba(20,23,31,.65);
    backdrop-filter: blur(4px);
}
.tc-cell { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.tc-num {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(1.9rem, 6vw, 3rem);
    color: var(--ink); font-variant-numeric: tabular-nums;
}
.tc-lbl { font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-dim); margin-top: 2px; }
.tc-sep { font-family: var(--serif); font-size: 1.8rem; color: var(--accent); align-self: flex-start; padding-top: 8px; }
.tc-caption { margin-top: 16px; color: var(--ink-dim); font-style: italic; font-family: var(--serif); font-size: 1rem; }

.scroll-hint {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 40px; border: 1.5px solid #3a4152; border-radius: 14px;
}
.scroll-hint span {
    position: absolute; top: 7px; left: 50%; width: 3px; height: 8px;
    margin-left: -1.5px; border-radius: 3px; background: var(--accent);
    animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } }

/* ── bölümler ── */
.chapters { max-width: 1080px; margin: 0 auto; padding: 40px 24px; }
.chapter {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 6vw, 80px); align-items: center;
    padding: clamp(60px, 10vh, 110px) 0;
}
.chapter.flip .chapter-media { order: 2; }
.photo-frame {
    position: relative; border-radius: 6px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.photo-frame::after {
    content: ''; position: absolute; inset: 0;
    border: 1px solid rgba(201,160,108,.28); border-radius: 6px;
    pointer-events: none;
}
.photo-frame img { display: block; width: 100%; height: auto; transform: scale(1.04); transition: transform 1.4s ease; }
.photo-frame video { display: block; width: 100%; height: auto; background: #000; }
.chapter:hover .photo-frame img { transform: scale(1.0); }
.photo-frame.empty {
    aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
    background: var(--bg-soft); color: var(--accent); font-size: 3rem;
}
.chapter-text h2 {
    font-family: var(--serif); font-weight: 500;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem); margin-bottom: 16px;
}
.chapter-text .body { color: #c4bfb3; font-size: 1.02rem; max-width: 46ch; }

/* ── galeri ── */
.gallery-sec { padding: clamp(70px, 12vh, 130px) 24px; background: var(--bg-soft); }
.gallery {
    max-width: 1100px; margin: 0 auto;
    columns: 3; column-gap: 14px;
}
.g-item { break-inside: avoid; margin-bottom: 14px; border-radius: 6px; overflow: hidden; cursor: pointer; position: relative; }
.g-item img { display: block; width: 100%; height: auto; transition: transform .5s ease, filter .5s ease; filter: saturate(.9); }
.g-item:hover img { transform: scale(1.03); filter: saturate(1.1); }

.lightbox {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(5,6,9,.95);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 74vh; border-radius: 6px; box-shadow: 0 20px 80px rgba(0,0,0,.7); }
.lb-note {
    margin-top: 18px; font-family: var(--serif); font-style: italic;
    font-size: clamp(1.05rem, 3vw, 1.4rem); color: var(--ink);
    text-align: center; max-width: 640px;
}
.lb-close {
    position: absolute; top: 18px; right: 22px;
    background: none; border: none; color: var(--ink-dim);
    font-size: 1.6rem; cursor: pointer; padding: 8px;
}

/* kilitli fotoğraf */
.g-item.locked { cursor: pointer; }
.g-item.locked img { filter: none; } /* bulanıklık sunucudan geliyor */
.g-lock {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem;
    background: rgba(10,12,17,.25);
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.chapter-locked { cursor: pointer; }
.chapter-locked .g-lock { font-size: 2.6rem; border-radius: 6px; }
.locked-placeholder { aspect-ratio: 4/3; background: var(--bg-soft); }

/* şifre modalı */
.pass-modal {
    position: fixed; inset: 0; z-index: 70;
    background: rgba(5,6,9,.9);
    display: none; align-items: center; justify-content: center;
    padding: 24px;
}
.pass-modal.open { display: flex; }
.pass-box {
    background: var(--bg-soft); border: 1px solid #2d3342;
    border-radius: 16px; padding: 34px 30px;
    max-width: 360px; width: 100%; text-align: center;
}
.pass-box p { margin-bottom: 16px; font-family: var(--serif); font-size: 1.15rem; }
.pass-box input {
    width: 100%; background: var(--bg); border: 1px solid #2d3342;
    color: var(--ink); padding: 13px 16px; border-radius: 999px;
    font-size: 1.05rem; text-align: center; letter-spacing: .2em;
}
.pass-box input:focus { outline: none; border-color: var(--accent); }
.pass-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.btn.ghost-lite { background: transparent; border: 1px solid #3a4152; color: var(--ink-dim); }

/* ── quiz ── */
.quiz-sec { padding: clamp(70px, 12vh, 130px) 24px; }
.quiz-card {
    max-width: 560px; margin: 0 auto; text-align: center;
    background: var(--bg-soft); border: 1px solid #262b36;
    border-radius: 16px; padding: clamp(28px, 5vw, 46px);
}
.quiz-start-text { color: var(--ink-dim); margin-bottom: 22px; font-size: 1.05rem; }
.quiz-q { font-family: var(--serif); font-size: clamp(1.3rem, 4vw, 1.7rem); margin-bottom: 24px; }
.quiz-opts { display: flex; flex-direction: column; gap: 12px; }
.quiz-opt {
    background: var(--bg); border: 1px solid #2d3342; color: var(--ink);
    padding: 14px 18px; border-radius: 10px; cursor: pointer;
    font-family: var(--sans); font-size: .98rem; text-align: left;
    transition: border-color .2s, transform .15s;
}
.quiz-opt:hover { border-color: var(--accent); transform: translateX(4px); }
.quiz-opt.right { border-color: #4caf7d; background: rgba(76,175,125,.12); }
.quiz-opt.wrong { border-color: #d05a5a; background: rgba(208,90,90,.1); }
.quiz-progress { font-size: .78rem; letter-spacing: .2em; color: var(--ink-dim); margin-bottom: 14px; text-transform: uppercase; }
.quiz-result-score {
    font-family: var(--serif); font-size: clamp(2.6rem, 9vw, 4rem);
    color: var(--accent); font-weight: 600;
}
.quiz-result-text { color: var(--ink-dim); margin: 10px 0 4px; font-size: 1.02rem; }

/* ── mektup ── */
.letter-sec { padding: clamp(70px, 12vh, 130px) 24px; background: var(--bg-soft); }
.letter-lock {
    max-width: 480px; margin: 0 auto; text-align: center;
    border: 1px dashed #3a4152; border-radius: 16px;
    padding: clamp(30px, 5vw, 48px);
}
.lock-icon { font-size: 2.2rem; margin-bottom: 14px; }
.lock-q { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 22px; }
.lock-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lock-row input {
    flex: 1; min-width: 180px;
    background: var(--bg); border: 1px solid #2d3342; color: var(--ink);
    padding: 13px 16px; border-radius: 999px; font-size: 1rem;
    font-family: var(--sans); text-align: center;
}
.lock-row input:focus { outline: none; border-color: var(--accent); }
.lock-err { color: #d98a8a; font-size: .88rem; margin-top: 14px; min-height: 1.2em; }
.letter-lock.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }

.letter-paper {
    max-width: 620px; margin: 0 auto;
    background: #f4eee2; color: #2b2620;
    border-radius: 8px; padding: clamp(30px, 6vw, 56px);
    box-shadow: 0 30px 80px rgba(0,0,0,.55);
    font-family: var(--serif); font-size: clamp(1.08rem, 3vw, 1.25rem);
    line-height: 1.85;
    animation: paperIn 1.2s ease;
}
@keyframes paperIn { from { opacity: 0; transform: translateY(40px) rotate(-1deg); } to { opacity: 1; transform: none; } }
.letter-sign { margin-top: 28px; text-align: right; font-style: italic; font-size: 1.15rem; }

/* ── final ── */
.finale {
    position: relative; overflow: hidden;
    padding: clamp(90px, 16vh, 160px) 24px;
    text-align: center;
    background: radial-gradient(ellipse 80% 70% at 50% 100%, #1c1620 0%, var(--bg) 70%);
}
.countdown { display: flex; justify-content: center; gap: clamp(14px, 4vw, 34px); margin: 10px 0 30px; }
.countdown div { display: flex; flex-direction: column; }
.countdown b {
    font-family: var(--serif); font-weight: 600;
    font-size: clamp(2.2rem, 8vw, 3.6rem); color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.countdown i { font-style: normal; font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-dim); }
.finale-badge { font-size: 1.4rem; margin-bottom: 20px; }
.finale-text {
    font-family: var(--serif); font-style: italic;
    font-size: clamp(1.3rem, 4vw, 1.9rem); max-width: 620px; margin: 0 auto;
}
.credits { margin-top: 60px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: #5a564c; }
.hearts { position: absolute; inset: 0; pointer-events: none; }
.heart {
    position: absolute; bottom: -30px;
    font-size: 18px; opacity: 0;
    animation: floatUp linear forwards;
}
@keyframes floatUp {
    0% { opacity: 0; transform: translateY(0) scale(.7); }
    12% { opacity: .8; }
    100% { opacity: 0; transform: translateY(-85vh) scale(1.2); }
}

/* ── müzik ── */
.music-btn {
    position: fixed; bottom: 20px; right: 20px; z-index: 40;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--bg-soft); border: 1px solid #333a48;
    color: var(--ink-dim); font-size: 1.3rem; cursor: pointer;
    transition: color .2s, border-color .2s;
}
.music-btn.on { color: var(--accent); border-color: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,160,108,.3); } 50% { box-shadow: 0 0 0 10px rgba(201,160,108,0); } }

/* ── mobil ── */
@media (max-width: 760px) {
    .chapter { grid-template-columns: 1fr; gap: 26px; padding: 56px 0; }
    .chapter.flip .chapter-media { order: 0; }
    .gallery { columns: 2; }
    .timecode { gap: 6px; padding: 16px 14px; }
    .tc-cell { min-width: 48px; }
}
@media (max-width: 420px) { .gallery { columns: 2; column-gap: 10px; } }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .grain, .scroll-hint span, .heart { animation: none !important; }
    html { scroll-behavior: auto; }
}
