/* ============================================================
   Vintik & Chpountik — Design Tokens
   Palette: warm ivory / deep charcoal / bordeaux accent
   ============================================================ */

:root,
[data-theme='light'] {
  /* Surfaces — warm ivory, atelier paper */
  --color-bg: #f4f1ea;
  --color-surface: #f7f4ee;
  --color-surface-2: #faf8f3;
  --color-surface-offset: #ebe6dc;
  --color-divider: #d8d1c2;
  --color-border: #c9c0ac;

  /* Text — deep warm charcoal */
  --color-text: #1a1712;
  --color-text-muted: #6b6558;
  --color-text-faint: #a29a89;
  --color-text-inverse: #f7f4ee;

  /* Accent — bordeaux, used sparingly (monogram, initial caps) */
  --color-accent: #4a1220;
  --color-accent-hover: #5c1a2a;

  /* Radius (mostly unused — this site avoids rounded shapes) */
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;
  --radius-lg: 0.375rem;

  --transition-interactive: 240ms cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 60 / 0.06);
  --shadow-md: 0 8px 24px oklch(0.15 0.01 60 / 0.08);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Type scale */
  --text-xs: clamp(0.6875rem, 0.66rem + 0.15vw, 0.75rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.9rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.75rem, 1.4rem + 4.5vw, 5.5rem);
  --text-hero: clamp(3.5rem, 1rem + 8vw, 9rem);

  /* 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;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Instrument Serif', 'Gambetta', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', system-ui, sans-serif;
}

/* Dark mode — deep warm black with cream text */
[data-theme='dark'] {
  --color-bg: #14110d;
  --color-surface: #1a1712;
  --color-surface-2: #1f1c17;
  --color-surface-offset: #26221c;
  --color-divider: #2f2b24;
  --color-border: #3c372e;

  --color-text: #ece7dc;
  --color-text-muted: #8d8676;
  --color-text-faint: #5b564c;
  --color-text-inverse: #14110d;

  /* Deep oxblood — dry, aged, no pink tint */
  --color-accent: #7a2a2a;
  --color-accent-hover: #8f3232;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #14110d;
    --color-surface: #1a1712;
    --color-surface-2: #1f1c17;
    --color-surface-offset: #26221c;
    --color-divider: #2f2b24;
    --color-border: #3c372e;

    --color-text: #ece7dc;
    --color-text-muted: #8d8676;
    --color-text-faint: #5b564c;
    --color-text-inverse: #14110d;

    --color-accent: #7a2a2a;
    --color-accent-hover: #8f3232;
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  hanging-punctuation: first last;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-weight: 400;
  transition: background-color 400ms ease, color 400ms ease;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-interactive);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.1;
  font-weight: 400;
}

p {
  text-wrap: pretty;
}

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05em;
  letter-spacing: 0;
}

::selection {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}

:focus-visible {
  outline: 1px solid var(--color-accent);
  outline-offset: 4px;
}

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

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