/*
 * Akıllı Cüzdanım web sitesi. Uygulamanın kart görsel diliyle aynı belirteçler
 * (BudgetTracker/src/theme/surface.js + markdown.js): beyaz kart, 16 radius, #E6EAF0 kenarlık,
 * renkli ikon karoları, lacivert (indigo) hero kart. Koyu tema prefers-color-scheme ile.
 * Harici font yok: sistem yazı tipi yığını.
 */

:root {
    color-scheme: light dark;

    --screen: #F4F6FA;
    --card: #FFFFFF;
    --border: #E6EAF0;
    --divider: #EEF2F6;
    --subtle: #F8FAFC;
    --heading: #102A43;
    --text: #243B53;
    --muted: #52687F;
    --accent: #4F46E5;
    --accent-soft: #EEF2FF;
    --hero: #1E1B4B;
    --hero-line: #312E81;
    --hero-muted: #C7D2FE;
    --hero-label: #A5B4FC;
    --green: #4CAF50;
    --green-text: #2E7D32;
    --green-soft: #E8F5E9;
    --purple: #7C3AED;
    --purple-soft: #F3E8FF;
    --amber: #B45309;
    --amber-soft: #FEF3C7;
    --amber-border: #FDE68A;
    --blue: #1D4ED8;
    --blue-soft: #DBEAFE;
    --rose: #BE123C;
    --rose-soft: #FFE4E6;
    --teal: #0F766E;
    --teal-soft: #CCFBF1;
    --shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
    --header-bg: rgba(255, 255, 255, 0.88);
    --store-bg: #FFFFFF;
    --store-text: #102A43;

    --radius: 16px;
    --radius-sm: 12px;
    --tile-radius: 10px;
    --gutter: 16px;
    --max: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --screen: #0B1220;
        --card: #111A2E;
        --border: #1F2A40;
        --divider: #1A2438;
        --subtle: #162036;
        --heading: #E6EDF7;
        --text: #C9D4E5;
        --muted: #9AABC4;
        --accent: #A5B4FC;
        --accent-soft: #1E2147;
        --hero: #191A3F;
        --hero-line: #2E2C6E;
        --green-text: #4ADE80;
        --green-soft: #0F2A1C;
        --purple: #C4B5FD;
        --purple-soft: #2A1B4D;
        --amber: #FBBF24;
        --amber-soft: #2B2111;
        --amber-border: #5C4413;
        --blue: #93C5FD;
        --blue-soft: #132544;
        --rose: #FDA4AF;
        --rose-soft: #3A1520;
        --teal: #5EEAD4;
        --teal-soft: #0E2B2A;
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
        --header-bg: rgba(15, 23, 41, 0.88);
        --store-bg: #FFFFFF;
        --store-text: #102A43;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--screen);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent);
    text-underline-offset: 2px;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

h1,
h2,
h3 {
    color: var(--heading);
    line-height: 1.25;
    margin: 0;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -60px;
    z-index: 100;
    background: var(--card);
    color: var(--heading);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-weight: 600;
}

.skip-link:focus {
    top: 10px;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ===== Başlık ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--heading);
    font-weight: 800;
    font-size: 1.06rem;
    text-decoration: none;
    white-space: nowrap;
    margin-right: auto;
}

.logo img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--heading);
    background: var(--subtle);
}

.nav-link[aria-current="page"] {
    color: var(--green-text);
    background: var(--green-soft);
}

.lang-switcher {
    display: inline-flex;
    background: var(--subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
}

.lang-btn {
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 6px 11px;
    min-width: 40px;
    min-height: 32px;
    cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
    background: var(--card);
    color: var(--heading);
    box-shadow: var(--shadow);
}

@media (max-width: 760px) {
    .header-content {
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 6px;
        min-height: 0;
    }

    .nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 0 calc(var(--gutter) * -1);
        padding: 4px var(--gutter) 6px;
        width: calc(100% + var(--gutter) * 2);
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        padding: 7px 10px;
        font-size: 0.86rem;
    }
}

/* ===== Ana içerik ===== */
.main-content {
    flex: 1;
    padding: 28px 0 56px;
}

.section {
    margin-top: 56px;
}

