/* =====================================================================
   1. DESIGN TOKENS
   Theme colors (--c1..--c3, --void, --navy) are overwritten at runtime
   by HeroEngine.setTheme(), so the CSS gradient and the canvas always
   share one palette.
   ===================================================================== */
:root {
  --void: #03050D;      /* page background, near black navy */
  --navy: #0A1233;      /* deep navy glow */
  --c1: #3EE6FF;        /* cyan accent */
  --c2: #4D7CFF;        /* electric blue */
  --c3: #9B5CFF;        /* violet */
  --ink: #EEF2FF;       /* primary text */
  --muted: #A7B1D6;     /* secondary text */
  --line: rgba(238, 242, 255, 0.16);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--void); color: var(--ink); font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =====================================================================
   2. HERO SHELL + LAYER STACK
   z-order (back to front): gradient (-3) → canvas (-2) → scrim (-1) → content
   ===================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;              /* stable height on mobile browsers */
  display: flex;
  flex-direction: column;
  background: var(--void);
}

/* Animated gradient: two very large soft blobs moved with transform only
   (compositor-friendly, no filter blur, no repaint of the canvas). */
.hero__bg {
  position: absolute; inset: 0; z-index: -3; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 115%, color-mix(in srgb, var(--navy) 95%, transparent), transparent 65%),
    var(--void);
}
.hero__bg::before, .hero__bg::after {
  content: ""; position: absolute; width: 95vmax; height: 95vmax; border-radius: 50%;
  will-change: transform;
}
.hero__bg::before {
  top: -48vmax; right: -34vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c3) 24%, transparent), transparent);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.hero__bg::after {
  bottom: -55vmax; left: -30vmax;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c2) 20%, transparent), transparent);
  animation: drift-b 34s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate3d(-12vmax, 10vmax, 0) scale(1.1); } }
@keyframes drift-b { to { transform: translate3d(14vmax, -8vmax, 0) scale(0.92); } }

.hero__canvas {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; display: block;
  pointer-events: none;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero.is-ready .hero__canvas { opacity: 1; }

/* Scrim keeps the text side calm so contrast stays readable. */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--void) 80%, transparent) 0%,
                           color-mix(in srgb, var(--void) 45%, transparent) 40%,
                           transparent 64%),
    linear-gradient(0deg, color-mix(in srgb, var(--void) 55%, transparent), transparent 28%);
}

/* =====================================================================
   3. NAV + CONTENT
   ===================================================================== */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-size: 1.3rem; font-weight: 650; letter-spacing: -0.03em;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.nav__right { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
.nav__links { display: flex; gap: clamp(18px, 2.6vw, 40px); list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav__links a:hover { color: var(--ink); }

/* Language switch: TR / EN */
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch button {
  min-width: 36px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer; transition: color 0.2s, background 0.2s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }

.hero__content {
  flex: 1; display: flex; align-items: center;
  padding: clamp(24px, 6vh, 64px) var(--gutter) clamp(72px, 12vh, 128px);
}
.hero__copy { max-width: min(38rem, 52vw); }

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 650;
  text-wrap: balance;
}
.lead {
  margin: clamp(18px, 2.6vh, 28px) 0 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: clamp(28px, 4vh, 40px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 12px;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none;
  background: var(--c1); color: #03101A;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 22%, transparent),
              0 10px 36px color-mix(in srgb, var(--c1) 35%, transparent);
}
.link {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
}
.link:hover { border-color: var(--c1); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--c1); outline-offset: 4px; border-radius: 8px; }

/* =====================================================================
   4. RESPONSIVE
   ===================================================================== */
@media (max-width: 699px) {
  .nav__links li:not(:last-child) { display: none; }
}
/* Portrait tablets and phones: visual on top, copy anchored at the bottom. */
@media (max-width: 899px) and (orientation: portrait) {
  .hero__content { align-items: flex-end; }
  .hero__copy { max-width: 36rem; }
  .hero__scrim {
    background: linear-gradient(0deg,
      color-mix(in srgb, var(--void) 92%, transparent) 0%,
      color-mix(in srgb, var(--void) 60%, transparent) 45%,
      transparent 72%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg::before, .hero__bg::after { animation: none; }
  .hero__canvas, .btn, .link { transition: none; }
}

/* =====================================================================
   5. LANGUAGE SWITCH (links to /  and /en/)
   ===================================================================== */
.nav__right { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang-switch a {
  display: grid; place-items: center; min-width: 36px; min-height: 28px; padding: 0 10px;
  border-radius: 999px; color: var(--muted); text-decoration: none;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; transition: color 0.2s, background 0.2s;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }

/* =====================================================================
   6. PAGE SECTIONS
   ===================================================================== */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.section {
  padding: clamp(72px, 12vh, 128px) var(--gutter);
  border-top: 1px solid var(--line);
  scroll-margin-top: 0;
}
.section__inner { max-width: 1160px; margin: 0 auto; }
.eyebrow {
  margin: 0 0 14px; color: var(--c1);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.section h2 {
  margin: 0; max-width: 40rem;
  font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 650;
  text-wrap: balance;
}
.section__intro { margin: 18px 0 0; max-width: 40rem; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }

.grid { display: grid; gap: 16px; margin-top: clamp(36px, 6vh, 56px); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

.card {
  position: relative; padding: 28px; border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--navy) 70%, transparent), color-mix(in srgb, var(--void) 60%, transparent));
  border: 1px solid var(--line);
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: color-mix(in srgb, var(--c1) 45%, transparent); transform: translateY(-2px); }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  background: color-mix(in srgb, var(--c1) 12%, transparent); color: var(--c1);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0; font-size: 1.2rem; letter-spacing: -0.02em; font-weight: 620; }
.card p { margin: 10px 0 0; color: var(--muted); line-height: 1.6; }

.tag {
  display: inline-block; margin-bottom: 16px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; font-weight: 500;
}
.features { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.features li { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.5; font-size: 0.97rem; }
.features li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c1); box-shadow: 0 0 10px var(--c1);
}

.facts { display: flex; flex-wrap: wrap; gap: 16px 56px; margin: clamp(32px, 5vh, 48px) 0 0; padding: 0; }
.facts div { min-width: 120px; }
.facts dt { color: var(--muted); font-size: 0.85rem; }
.facts dd { margin: 6px 0 0; font-size: 1.6rem; font-weight: 650; letter-spacing: -0.03em; }

.contact { text-align: left; }
.contact__mail {
  display: inline-block; margin-top: 28px;
  font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 650; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--c1);
  overflow-wrap: anywhere;
}
.contact__mail:hover { color: var(--c1); }

.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer nav { display: flex; gap: 20px; }

/* Simple text pages (privacy, 404) */
.page { max-width: 46rem; margin: 0 auto; padding: clamp(40px, 8vh, 80px) var(--gutter) 96px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.035em; margin: 0 0 8px; line-height: 1.1; }
.page h2 { font-size: 1.2rem; margin: 36px 0 8px; }
.page p, .page li { color: var(--muted); line-height: 1.7; }
.page a { color: var(--c1); }
.page .updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 24px; }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } }


.contact__address { margin-top: 28px; font-style: normal; color: var(--muted); line-height: 1.6; }
.contact__label {
  display: block; margin-bottom: 4px; color: var(--ink);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.contact__map { display: inline-block; margin-top: 8px; padding: 6px 0; color: var(--c1); text-decoration: none; font-weight: 600; border-bottom: 1px solid transparent; }
.contact__map:hover { border-color: var(--c1); }
