/* =========================================================
   Gulmarg Snowline — base.css
   Reset, design tokens, base typography.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colors */
  --navy: #0F2540;
  --blue: #199BE8;
  --blue-dark: #147BB8;
  --white: #FFFFFF;
  --grey-50: #F6F8FA;
  --grey-200: #E2E8F0;
  --grey-600: #4A5568;
  --ink: #1A202C;

  /* Semantic aliases */
  --color-bg: var(--white);
  --color-surface: var(--grey-50);
  --color-border: var(--grey-200);
  --color-text: var(--ink);
  --color-text-muted: var(--grey-600);
  --color-primary: var(--blue);
  --color-primary-hover: var(--blue-dark);
  --color-inverse-bg: var(--navy);
  --color-inverse-text: var(--white);

  /* Spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Fluid type scale */
  --text-xs: clamp(0.75rem, 0.71rem + 0.2vw, 0.85rem);
  --text-sm: clamp(0.875rem, 0.83rem + 0.22vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-md: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --text-lg: clamp(1.1875rem, 1.12rem + 0.34vw, 1.4375rem);
  --text-xl: clamp(1.375rem, 1.28rem + 0.47vw, 1.75rem);
  --text-2xl: clamp(1.625rem, 1.46rem + 0.82vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.72rem + 1.4vw, 3rem);

  /* Line heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Border radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 37, 64, 0.08), 0 1px 2px rgba(15, 37, 64, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 37, 64, 0.1), 0 2px 4px rgba(15, 37, 64, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 37, 64, 0.16), 0 4px 8px rgba(15, 37, 64, 0.08);

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;

  /* Motion */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* Font stack: system fonts only, no webfonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Modern reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

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

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

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

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

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

#root,
#app {
  isolation: isolate;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base typography ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--navy);
}

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

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

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-md);
}

p {
  max-width: 70ch;
}

small {
  font-size: var(--text-xs);
}

/* ---------- Focus visibility ---------- */
:focus {
  outline: none;
}

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

/* ---------- Utility: visually hidden but accessible ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  background: var(--navy);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}
