/* base.css — design tokens + reset for Revolk's Transportation Service */

:root,
[data-theme='light'] {
  /* Surfaces — warm ivory / paper */
  --color-bg: #f4efe6;
  --color-surface: #faf6ed;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ebe4d5;
  --color-surface-offset-2: #e2dac8;
  --color-surface-dynamic: #d9d0bc;
  --color-divider: #d9d0bc;
  --color-border: #c9bfa8;

  /* Ink — deep charcoal, never pure black in light mode */
  --color-text: #1a1714;
  --color-text-muted: #5a544a;
  --color-text-faint: #8c8576;
  --color-text-inverse: #faf6ed;

  /* Primary accent — restrained champagne / antique gold */
  --color-primary: #8a6b2a;
  --color-primary-hover: #6e531d;
  --color-primary-active: #523d12;
  --color-primary-highlight: #ead9b3;

  /* Hero / inverse panel — true charcoal */
  --color-ink: #0e0c0a;
  --color-ink-2: #16140f;

  /* Semantic */
  --color-warning: #964219;
  --color-error: #9b2840;
  --color-success: #4a6b22;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — tone-matched */
  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 23, 20, 0.08);
  --shadow-lg: 0 24px 60px rgba(26, 23, 20, 0.14);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* Type scale (fluid) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --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.4vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.4rem + 3.6vw, 4.5rem);
  --text-hero: clamp(3rem, 1.4rem + 5.6vw, 6.5rem);

  /* 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;

  /* Font families */
  --font-display: 'Fraunces', 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-body: 'Bricolage Grotesque', 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

[data-theme='dark'] {
  /* Surfaces — deep charcoal */
  --color-bg: #0c0a08;
  --color-surface: #15120e;
  --color-surface-2: #1c1813;
  --color-surface-offset: #211c16;
  --color-surface-offset-2: #2a241c;
  --color-surface-dynamic: #322b22;
  --color-divider: #2a241c;
  --color-border: #3d352a;

  --color-text: #efe7d6;
  --color-text-muted: #a09887;
  --color-text-faint: #6e6657;
  --color-text-inverse: #0c0a08;

  --color-primary: #d9b771;
  --color-primary-hover: #ecc97f;
  --color-primary-active: #f4d997;
  --color-primary-highlight: #3d3422;

  --color-ink: #050403;
  --color-ink-2: #0c0a08;

  --color-warning: #bb653b;
  --color-error: #d76480;
  --color-success: #8bb55a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* Reset */
*,
*::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: 90px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body, sans-serif);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-feature-settings: 'ss01', 'cv11';
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
ul[role='list'],
ol[role='list'] {
  list-style: none;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
  line-height: 1.08;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

p,
li,
figcaption {
  text-wrap: pretty;
  max-width: 68ch;
}

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

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

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

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

a,
button,
[role='button'],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  background: var(--color-ink);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  font-size: var(--text-sm);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}
