/* ==========================================================================
   MERIDYEN DESIGN SYSTEM — base.css
   Reset, tipografi, yardımcı sınıflar, iskelet (skeleton) durumları
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

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

/* Odak halkası — yalnızca klavyet gezinmesinde */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-print);
}

/* --------------------------------------------------------------------------
   Tipografi sınıfları
   -------------------------------------------------------------------------- */

.t-display, h1.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 560;
  line-height: var(--lh-tight);
  letter-spacing: -.018em;
  color: var(--ink-strong);
  font-variation-settings: "opsz" 100;
  text-wrap: balance;
}

h1, .t-h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -.014em;
  color: var(--ink-strong);
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h2, .t-h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 580;
  line-height: var(--lh-snug);
  letter-spacing: -.01em;
  color: var(--ink-strong);
  margin: 0 0 var(--sp-4);
}

h3, .t-h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--ink-strong);
  margin: 0 0 var(--sp-3);
}

h4, .t-h4 {
  font-family: var(--font-ui);
  font-size: var(--fs-h4);
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink-strong);
  margin: 0 0 var(--sp-2);
}

p  { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

.t-body-lg { font-size: var(--fs-body-lg); line-height: var(--lh-loose); }
.t-small   { font-size: var(--fs-small); }
.t-caption { font-size: var(--fs-caption); color: var(--ink-soft); }

/* Küçük harf etiket — sistemin imza detayı (küçük harfler + geniş tracking) */
.t-label {
  font-size: var(--fs-label);
  font-weight: 650;
  letter-spacing: var(--tracking-label);
  text-transform: lowercase;
  font-variant-caps: all-small-caps;
  color: var(--ink-mute);
}

.t-label--ink   { color: var(--ink); }
.t-label--primary { color: var(--primary); }
.t-label--accent  { color: var(--accent); }

/* Serif italik vurgu (manifesto, alıntı) */
.t-serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
}

/* Rakam blokları — tabular, mono hissi */
.t-num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.t-num-lg  { font-size: var(--fs-num-lg); line-height: 1; font-weight: 500; }
.t-num-xl  { font-size: var(--fs-num-xl); line-height: .95; font-weight: 500; letter-spacing: -.03em; }

.t-mute  { color: var(--ink-mute); }
.t-soft  { color: var(--ink-soft); }
.t-ink   { color: var(--ink-strong); }
.t-primary { color: var(--primary); }
.t-accent  { color: var(--accent); }
.t-danger  { color: var(--danger); }
.t-success { color: var(--success); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:where(:not([class*="btn"]):not([class*="chip"]):not([class*="tab"]):not([class*="sideitem"]):not([class*="userchip"]):not([class*="mainnav__item"])):hover {
  color: var(--primary-deep);
}

:root[data-theme="dark"] a:where(:not([class*="btn"]):not([class*="chip"]):not([class*="tab"]):not([class*="sideitem"]):not([class*="userchip"]):not([class*="mainnav__item"])):hover {
  color: var(--primary-soft);
}

/* Bağlantı oku — içerik bağlantılarında ince alt çizgi */
.link-quiet {
  color: inherit;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.link-quiet:hover { color: var(--primary); border-color: var(--primary); }

/* --------------------------------------------------------------------------
   Düzen yardımcıları
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.shell--wide { max-width: var(--shell-wide); }

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

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.row { display: flex; align-items: center; gap: var(--sp-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }

/* Editoryal bölüm başlığı — çift çizgi üstte, numara + başlık */
.ed-sec {
  border-top: var(--rule-double);
  padding-top: var(--sp-4);
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.ed-sec__no {
  font-family: var(--font-num);
  font-size: var(--fs-caption);
  color: var(--accent);
  font-weight: 500;
  letter-spacing: .06em;
}
.ed-sec__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -.008em;
  color: var(--ink-strong);
  margin: 0;
  line-height: 1.2;
}
.ed-sec__meta { margin-left: auto; }

/* Ayraçlar */
.hr { border: 0; border-top: var(--hairline); margin: var(--sp-7) 0; }
.hr--ink { border-top: 2px solid var(--ink); }
.hr--double { border-top: var(--rule-double); }

/* --------------------------------------------------------------------------
   İkonlar — tek aile, tek stroke
   -------------------------------------------------------------------------- */

.ic { width: var(--ic-md); height: var(--ic-md); flex: none; }
.ic--sm { width: var(--ic-sm); height: var(--ic-sm); }
.ic--lg { width: var(--ic-lg); height: var(--ic-lg); }
.ic--xl { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   İskelet (skeleton) — içerik şeklinde, sıcak shimmer
   -------------------------------------------------------------------------- */

.sk {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: var(--r-print);
}

.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--surface) 65%, transparent),
    transparent
  );
  animation: sk-shimmer 1.4s infinite;
}

@keyframes sk-shimmer { to { transform: translateX(100%); } }

.sk--title  { height: 22px; width: 62%; }
.sk--title-lg { height: 34px; width: 48%; }
.sk--line   { height: 12px; width: 100%; }
.sk--line-70 { height: 12px; width: 70%; }
.sk--line-40 { height: 12px; width: 40%; }
.sk--thumb  { height: 120px; width: 100%; border-radius: var(--r-print); }
.sk--row    { display: grid; gap: var(--sp-2); padding-block: var(--sp-4); border-bottom: var(--hairline); }
.sk--option { height: 52px; width: 100%; }

/* --------------------------------------------------------------------------
   Erişilebilirlik & yazdırma
   -------------------------------------------------------------------------- */

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

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  transform: translateY(-64px);
  transition: transform var(--t-base);
}
.skip-link:focus-visible { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
