/* ==========================================================================
   BASE.CSS — Design Tokens, Reset, Typography
   Mersin Kanal Açma — Premium Corporate Design System
   ========================================================================== */

/* -------------------- Font Loading -------------------- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* -------------------- Design Tokens -------------------- */
:root {
  /* Brand palette — "su & pirinç" (water & brass) system.
     Deep ink-teal evokes still water / pipe depth; brass/amber signals
     urgency & the physical material of fittings — not a generic blue. */
  --color-ink: #0A1B24;
  --color-ink-700: #102938;
  --color-ink-600: #16394D;

  --color-primary: #0E5C6B;       /* deep teal — brand */
  --color-primary-600: #0C4E5B;
  --color-primary-700: #093C46;
  --color-primary-100: #E4F1F2;
  --color-primary-50: #F1F8F8;
  /* Text/icon variant of primary — stays readable on dark surfaces where
     the base --color-primary (a dark teal) would fail contrast. */
  --color-primary-ink: var(--color-primary);
  /* Fixed dark text for use ON TOP OF the accent color specifically.
     Not theme-swapped (unlike --color-ink) because --color-accent itself
     doesn't change between light/dark mode, so its contrasting text shouldn't either. */
  --color-on-accent: #201607;
  /* Fixed dark navy for chrome that must stay dark regardless of theme
     (footer, dark CTA bands, dark buttons) — unlike --color-ink, which
     intentionally flips to a light color in dark mode for headings/text. */
  --color-ink-fixed: #0A1B24;

  --color-accent: #E8963A;        /* brass amber — CTA / urgency */
  --color-accent-600: #D2822A;
  --color-accent-700: #B06D20;
  --color-accent-100: #FCEEDA;

  --color-success: #2E9E6C;
  --color-success-100: #E4F6EE;

  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F4F6F5;

  --color-text: #16232B;
  --color-text-secondary: #566873;
  --color-text-tertiary: #647680;
  --color-border: #E5EAE9;
  --color-border-strong: #D2DBDA;

  /* Dark mode tokens (overridden in darkmode.css) */
  --color-bg-dark: #08141C;
  --color-surface-dark: #0F212C;
  --color-surface-alt-dark: #132734;
  --color-text-dark: #E8EEF0;
  --color-text-secondary-dark: #96A9B1;
  --color-border-dark: #1E3644;

  /* Typography */
  --font-display: 'Manrope', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --fs-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --fs-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);
  --fs-xl: clamp(1.375rem, 1.3rem + 0.4vw, 1.625rem);
  --fs-2xl: clamp(1.75rem, 1.6rem + 0.75vw, 2.25rem);
  --fs-3xl: clamp(2.25rem, 1.95rem + 1.5vw, 3.25rem);
  --fs-4xl: clamp(2.75rem, 2.2rem + 2.75vw, 4.5rem);

  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  /* 8pt Spacing System */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 80px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  /* Shadows — soft, layered, premium */
  --shadow-xs: 0 1px 2px rgba(10, 27, 36, 0.04);
  --shadow-sm: 0 2px 8px rgba(10, 27, 36, 0.06), 0 1px 2px rgba(10, 27, 36, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 27, 36, 0.08), 0 2px 6px rgba(10, 27, 36, 0.04);
  --shadow-lg: 0 20px 48px rgba(10, 27, 36, 0.12), 0 4px 12px rgba(10, 27, 36, 0.05);
  --shadow-glow: 0 8px 32px rgba(232, 150, 58, 0.25);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: 16px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur-base: 280ms;
  --dur-slow: 480ms;

  /* Layout */
  --container-max: 1240px;
  --header-h: 84px;
}

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

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

@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;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

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

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); font-weight: 700; }
h4 { font-size: var(--fs-lg); font-weight: 700; }

p { color: var(--color-text-secondary); }

/* -------------------- Accessibility -------------------- */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-ink);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.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;
}

/* -------------------- Selection -------------------- */
::selection { background: var(--color-accent); color: var(--color-on-accent); }