.section-header {
    max-width: 640px;
    margin-bottom: 24px;
}

.section-header.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.overline {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.section-subtitle {
    color: var(--muted);
    margin: 10px 0 0;
    font-size: 1.02rem;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--hero);
    color: #FFFFFF;
    border-radius: 24px;
    padding: clamp(28px, 5vw, 56px);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: center;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 520px;
    height: 520px;
    right: -180px;
    top: -220px;
    background: var(--hero-line);
    opacity: 0.55;
}

.hero::after {
    width: 300px;
    height: 300px;
    left: -120px;
    bottom: -200px;
    background: var(--hero-line);
    opacity: 0.35;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--hero-muted);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(199, 210, 254, 0.25);
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 18px;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.hero-title {
    color: #FFFFFF;
    font-size: clamp(2rem, 1.4rem + 3vw, 3.3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero-title .hl {
    color: #86EFAC;
}

.hero-subtitle {
    color: var(--hero-muted);
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
    margin: 18px 0 26px;
    max-width: 560px;
}

.app-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 18px 10px 14px;
    background: var(--store-bg);
    color: var(--store-text);
    border-radius: var(--radius-sm);
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease;
}

.store-btn:hover {
    transform: translateY(-1px);
}

.store-btn svg {
    width: 26px;
    height: 26px;
    flex: none;
}

.store-btn-content {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.store-btn-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    color: #52687F;
}

.store-btn-title {
    font-size: 1.08rem;
    font-weight: 800;
}

.hero-note {
    margin: 18px 0 0;
    font-size: 0.82rem;
    color: var(--hero-label);
}

/* Hero görseli: uygulama kartlarının küçük bir canlandırması (yalnızca süs, aria-hidden) */
.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-card {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-lg);
}

.mock-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mock-row + .mock-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--divider);
}

.mock-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.mock-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--heading);
    font-variant-numeric: tabular-nums;
}

.mock-line {
    flex: 1;
    min-width: 0;
}

.mock-title {
    font-weight: 700;
    color: var(--heading);
    font-size: 0.92rem;
}

.mock-sub {
    font-size: 0.78rem;
    color: var(--muted);
}

.mock-amount {
    font-weight: 700;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
    color: var(--heading);
}

.mock-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--divider);
    overflow: hidden;
    margin-top: 10px;
}

.mock-bar span {
    display: block;
    height: 100%;
    width: 62%;
    background: var(--green);
    border-radius: inherit;
}

.mock-chip {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

@media (max-width: 880px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hero {
        border-radius: 20px;
    }

    .store-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .hero-visual .mock-card:last-child {
        display: none;
    }
}

/* ===== Kartlar ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 14px 0 6px;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.icon-tile {
    width: 44px;
    height: 44px;
    border-radius: var(--tile-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.icon-tile svg {
    width: 24px;
    height: 24px;
}

.tone-green { background: var(--green-soft); color: var(--green-text); }
.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tone-indigo { background: var(--accent-soft); color: var(--accent); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-rose { background: var(--rose-soft); color: var(--rose); }
.tone-teal { background: var(--teal-soft); color: var(--teal); }

.tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 9px;
    margin-left: 6px;
    vertical-align: middle;
    background: var(--subtle);
    border: 1px solid var(--border);
    color: var(--muted);
}

/* Yapay zeka bölümü: madde listesi kartı */
.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.check-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
}

.check-list li + li {
    border-top: 1px solid var(--divider);
}

.check-list .icon-tile {
    width: 36px;
    height: 36px;
}

.check-list .icon-tile svg {
    width: 20px;
    height: 20px;
}

.check-list strong {
    display: block;
    color: var(--heading);
}

.check-list span.desc {
    color: var(--muted);
    font-size: 0.94rem;
}

/* Uyarı kutusu (uygulamadaki AiDisclaimer ile aynı ton) */
.notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--amber-soft);
    border: 1px solid var(--amber-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--text);
    align-self: start;
}

.notice .icon-tile {
    background: var(--card);
    color: var(--amber);
}

.notice h2,
.notice h3,
.notice .notice-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--heading);
}

.notice p {
    margin: 0;
    font-size: 0.93rem;
}

