/* ==========================================================================
   Enes Ticaret — siteye özel stiller
   Tailwind CDN paletin çoğunu taşır; burada yalnızca utility ile ifade
   edilemeyen parçalar var: doku, uyarı şeridi, açılır menü, reveal animasyonu.
   Palet bilinçli olarak panelden (zinc/emerald) farklıdır: antrasit + sinyal sarısı.
   ========================================================================== */

:root {
    --ink-950: #0E1013;   /* en koyu zemin */
    --ink-900: #16181C;   /* ana koyu zemin */
    --ink-800: #1E2126;   /* kart zemini */
    --ink-700: #2A2E35;   /* yükseltilmiş yüzey */
    --line:    #383D45;   /* ayırıcı çizgi */
    --paper:   #F4F2EE;   /* açık zemin (beton/kağıt) */
    --paper-2: #E5E2DA;   /* açık zemin ikinci ton */
    --stone:   #6C6960;   /* açık zeminde ikincil metin */
    --ash:     #A8A49B;   /* koyu zeminde ikincil metin */
    --signal:  #F5B700;   /* sinyal sarısı — ana vurgu */
    --signal-d:#C99700;   /* açık zeminde okunur sarı */
    --rust:    #C2410C;   /* ikincil vurgu (pas turuncusu) */

    --header-h: 72px;
}

