/* ============================================================
   TRV Game — landing page tasarım sistemi
   Marka renkleri index.php içinden :root ile override edilir.
   ============================================================ */

/* --- Tokens --------------------------------------------- */
:root {
    --paper:        #FBFBFD;
    --surface:      #FFFFFF;
    --ink:          #0C1220;
    --ink-soft:     #59637A;
    --ink-faint:    #8C95A8;
    --line:         #E4E7EF;
    --line-soft:    #EFF1F6;

    /* index.php bunları ezer */
    --brand:        #3D3BD9;
    --brand-deep:   #2B29A8;
    --brand-soft:   #EDEDFE;
    --accent:       #F2C14E;

    --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --font-body:    "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

    --gutter:       clamp(1.25rem, 5vw, 2.5rem);
    --measure:      1140px;
    --radius:       14px;
    --radius-lg:    22px;

    --shadow-sm:    0 1px 2px rgba(12, 18, 32, .05);
    --shadow-md:    0 4px 16px -4px rgba(12, 18, 32, .08), 0 1px 3px rgba(12, 18, 32, .04);
    --shadow-lg:    0 24px 56px -20px rgba(12, 18, 32, .16), 0 2px 8px rgba(12, 18, 32, .04);

    --ease:         cubic-bezier(.22, .68, .3, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Tipografi ------------------------------------------ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -.035em;
    margin: 0;
    text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.5vw, 4.75rem); }
h2 { font-size: clamp(1.95rem, 4.6vw, 3rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }

p { margin: 0; text-wrap: pretty; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand);
}

.lead-text {
    font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
    color: var(--ink-soft);
    line-height: 1.62;
    max-width: 54ch;
}

.muted { color: var(--ink-soft); }
.tiny  { font-size: .8125rem; line-height: 1.55; color: var(--ink-faint); }

/* --- Layout --------------------------------------------- */
.wrap {
    width: 100%;
    max-width: var(--measure);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.band { padding-block: clamp(4rem, 9vw, 7rem); }
.band--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.band--paper { background: var(--paper); }
.band--white { background: var(--surface); border-block: 1px solid var(--line-soft); }

.band-head { max-width: 42rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.band-head .eyebrow { display: block; margin-bottom: .9rem; }
.band-head p { margin-top: 1rem; }

/* --- Header --------------------------------------------- */
.site-head {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 251, 253, .82);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-head[data-stuck="true"] {
    border-bottom-color: var(--line);
    background: rgba(251, 251, 253, .94);
}

.site-head__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 66px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.03em;
    margin-right: auto;
}
.logo__mark {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 8px;
    background: var(--brand);
    display: grid;
    place-items: center;
    color: #fff;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.logo__studio {
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-left: .6rem;
    margin-left: .1rem;
    border-left: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}
.nav a {
    text-decoration: none;
    font-size: .925rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color .18s var(--ease);
}
.nav a:hover { color: var(--ink); }

.head-timer {
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: .34rem .7rem;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .nav, .head-timer { display: none; }
}

/* --- Butonlar ------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: -.005em;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s var(--ease), background .18s var(--ease),
                box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--brand);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--brand-deep); box-shadow: var(--shadow-lg); }

.btn--ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--ink-faint); }

.btn--sm { padding: .55rem 1rem; font-size: .875rem; border-radius: 9px; }

/* --- Hero ----------------------------------------------- */
.hero {
    position: relative;
    padding-top: clamp(2.75rem, 6vw, 4.5rem);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -40% 20% auto -20%;
    height: 780px;
    background: radial-gradient(closest-side, var(--brand-soft), transparent 72%);
    opacity: .85;
    pointer-events: none;
    z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .38rem .85rem .38rem .55rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand);
    position: relative;
    flex: none;
}
.badge__dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid var(--brand);
    opacity: 0;
    animation: ping 2.6s var(--ease) infinite;
}
@keyframes ping {
    0%   { opacity: .7; transform: scale(.6); }
    70%  { opacity: 0;  transform: scale(1.5); }
    100% { opacity: 0;  transform: scale(1.5); }
}