/* Gizlilik/güvenlik satırları */
.stat-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.stat-row h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.stat-row p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

/* CTA hero (alt) */
.cta {
    background: var(--hero);
    color: #FFFFFF;
    border-radius: 20px;
    padding: clamp(24px, 4vw, 40px);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.cta h2 {
    color: #FFFFFF;
    font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
    font-weight: 800;
}

.cta p {
    margin: 6px 0 0;
    color: var(--hero-muted);
}

/* ===== Belge sayfaları (gizlilik, koşullar, hesap silme) ===== */
.doc-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.doc-head h1 {
    font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
    font-weight: 800;
}

.doc {
    max-width: 820px;
    margin: 0 auto;
}

.doc .card {
    padding: clamp(20px, 3.5vw, 36px);
}

.doc article.card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 28px 0 8px;
    padding-top: 20px;
    border-top: 1px solid var(--divider);
}

.doc article.card h2:first-of-type {
    margin-top: 20px;
}

.doc .card p,
.doc .card li {
    color: var(--text);
}

.doc .card p {
    margin: 0 0 12px;
}

.doc .card ul,
.doc .card ol {
    margin: 0 0 12px;
    padding-left: 1.3rem;
}

.doc .card li {
    margin: 6px 0;
}

.doc .card li::marker {
    color: var(--green);
}

.doc .card strong {
    color: var(--heading);
}

.text-muted {
    color: var(--muted) !important;
    font-size: 0.9rem;
}

.doc-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--subtle);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
    margin: 0 0 16px !important;
}

.doc-related {
    margin-top: 16px;
}

.doc-related a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--heading);
    font-weight: 600;
}

.doc-related a .chev {
    margin-left: auto;
    color: var(--muted);
}

.doc-related a span.sub {
    display: block;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--muted);
}

/* Eski sayfa sınıfı: koşullardaki sorumluluk reddi kutusu */
.disclaimer-box {
    background: var(--amber-soft);
    border: 1px solid var(--amber-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin: 16px 0;
}

.disclaimer-title {
    display: block;
    font-weight: 800;
    color: var(--amber);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.disclaimer-text {
    margin: 0 !important;
}

/* Hesap silme adımları: numaralı liste */
.steps {
    list-style: none;
    counter-reset: step;
    padding-left: 0 !important;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 40px;
    min-height: 28px;
    margin: 10px 0 !important;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--green-soft);
    color: var(--green-text);
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Düğmeler ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--green-text);
    color: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
    .btn-primary {
        background: var(--green);
        color: #0B1220;
    }
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-secondary {
    background: var(--card);
    color: var(--heading);
    border-color: var(--border);
}

/* ===== Destek / SSS ===== */
.faq details {
    border-top: 1px solid var(--divider);
}

.faq details:first-of-type {
    border-top: 0;
}

.faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-weight: 700;
    color: var(--heading);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    margin-left: auto;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--muted);
}

.faq details[open] summary::after {
    content: "\2212";
}

.faq details > div {
    padding: 0 0 14px;
    color: var(--text);
}

.faq details > div p {
    margin: 0 0 8px;
}

/* ===== Şifre sıfırlama ===== */
.center-card {
    max-width: 480px;
    margin: 24px auto 0;
    text-align: center;
}

.center-card .icon-tile {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 0 auto 16px;
}

.center-card .icon-tile svg {
    width: 32px;
    height: 32px;
}

.center-card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.center-card > p {
    color: var(--muted);
    margin: 0 0 20px;
}

.manual-section {
    background: var(--subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
}

.manual-section p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.manual-section p:last-child {
    margin-bottom: 0;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--divider);
    border-top-color: var(--green);
    border-radius: 50%;
    margin: 8px auto 16px;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }
}

/* ===== Alt bilgi ===== */
.footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 28px 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    align-items: flex-start;
    justify-content: space-between;
}

.footer .logo {
    margin: 0 0 6px;
}

.footer-note {
    color: var(--muted);
    max-width: 420px;
    margin: 0;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    padding: 4px 0;
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--divider);
    color: var(--muted);
    font-size: 0.82rem;
}

.footer-bottom p {
    margin: 0;
}
