/*!
 * ---------------------------------------------------------------------------
 *                   _   _             _ _ _ _ _        _
 *                  | | | |           | (_|_|_) |      | |
 *   _ __ ___  _   _| |_| |_   _    __| |_ _ _| |_ __ _| |
 *  | '_ ` _ \| | | | __| | | | |  / _` | | | | __/ _` | |
 *  | | | | | | |_| | |_| | |_| | | (_| | | | | || (_| | |
 *  |_| |_| |_|\__,_|\__|_|\__,_|  \__,_|_| |_|\__\__,_|_|
 *                                       _/ |
 *                                      |__/
 *   MUTLU DİJİTAL — Samet Mutlu — +05422419932 — mutludijital.com.tr
 * ---------------------------------------------------------------------------
 *  base.css — reset, temel tipografi, erişilebilirlik ve yerleşim iskeleti
 * ---------------------------------------------------------------------------
 */

/* ===========================================================================
   1. RESET
   =========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--fs-300);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text);
  background-color: var(--surface-sunken);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: none;
  overflow-x: hidden;
}

img,
picture,
svg,
video,
canvas { display: block; max-width: 100%; }

img { height: auto; }

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

ul[class],
ol[class] { list-style: none; padding: 0; }

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

table { border-collapse: collapse; width: 100%; }

/* Uzun kelimeler yatay taşma yaratmaz */
p, h1, h2, h3, h4, h5, h6, li, a, span, td, th { overflow-wrap: break-word; }

/* ===========================================================================
   2. TİPOGRAFİ
   =========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tr-tight);
  color: var(--text-strong);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-800);
  font-weight: var(--fw-black);
  line-height: var(--lh-display);
  letter-spacing: var(--tr-tighter);
}

h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }
h5 { font-size: var(--fs-400); }
h6 { font-size: var(--fs-300); }

p { text-wrap: pretty; }

strong, b { font-weight: var(--fw-semi); color: var(--text-strong); }

::selection {
  background-color: var(--signal-500);
  color: #fff;
}

/* Üst başlık (eyebrow) — bölüm kimliği taşır */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-100);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--signal-600);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background-color: currentColor;
  flex: none;
}

.eyebrow--plain::before { display: none; }

.eyebrow--onDark { color: var(--signal-300); }

/* Sayısal veri ve kod benzeri içerik — hizalı rakamlar */
.tnum { font-variant-numeric: tabular-nums; }

.lead {
  font-size: var(--fs-400);
  line-height: var(--lh-sub);
  color: var(--text);
}

.prose { max-width: var(--prose-max); }

.prose > * + * { margin-top: var(--sp-4); }

.prose h3 { margin-top: var(--sp-6); }

/* ===========================================================================
   3. ERİŞİLEBİLİRLİK
   =========================================================================== */
:focus-visible {
  outline: 3px solid var(--signal-500);
  outline-offset: 2px;
  border-radius: var(--r-2);
}

/* Koyu zeminde görünür odak */
.on-dark :focus-visible { outline-color: var(--signal-300); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 100;
  padding: var(--sp-3) var(--sp-5);
  background: var(--signal-500);
  color: #fff;
  font-weight: var(--fw-semi);
  border-radius: var(--r-3);
  transform: translateY(-200%);
  transition: transform var(--dur-ui) var(--ease-out-quart);
}

.skip-link:focus { transform: translateY(0); }

/* İkon sprite kabı — görünmez, yer kaplamaz */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Satır içi ikon */
.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  stroke-width: 1.75;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico--fill {
  fill: currentColor;
  stroke: none;
}

/* ===========================================================================
   4. YERLEŞİM İSKELETİ
   =========================================================================== */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.section { padding-block: var(--section-pad); }

.section--tight { padding-block: var(--sp-7); }
.section--loose { padding-block: var(--sp-10); }

.section--sunken { background-color: var(--surface-sunken); }
.section--alt    { background-color: var(--surface-alt); }
.section--paper  { background-color: var(--surface); }
.section--deep   { background-color: var(--surface-deep); color: var(--text-onDark); }

.section--deep h1,
.section--deep h2,
.section--deep h3,
.section--deep h4 { color: #fff; }

.section--deep p { color: var(--text-onDark-muted); }

/* Bölüm başlığı bloğu */
.section-head { max-width: 46rem; }

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow { justify-content: center; }

.section-head h2 {
  margin-top: var(--sp-3);
  font-size: var(--fs-700);
}

.section-head p {
  margin-top: var(--sp-4);
  font-size: var(--fs-400);
  line-height: var(--lh-sub);
}

.section-head__rule {
  width: 4.5rem;
  height: 3px;
  margin-top: var(--sp-5);
  background: var(--signal-500);
  border-radius: var(--r-pill);
}

.section-head--center .section-head__rule { margin-inline: auto; }

/* ===========================================================================
   5. IZGARA
   =========================================================================== */
.grid { display: grid; gap: var(--sp-5); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.grid--gap-lg { gap: var(--sp-7); }

/* Dergi düzeni: içerik + kenar çubuğu */
.with-aside {
  display: grid;
  gap: var(--sp-7);
  align-items: start;
}

@media (min-width: 1024px) {
  .with-aside { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--sp-8); }
}

.aside-stack {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 1024px) {
  .aside-stack { position: sticky; top: var(--sticky-off); }
}

/* ===========================================================================
   6. YARDIMCI SINIFLAR
   =========================================================================== */
.stack     { display: grid; gap: var(--sp-4); }
.stack--sm { gap: var(--sp-2); }
.stack--lg { gap: var(--sp-6); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

.center { text-align: center; }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }

/* Alt çizgili metin bağlantısı */
.link-u {
  color: var(--signal-600);
  font-weight: var(--fw-semi);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.link-u:hover { color: var(--signal-700); }

/* ===========================================================================
   7. GİRİŞ ANİMASYONU (IntersectionObserver ile tetiklenir)
   =========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity var(--dur-enter) var(--ease-out-quart),
    transform var(--dur-enter) var(--ease-out-quart);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.reveal--d1 { transition-delay: 80ms; }
.reveal--d2 { transition-delay: 160ms; }
.reveal--d3 { transition-delay: 240ms; }
.reveal--d4 { transition-delay: 320ms; }

/* ===========================================================================
   8. HAREKET AZALTMA — zorunlu destek; içerik görünür kalır
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