/* --- Temel ------------------------------------------------------------- */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--paper);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.font-display {
    font-family: Archivo, Inter, ui-sans-serif, system-ui, Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Bölüm hedefleri sabit başlığın altında kalmasın */
section[id], main[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Görünür odak halkası — her yerde, klavye kullanıcısı kaybolmasın */
:focus-visible {
    outline: 3px solid var(--signal);
    outline-offset: 3px;
    border-radius: 2px;
}
.on-dark :focus-visible { outline-color: var(--signal); }

/* İçeriğe atla bağlantısı */
.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 100;
    background: var(--signal); color: var(--ink-900);
    padding: 12px 18px; font-weight: 700; border-radius: 2px;
    transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* --- Dokular ----------------------------------------------------------- */

/* Teknik çizim ızgarası (koyu zemin) */
.tex-blueprint {
    background-image:
        linear-gradient(to right, rgba(245, 183, 0, .055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 183, 0, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    background-position: center;
}

/* Teknik çizim ızgarası (açık zemin) */
.tex-blueprint-light {
    background-image:
        linear-gradient(to right, rgba(22, 24, 28, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(22, 24, 28, .06) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* Beton dokusu — hafif lekeli, düz renge derinlik katar */
.tex-concrete {
    background-color: var(--paper-2);
    background-image:
        radial-gradient(circle at 18% 22%, rgba(22, 24, 28, .05) 0, transparent 42%),
        radial-gradient(circle at 82% 12%, rgba(22, 24, 28, .04) 0, transparent 38%),
        radial-gradient(circle at 62% 88%, rgba(22, 24, 28, .05) 0, transparent 45%);
}

/* Uyarı şeridi — nalburun sarı/siyah bandı */
.hazard-bar {
    height: 10px;
    background-image: repeating-linear-gradient(
        45deg,
        var(--signal) 0 14px,
        var(--ink-900) 14px 28px
    );
}
.hazard-bar--thin { height: 6px; }

/* Bölüm etiketi: "01 / ÜRÜN GRUPLARI" */
.kicker {
    display: inline-flex; align-items: center; gap: .65rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .18em;
    text-transform: uppercase;
}
.kicker::before {
    content: ""; width: 30px; height: 3px; background: var(--signal); flex: none;
}

/* --- Butonlar ---------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 48px; padding: 0 1.35rem;
    font-weight: 700; font-size: .95rem; letter-spacing: .01em;
    border: 2px solid transparent; border-radius: 2px;
    transition: transform .12s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
    text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn-signal { background: var(--signal); color: var(--ink-900); }
.btn-signal:hover { background: #FFC91F; }

.btn-ghost-dark { border-color: var(--line); color: var(--paper); }
.btn-ghost-dark:hover { border-color: var(--signal); color: var(--signal); }

.btn-ghost-light { border-color: rgba(22, 24, 28, .25); color: var(--ink-900); }
.btn-ghost-light:hover { border-color: var(--ink-900); background: var(--ink-900); color: var(--paper); }

/* --- Başlık / navigasyon ----------------------------------------------- */

.site-header {
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
    background: rgba(22, 24, 28, .92);
    border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
    background: rgba(14, 16, 19, .97);
    border-bottom-color: var(--line);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .9);
}
@supports (backdrop-filter: blur(8px)) {
    .site-header { backdrop-filter: blur(10px) saturate(1.1); }
}

.nav-link {
    position: relative;
    display: inline-flex; align-items: center;
    min-height: 44px; padding: 0 .8rem;
    font-size: .92rem; font-weight: 600; color: #D6D3CC;
    transition: color .15s ease;
}
.nav-link:hover { color: var(--signal); }
.nav-link::after {
    content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 12px;
    height: 2px; background: var(--signal);
    transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.nav-link:hover::after,
.nav-link[aria-current="true"]::after { transform: scaleX(1); }
.nav-link[aria-current="true"] { color: #FFF; }

/* Hamburger ikonu — üç çizgi, açıkken çarpı */
.burger-line {
    display: block; width: 22px; height: 2px; background: currentColor;
    transition: transform .2s ease, opacity .15s ease;
}
.burger-line + .burger-line { margin-top: 5px; }
[aria-expanded="true"] .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobil çekmece */
.drawer {
    position: fixed; inset: calc(var(--header-h) + 6px) 0 0 auto;
    width: min(88vw, 340px);
    background: var(--ink-950);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    /* Kapalıyken görünmez: klavye sekmesi ekran dışındaki bağlantılara takılmasın */
    visibility: hidden;
    transition: transform .24s cubic-bezier(.4, 0, .2, 1), visibility .24s;
    overflow-y: auto;
    z-index: 60;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer-link {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 56px; padding: 0 1.25rem;
    font-size: 1.02rem; font-weight: 600; color: #E7E4DD;
    border-bottom: 1px solid rgba(56, 61, 69, .7);
}
.drawer-link:hover { background: var(--ink-800); color: var(--signal); }
.drawer-backdrop {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(8, 9, 11, .6);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }

@media (min-width: 1024px) {
    .drawer, .drawer-backdrop { display: none !important; }
}

/* --- Kartlar ----------------------------------------------------------- */

.card-product {
    position: relative;
    background: #FFF;
    border: 1px solid rgba(22, 24, 28, .12);
    border-radius: 2px;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card-product::before {
    /* sol kenarda ince sarı işaret — hover'da büyür */
    content: ""; position: absolute; left: -1px; top: 1.6rem; bottom: 1.6rem;
    width: 3px; background: var(--signal);
    transform: scaleY(0); transform-origin: top;
    transition: transform .22s ease;
}
.card-product:hover {
    border-color: rgba(22, 24, 28, .3);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -28px rgba(22, 24, 28, .7);
}
.card-product:hover::before { transform: scaleY(1); }

/* Ürün ikonu kutusu */
.icon-plate {
    width: 56px; height: 56px; flex: none;
    display: grid; place-items: center;
    background: var(--ink-900); color: var(--signal);
    border-radius: 2px;
}
.card-product--wide .icon-plate { background: var(--signal); color: var(--ink-900); }

/* Hizmet satırı — numaralı, karttan farklı bir desen */
.service-row {
    display: grid; gap: 1rem 1.5rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--line);
    transition: background-color .18s ease;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 768px) {
    .service-row { grid-template-columns: 5.5rem 15rem 1fr; align-items: start; }
}

/* --- SSS (details/summary) — JS olmadan da çalışır --------------------- */

.faq-item {
    border: 1px solid rgba(22, 24, 28, .14);
    border-radius: 2px;
    background: #FFF;
}
.faq-item + .faq-item { margin-top: .75rem; }
.faq-item[open] { border-color: rgba(22, 24, 28, .32); }
.faq-item > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 56px; padding: 1rem 1.15rem;
    cursor: pointer; list-style: none;
    font-weight: 700; font-size: 1rem;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
    content: ""; flex: none; width: 14px; height: 14px;
    border-right: 2px solid var(--ink-900); border-bottom: 2px solid var(--ink-900);
    transform: rotate(45deg) translate(-3px, -3px);
    transition: transform .2s ease;
}
.faq-item[open] > summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-item > .faq-body { padding: 0 1.15rem 1.25rem; color: var(--stone); line-height: 1.7; }

/* --- Form -------------------------------------------------------------- */

.field-label {
    display: block; margin-bottom: .4rem;
    font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ash);
}
.field {
    width: 100%; min-height: 48px; padding: .7rem .9rem;
    background: var(--ink-800); color: var(--paper);
    border: 1px solid var(--line); border-radius: 2px;
    font-size: .98rem;
    transition: border-color .15s ease, background-color .15s ease;
}
.field::placeholder { color: #7C7972; }
.field:hover { border-color: #4A5058; }
.field:focus { border-color: var(--signal); background: var(--ink-700); outline-offset: 1px; }
textarea.field { min-height: 132px; resize: vertical; }
select.field {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ash) 50%),
        linear-gradient(135deg, var(--ash) 50%, transparent 50%);
    background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.6rem;
}

/* Onay kutusu — dokunma hedefi geniş */
.check-row { display: flex; gap: .75rem; align-items: flex-start; min-height: 44px; }
.check-row input[type="checkbox"] {
    width: 20px; height: 20px; margin-top: 2px; flex: none;
    accent-color: var(--signal);
}

/* Harita yer tutucusu */
.map-slot {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--ink-800);
    border: 1px dashed var(--line);
    border-radius: 2px;
    overflow: hidden;
}

/* --- Sayaç / rakam bandı ----------------------------------------------- */

.stat-cell { padding: 1.5rem 0; }
@media (min-width: 640px) {
    .stat-cell { border-left: 1px solid rgba(245, 183, 0, .22); padding: .25rem 1.5rem; }
    .stat-cell:first-child { border-left: 0; padding-left: 0; }
}
.stat-num {
    font-family: Archivo, Inter, sans-serif; font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.25rem); line-height: 1;
    color: var(--signal); letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
/* Rakam yerine kelime yazan hücre (ör. "Aynı gün") taşmasın */
.stat-num.stat-num--metin { font-size: clamp(1.7rem, 3.4vw, 2.35rem); }

/* --- Scroll ile beliren bölümler --------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
}
.reveal.is-in { opacity: 1; transform: none; }
/* JS kapalıysa içerik yine görünsün */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .card-product:hover { transform: none; }
    .btn:active { transform: none; }
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* --- Küçük parçalar ---------------------------------------------------- */

.rule-label {
    /* teknik çizim ölçü etiketi hissi */
    font-size: .7rem; letter-spacing: .22em; text-transform: uppercase;
    color: var(--ash);
}

.link-quiet { color: var(--ash); transition: color .15s ease; }
.link-quiet:hover { color: var(--signal); }

.tag {
    display: inline-block; padding: .3rem .6rem;
    font-size: .74rem; font-weight: 600; letter-spacing: .04em;
    background: rgba(22, 24, 28, .06); color: var(--stone);
    border-radius: 2px;
}

/* Hero'daki teknik çizim, dar ekranda taşmasın */
.hero-figure svg { width: 100%; height: auto; display: block; }