.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .accented { color: var(--brand); }

.hero__sub { margin-bottom: 2rem; }

.platforms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .9rem;
    margin-top: 1.75rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.platforms span::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
    margin-right: .5rem;
    opacity: .55;
}

/* --- SIGNATURE: geri sayım ------------------------------ */
.countdown {
    margin-bottom: 1.75rem;
}

.countdown__clock {
    display: flex;
    align-items: flex-end;
    gap: clamp(.5rem, 2vw, 1.15rem);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.unit { display: flex; flex-direction: column; }
.unit__num {
    font-size: clamp(2.35rem, 8vw, 4.15rem);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.055em;
    color: var(--ink);
}
.unit__label {
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-top: .6rem;
}
.unit--sec .unit__num { color: var(--brand); }

.sep {
    font-size: clamp(1.5rem, 5vw, 2.6rem);
    font-weight: 500;
    line-height: 1;
    color: var(--line);
    padding-bottom: 1.6rem;
}

/* 10 günlük takvim şeridi */
.rail {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.rail__track {
    display: flex;
    gap: 5px;
}
.rail__day {
    flex: 1 1 0;
    height: 8px;
    border-radius: 3px;
    background: var(--line);
    transition: background .3s var(--ease);
}
.rail__day[data-state="past"]  { background: color-mix(in srgb, var(--brand) 32%, var(--line)); }
.rail__day[data-state="today"] {
    background: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.rail__legend {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.rail__legend strong { color: var(--ink); font-weight: 700; }

/* Sayaç bittiğinde */
.countdown[data-live="true"] .countdown__clock,
.countdown[data-live="true"] .rail { display: none; }
.countdown__live {
    display: none;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--brand);
}
.countdown[data-live="true"] .countdown__live { display: block; }

/* --- Form ----------------------------------------------- */
.signup { max-width: 30rem; }

.signup__row {
    display: flex;
    gap: .55rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: .4rem;
    box-shadow: var(--shadow-md);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.signup__row:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-md);
}

.signup__row input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: none;
    padding: .6rem .5rem .6rem .85rem;
    font-size: .975rem;
    outline: none;
}
.signup__row input::placeholder { color: var(--ink-faint); }

.signup__note { margin-top: .8rem; }

.signup__msg {
    margin-top: .85rem;
    font-size: .9rem;
    font-weight: 500;
    padding: .7rem .9rem;
    border-radius: 10px;
    display: none;
}
.signup__msg[data-state="ok"] {
    display: block;
    background: var(--brand-soft);
    color: var(--brand-deep);
}
.signup__msg[data-state="error"] {
    display: block;
    background: #FDECEC;
    color: #A32020;
}

.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Key art -------------------------------------------- */
.keyart {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.keyart svg { width: 100%; height: 100%; }
.keyart__tag {
    position: absolute;
    left: 1.15rem;
    bottom: 1.15rem;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .35rem .7rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* --- Kart ızgarası -------------------------------------- */
.grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}
.card__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    margin-bottom: 1.1rem;
}
.card__icon svg { width: 19px; height: 19px; }
.card h3 { margin-bottom: .55rem; }
.card p { font-size: .95rem; color: var(--ink-soft); line-height: 1.6; }

/* --- Özellik blokları ----------------------------------- */
.feature {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.feature + .feature { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
/* Sırayı nth-child'a bırakmıyoruz: başlık bloğu varsa/yoksa kayıyor. */
.feature[data-flip] .feature__art { order: -1; }

.feature__num {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--brand);
    display: block;
    margin-bottom: .85rem;
}
.feature h3 {
    font-size: clamp(1.5rem, 3.2vw, 2.05rem);
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: .9rem;
}
.feature p { color: var(--ink-soft); max-width: 46ch; }

.feature__list {
    list-style: none;
    margin: 1.4rem 0 0;
    padding: 0;
    display: grid;
    gap: .65rem;
}
.feature__list li {
    display: flex;
    gap: .65rem;
    font-size: .95rem;
    color: var(--ink-soft);
}
.feature__list li::before {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: .32rem;
    border-radius: 50%;
    background-color: var(--brand-soft);
    background-image: radial-gradient(circle at center, var(--brand) 3px, transparent 3.5px);
}

.feature__art {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.feature__art svg { width: 100%; height: 100%; }

/* --- Zaman çizelgesi ------------------------------------ */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    counter-reset: step;
}
.steps li {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    align-items: start;
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps__when {
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: .01em;
    padding-top: .18rem;
}
.steps__what strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: .3rem;
}
.steps__what p { font-size: .95rem; color: var(--ink-soft); }
.steps li[data-done="true"] .steps__when { color: var(--ink-faint); }

/* --- FAQ ------------------------------------------------ */
.faq { max-width: 46rem; }
.faq details {
    border-top: 1px solid var(--line);
    padding: 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 1.25rem 2.5rem 1.25rem 0;
    position: relative;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.02em;
    transition: color .18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }
.faq summary::after {
    content: "";
    position: absolute;
    right: .35rem;
    top: 50%;
    width: 11px;
    height: 11px;
    margin-top: -6px;
    border-right: 2px solid var(--ink-faint);
    border-bottom: 2px solid var(--ink-faint);
    transform: rotate(45deg);
    transition: transform .22s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p {
    padding: 0 2.5rem 1.4rem 0;
    color: var(--ink-soft);
    font-size: .975rem;
    margin-top: -.25rem;
}

/* --- Kapanış CTA ---------------------------------------- */
.closer {
    background: var(--ink);
    border-radius: var(--radius-lg);
    padding: clamp(2.5rem, 6vw, 4.25rem);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.closer::before {
    content: "";
    position: absolute;
    inset: auto -10% -60% 40%;
    height: 460px;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 55%, transparent), transparent 70%);
    pointer-events: none;
}
.closer > * { position: relative; }
.closer .eyebrow { color: var(--accent); }
.closer h2 { color: #fff; margin-block: .9rem 1rem; }
.closer p { color: rgba(255, 255, 255, .72); max-width: 44ch; }
.closer .signup { margin-top: 2rem; }
.closer .signup__row {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .16);
    box-shadow: none;
}
.closer .signup__row:focus-within {
    border-color: rgba(255, 255, 255, .4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .08);
}
.closer .signup__row input[type="email"] { color: #fff; }
.closer .signup__row input::placeholder { color: rgba(255, 255, 255, .45); }
.closer .signup__note { color: rgba(255, 255, 255, .5); }
.closer .signup__msg[data-state="ok"] {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* --- Footer --------------------------------------------- */
.site-foot {
    border-top: 1px solid var(--line);
    padding-block: 2.75rem 3.5rem;
    background: var(--paper);
}
.site-foot__top {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.75rem;
}
.site-foot__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    font-size: .9rem;
}
.site-foot__links a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color .18s var(--ease);
}
.site-foot__links a:hover { color: var(--ink); }
.site-foot__legal {
    border-top: 1px solid var(--line-soft);
    padding-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 2rem;
    justify-content: space-between;
}

/* --- Scroll reveal -------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------- */
@media (max-width: 940px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__art { max-width: 26rem; width: 100%; margin-inline: auto; }
    .feature { grid-template-columns: 1fr; gap: 2rem; }
    .feature[data-flip] .feature__art { order: 0; }
}

@media (max-width: 560px) {
    html { scroll-padding-top: 76px; }
    .signup__row { flex-direction: column; padding: .5rem; }
    .signup__row input[type="email"] { padding: .7rem .85rem; }
    .signup__row .btn { width: 100%; }
    .sep { display: none; }
    .countdown__clock { gap: 1.35rem; }
    /* Kalan gün zaten sayaçta yazıyor — dar ekranda tekrarı at, tarihler kalsın. */
    .rail__legend { font-size: .63rem; letter-spacing: .06em; }
    .rail__legend span:nth-child(2) { display: none; }
    .steps li { grid-template-columns: 1fr; gap: .4rem; }
    .site-foot__top { flex-direction: column; align-items: flex-start; }
}

/* --- Hareket tercihi ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}
