/* =========================================================
   MekiTech — mekitech.tr
   Tema tokenları: açık varsayılan, koyu sistem tercihi veya
   data-theme="dark" ile. Elle seçim localStorage'da tutulur.
   ========================================================= */

:root {
  --bg: #f6f7fc;
  --bg-alt: #eef0fa;
  --surface: #ffffff;
  --surface-2: #f2f4fb;
  --text: #0b1030;
  --muted: #545b7d;
  --border: #e1e4f2;
  --accent: #4f46e5;
  --accent-2: #0891b2;
  --accent-ink: #ffffff;
  --grad: linear-gradient(120deg, #0891b2 0%, #4f46e5 50%, #9333ea 100%);
  /* Beyaz yazı/ikon taşıyan yüzeyler için iki temada da koyu gradyan (kontrast) */
  --grad-solid: linear-gradient(120deg, #0891b2 0%, #4f46e5 50%, #9333ea 100%);
  --hero-glow-1: rgba(79, 70, 229, .16);
  --hero-glow-2: rgba(8, 145, 178, .14);
  --grid-line: rgba(79, 70, 229, .07);
  --shadow: 0 1px 2px rgba(16, 24, 64, .05), 0 12px 32px -12px rgba(16, 24, 64, .18);
  --header-bg: rgba(246, 247, 252, .78);

  /* Kazamatik marka renkleri (iki temada da aynı) */
  --kz-bg: #0b2d1e;
  --kz-bg-2: #174631;
  --kz-gold: #d4af37;
  --kz-gold-soft: #f2e2b3;
  --kz-ink: #e9f0e9;
  --kz-muted: #b6c1b8;

  --radius: 20px;
  --radius-sm: 12px;
  --container: 1160px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b1a;
    --bg-alt: #0b1124;
    --surface: #0f1530;
    --surface-2: #151c3c;
    --text: #e8ecff;
    --muted: #9aa3c7;
    --border: rgba(140, 160, 255, .14);
    --accent: #818cf8;
    --accent-2: #22d3ee;
    --accent-ink: #070b1a;
    --grad: linear-gradient(120deg, #22d3ee 0%, #818cf8 50%, #c084fc 100%);
    --hero-glow-1: rgba(99, 102, 241, .28);
    --hero-glow-2: rgba(34, 211, 238, .18);
    --grid-line: rgba(129, 140, 248, .08);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    --header-bg: rgba(7, 11, 26, .72);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #070b1a;
  --bg-alt: #0b1124;
  --surface: #0f1530;
  --surface-2: #151c3c;
  --text: #e8ecff;
  --muted: #9aa3c7;
  --border: rgba(140, 160, 255, .14);
  --accent: #818cf8;
  --accent-2: #22d3ee;
  --accent-ink: #070b1a;
  --grad: linear-gradient(120deg, #22d3ee 0%, #818cf8 50%, #c084fc 100%);
  --hero-glow-1: rgba(99, 102, 241, .28);
  --hero-glow-2: rgba(34, 211, 238, .18);
  --grid-line: rgba(129, 140, 248, .08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  --header-bg: rgba(7, 11, 26, .72);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 600; font-size: .975rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--grad-solid); color: #fff;
  box-shadow: 0 10px 28px -10px rgba(79, 70, 229, .65);
}
.btn-primary svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.btn-ghost {
  background: var(--surface); color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-ghost .play-ic { fill: currentColor; width: 18px; height: 18px; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .925rem; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Tema ikonları: koyu temadayken güneş, açıkken ay gösterilir */
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand img { border-radius: 10px; }
.brand-sm { font-size: 1.05rem; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: .95rem; color: var(--muted);
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .header-actions { margin-left: auto; }
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 2px; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 20%, var(--hero-glow-1), transparent 70%),
    radial-gradient(500px 360px at 10% 80%, var(--hero-glow-2), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero-inner { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 88px 0 104px; }
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 32px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .85rem; font-weight: 600; color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; margin: 20px 0 18px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.stats { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 24px; }
@media (min-width: 640px) { .stats { gap: 12px 40px; } }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stats span { font-size: .875rem; color: var(--muted); }
@media (max-width: 400px) { .stats strong { font-size: 1.35rem; } .stats span { font-size: .8rem; } }

.hero-visual { position: relative; height: 380px; max-width: 460px; width: 100%; margin: 0 auto; }
@media (min-width: 960px) { .hero-visual { height: 560px; } }
.hero-visual .glow {
  position: absolute; inset: 15% 10%; border-radius: 50%;
  background: var(--grad); filter: blur(70px); opacity: .45;
}
.shot {
  position: absolute; top: 50%; left: 50%;
  width: 52%; border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .08);
}
.shot-front { transform: translate(-50%, -50%); z-index: 2; }
.shot-back-l { transform: translate(-102%, -46%) rotate(-8deg) scale(.86); opacity: .9; }
.shot-back-r { transform: translate(2%, -46%) rotate(8deg) scale(.86); opacity: .9; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 960px) { .section { padding: 104px 0; } }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800; margin: 10px 0 12px; }
.kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Apps ---------- */
.apps-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) { .apps-grid { grid-template-columns: minmax(0, 1fr) 300px; } }

.app-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.app-kazamatik {
  position: relative;
  color: var(--kz-ink);
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(212, 175, 55, .16), transparent 60%),
    linear-gradient(160deg, var(--kz-bg-2), var(--kz-bg));
  border: 1px solid rgba(212, 175, 55, .28);
  display: grid; min-width: 0;
}
@media (min-width: 860px) { .app-kazamatik { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.app-card-body { padding: 28px 22px; min-width: 0; }
@media (min-width: 640px) { .app-card-body { padding: 36px; } }

.app-head { display: flex; align-items: center; gap: 16px; }
.app-icon { border-radius: 18px; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5); border: 1px solid rgba(212, 175, 55, .35); }
.app-kazamatik h3 { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; color: var(--kz-gold-soft); letter-spacing: .01em; }
.app-sub { font-size: .9rem; color: var(--kz-muted); }
.app-desc { margin: 20px 0 22px; color: var(--kz-ink); opacity: .92; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 560px) and (max-width: 859px) { .feature-list { grid-template-columns: 1fr 1fr; } }
.feature-list li { display: flex; gap: 12px; }
.f-ic { color: var(--kz-gold); font-size: .9rem; line-height: 1.6; }
.feature-list strong { display: block; font-weight: 600; font-size: .95rem; }
.feature-list span:not(.f-ic) { font-size: .875rem; color: var(--kz-muted); }

.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 26px; }
.play-badge { display: inline-block; margin-left: -10px; border-radius: 12px; transition: transform .2s ease; }
.play-badge:hover { transform: translateY(-1px); }
.play-badge img { width: 194px; }
.text-link { color: var(--kz-gold-soft); font-weight: 600; font-size: .925rem; padding: 12px 0; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.gallery {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 0 22px 28px; min-width: 0;
  scrollbar-width: thin; scrollbar-color: rgba(212, 175, 55, .45) transparent;
}
@media (min-width: 860px) { .gallery { padding: 36px 36px 36px 0; align-self: center; } }
.gallery img {
  flex: 0 0 auto; width: 200px; border-radius: 16px; scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, .08);
}
@media (min-width: 860px) { .gallery img { width: 220px; } }

.app-soon {
  background: var(--surface); border: 1px dashed var(--border);
  padding: 32px 26px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
  box-shadow: none;
}
.app-soon h3 { font-size: 1.25rem; font-weight: 700; }
.app-soon .muted { font-size: .95rem; }
.app-soon .btn { margin-top: auto; }
.soon-ic {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent);
}
.soon-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- Values ---------- */
.values-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }
.value {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .25s ease, border-color .25s ease;
}
.value:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.value h3 { font-size: 1.1rem; font-weight: 700; margin: 18px 0 8px; }
.value p { color: var(--muted); font-size: .95rem; }
.v-ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-solid); color: #fff;
}
.v-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden;
  display: grid; gap: 28px; align-items: center;
  padding: 36px 24px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.contact-card::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 420px; height: 420px;
  background: var(--grad); filter: blur(90px); opacity: .18; pointer-events: none;
}
.contact-card > * { position: relative; }
.contact-card h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 800; margin: 10px 0 12px; }
.contact-card .btn { justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
@media (min-width: 860px) {
  .contact-card { grid-template-columns: 1fr auto; padding: 52px 56px; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { color: var(--muted); font-size: .925rem; padding: 10px 0; }
.footer-links a:hover { color: var(--text); }
.copy { color: var(--muted); font-size: .875rem; margin-left: auto; }
@media (max-width: 640px) { .copy { margin-left: 0; width: 100%; } }

/* ---------- Reveal animasyonu (yalnızca JS varsa) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
