* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'tnum' 1, 'cv05' 1;
    font-variant-numeric: tabular-nums;
    transition: background-color .18s linear, color .18s linear;
}

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

/* Rakam/kod alanları: sabit genişlik, hizalı */
.mono, table.rate-table td, table.hp-table td.hp-t-code, .hp-t-code, .hp-result-card .hp-code,
.result-value, .stat-value, table.data-table td {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
}

/* Klavye odak halkası — her iki temada net */
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

::selection { background: var(--brand); color: var(--brand-on); }

/* =========================  BAŞLIK / GEZİNME  ========================= */

header.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border-strong);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
    height: var(--nav-h);
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: 10px; }
.logo-img {
    display: block;
    height: 47.6px;
    width: auto;
}
.logo-text { font-size: 1.02rem; letter-spacing: -0.02em; white-space: nowrap; }
.logo-dark { color: var(--text); font-weight: 800; }
.logo-blue { color: var(--brand); font-weight: 800; }
.logo-domain { color: var(--text-faint); font-weight: 500; font-size: 0.78rem; margin-left: 1px; }

.nav-cluster { display: flex; align-items: center; gap: 8px; }

#themeToggle { display: none; }

nav.main-nav { display: flex; gap: 0; }

nav.main-nav a {
    padding: 8px 13px;
    border-radius: var(--r-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s, background-color .15s;
}

nav.main-nav a:hover { color: var(--text); background: var(--bg-alt); }

nav.main-nav a.active {
    color: #ffffff;
    background: var(--brand);
    font-weight: 700;
    border-bottom-color: transparent;
}

nav.main-nav a.active:hover {
    color: #ffffff;
    background: var(--brand-hover);
}

/* Tema düğmesi + mobil menü düğmesi */
.icon-btn {
    width: 34px; height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--r);
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: background-color .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); border-color: var(--border-heavy); }
.icon-btn svg { width: 17px; height: 17px; display: block; }
:root:not([data-theme="dark"]) .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
    nav.main-nav {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 6px;
        border-bottom: 1px solid var(--border-strong);
        box-shadow: var(--shadow-lift);
    }
    nav.main-nav.open { display: flex; }
    nav.main-nav a {
        text-align: left;
        padding: 11px 14px;
        border-bottom: 1px solid var(--border);
        border-left: 2px solid transparent;
    }
    nav.main-nav a:last-child { border-bottom: none; }
    nav.main-nav a.active {
        color: #ffffff;
        border-bottom-color: var(--border);
        border-left-color: transparent;
        background: var(--brand);
    }
    nav.main-nav a.active:hover {
        color: #ffffff;
        background: var(--brand-hover);
    }
    .nav-toggle { display: inline-flex; }
}

/* =========================  SAYFA İSKELETİ  ========================= */

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 24px 72px;
    min-height: 62vh;
}

.page-section { display: block; }

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: var(--r-sm);
    margin-bottom: 14px;
}
.page-kicker .dot { width: 5px; height: 5px; background: var(--accent); flex-shrink: 0; }

.page-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 8px;
    color: var(--text);
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 400;
    margin-bottom: 26px;
    max-width: 62ch;
}

/* Bölüm ayracı — sayfa içi net sınır */
.section-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 34px 0 16px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}
.section-rule::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* =========================  HERO BANNER  ========================= */

/* Full-bleed: hero sits outside constrained main */
.hero {
    position: relative;
    width: 100%;
    background:
        radial-gradient(1200px 420px at 50% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 70%),
        linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%);
    padding: 56px 24px 48px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-brand {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(2.1rem, 4.5vw, 3.1rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 10px 0 14px;
    color: var(--text);
}
.hero-brand .logo-blue { color: var(--brand); }
.hero-brand .logo-domain {
    color: var(--text-faint);
    font-size: 0.48em;
    font-weight: 500;
    margin-left: 2px;
    vertical-align: super;
}
.hero-title {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0 0 10px;
}
.hero-subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin: 0 auto 22px;
    max-width: 54ch;
}
.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.hero-actions .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    color: var(--text);
    font-weight: 600;
    font-size: 0.86rem;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    transition: border-color .15s, background-color .15s, color .15s;
}
.hero-actions .btn-ghost:hover {
    border-color: var(--brand-line);
    color: var(--brand);
    background: var(--surface);
}

/* Multi-page: her HTML dosyası kendi içeriğini gösterir */
.page-section { display: block; }
.tool-view { display: block; }

@keyframes fd-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-inner > * {
    animation: fd-rise .55s ease both;
}
.hero-inner > *:nth-child(2) { animation-delay: .06s; }
.hero-inner > *:nth-child(3) { animation-delay: .12s; }
.hero-inner > *:nth-child(4) { animation-delay: .18s; }
.hero-inner > *:nth-child(5) { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    .hero-inner > * { animation: none; }
}

.api-error {
    display: none;
    margin: 0 0 12px;
    padding: 12px 16px;
    border-radius: var(--r);
    border: 1px solid var(--neg);
    background: var(--neg-soft);
    color: var(--neg);
    font-size: 0.84rem;
    font-weight: 600;
}
.api-error.visible { display: block; }

