/* ==========================================================================
   Oydin — dizayn tokenlari va global asoslar
   ========================================================================== */

:root {
  --font-sans: Manrope, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --ink: #24241f;
  --muted: #74756e;
  --paper: #ebe7de;
  --panel: #f6f3ec;
  --surface: #e3dfd5;
  --line: #cfcbc0;
  --accent: #d96b55;
  --accent-2: #b85b48;
  --gold: #b59a67;
  --page-dot: #77756e35;
  --shadow: 0 24px 70px rgb(36, 35, 29, 0.12);
  --card-shadow: 0 16px 38px rgb(36, 35, 29, 0.13);
}

/* An explicit `.light` class is intentional: it must beat OS dark mode. */
body.light {
  --ink: #24241f;
  --muted: #74756e;
  --paper: #ebe7de;
  --panel: #f6f3ec;
  --surface: #e3dfd5;
  --line: #cfcbc0;
  --accent: #d96b55;
  --accent-2: #b85b48;
  --gold: #b59a67;
  --page-dot: #77756e35;
  --shadow: 0 24px 70px rgb(36, 35, 29, 0.12);
  --card-shadow: 0 16px 38px rgb(36, 35, 29, 0.13);
}

body.night {
  --ink: #eee9df;
  --muted: #a7a69e;
  --paper: #242521;
  --panel: #30312d;
  --surface: #292a26;
  --line: #454640;
  --accent: #e17b63;
  --accent-2: #bd624f;
  --gold: #c7ad78;
  --page-dot: #aaa99f25;
  --shadow: 0 26px 80px rgb(0, 0, 0, 0.28);
  --card-shadow: 0 17px 42px rgb(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  body:not(.night, .light) {
    --ink: #eee9df;
    --muted: #a7a69e;
    --paper: #242521;
    --panel: #30312d;
    --surface: #292a26;
    --line: #454640;
    --accent: #e08670;
    --accent-2: #c96e59;
    --gold: #c9ab74;
    --page-dot: #aaa99f25;
    --shadow: 0 24px 70px rgb(0, 0, 0, 0.45);
    --card-shadow: 0 16px 38px rgb(0, 0, 0, 0.4);
  }
}

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

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font: 700 12px Manrope, system-ui, sans-serif;
  text-decoration: none;
  transition: top 0.18s;
}
.skip-link:focus {
  top: 12px;
}
