/* ==========================================================================
   Türk Otağ — Main Stylesheet
   Design tokens, CSS reset, base styles, typography, utilities.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colors — Background */
  --color-bg-primary: #0A0A0F;
  --color-bg-secondary: #12121A;
  --color-bg-card: #1A1A2E;
  --color-bg-elevated: #22223A;

  /* Colors — Gold */
  --color-gold: #C9A84C;
  --color-gold-light: #E2C878;
  --color-gold-dark: #8B7332;

  /* Colors — Text */
  --color-text-primary: #F0ECE3;
  --color-text-secondary: #9B9B9B;
  --color-text-muted: #6B6B6B;

  /* Colors — Accent */
  --color-red: #C41E3A;
  --color-blue: #1B3A5C;
  --color-green: #2D8B4E;
  --color-orange: #D4842A;

  /* Colors — Status */
  --color-status-active: #2D8B4E;
  --color-status-development: #D4842A;
  --color-status-coming-soon: #1B3A5C;
  --color-status-archived: #6B6B6B;

  /* Colors — Feedback */
  --color-success: #2D8B4E;
  --color-error: #C41E3A;
  --color-warning: #D4842A;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Cinzel', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font sizes — fluid scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Font weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line heights */
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-6);
  --section-padding: var(--space-20);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 50px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.2);

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Breakpoints (for reference — use in media queries) */
  /* sm: 640px, md: 768px, lg: 1024px, xl: 1280px, 2xl: 1536px */
}

/* --------------------------------------------------------------------------
   2. CSS Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

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

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

a:hover {
  color: var(--color-gold-light);
}

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* --------------------------------------------------------------------------
   3. Base Element Styles
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--font-semibold);
}

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background-color: var(--color-bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  background-color: var(--color-bg-secondary);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--color-bg-card);
  margin: var(--space-8) 0;
}

blockquote {
  border-left: 3px solid var(--color-gold);
  padding-left: var(--space-4);
  margin: var(--space-4) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

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

/* --------------------------------------------------------------------------
   4. Utility Classes
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

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

.screen-reader-text:focus {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-4);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: var(--color-gold);
  color: var(--color-bg-primary);
  font-weight: var(--font-semibold);
  z-index: calc(var(--z-modal) + 1);
  border-radius: var(--radius-sm);
}

/* Animate-ready elements — hidden until JS reveals them.
   Scoped to .js class added on <html> by main.js so content
   remains visible when JavaScript is disabled. */
.js [data-animate] {
  opacity: 0;
  transform: translateY(24px);
}

/* --------------------------------------------------------------------------
   5. WordPress Default Overrides
   -------------------------------------------------------------------------- */
.alignwide {
  max-width: calc(var(--container-max) + var(--space-8));
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100%;
  max-width: 100%;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: var(--space-4);
  margin-bottom: var(--space-4);
}

.alignright {
  float: right;
  margin-left: var(--space-4);
  margin-bottom: var(--space-4);
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  text-align: center;
}

/* WordPress navigation pagination */
.nav-links {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-bg-card);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.nav-links .page-numbers:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.nav-links .page-numbers.current {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-bg-primary);
  font-weight: var(--font-semibold);
}

/* Dashicons base override for theme usage */
.dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  line-height: 1;
  color: var(--color-gold);
}

/* --------------------------------------------------------------------------
   6. Responsive Typography
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-4);
    --section-padding: var(--space-12);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
}

/* --------------------------------------------------------------------------
   7. Reduced Motion
   -------------------------------------------------------------------------- */
@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;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}
