/* TrekCrumbs — main.css
   Design tokens, font declarations, reset, base element styles,
   typography scale, layout primitives, section spacing.
*/

/* =========================================================
   FONTS — self-hosted, variable-weight WOFF2
   ========================================================= */
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* Colors */
  --color-blue:    #2a6edb;
  --color-coral:   #e2554f;
  --color-bg:      #F8F7F5;
  --color-white:   #ffffff;
  --color-dark:    #1a1f2e;
  --color-text:    #1F2937;
  --color-muted:   #6B7280;
  --color-border:  #E5E7EB;
  --color-surface: #ffffff;

  /* Typography */
  --font-display: 'Montserrat', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing — base-8 scale */
  --space-1:   8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  40px;
  --space-6:  48px;
  --space-7:  56px;
  --space-8:  64px;
  --space-9:  72px;
  --space-10: 80px;
  --space-3xl: 96px;

  /* Border radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.07), 0 2px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);

  /* Floating bottom bar approximate height (desktop) */
  --bar-height: 56px;
}

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

/* =========================================================
   BASE
   ========================================================= */
html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  /* Clearance so page content is not obscured by the floating bottom bar.
     Bar sits at bottom: 24px with min-height ~56px, so clearance = 56 + 24 + 24 buffer. */
  padding-bottom: calc(var(--bar-height) + 48px + env(safe-area-inset-bottom, 0px));
}

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

a {
  color: var(--color-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* =========================================================
   TYPOGRAPHY SCALE
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(36px, 5vw, 64px);
}

h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

p {
  line-height: 1.75;
}

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-10);
}

/* Page sections */
.section {
  padding: var(--space-9) 0;
}

/* Alternate background for even sections */
.section--alt {
  background: var(--color-white);
}

/* Section eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: var(--space-2);
  display: block;
}

/* Thin gradient rule used beneath section headings */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, var(--color-blue), transparent);
  margin: var(--space-4) 0;
  opacity: 0.3;
}

/* Inline text link with arrow suffix */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-blue);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  margin-top: var(--space-3);
}

.link-arrow:hover {
  text-decoration: underline;
}

/* =========================================================
   RESPONSIVE OVERRIDES
   ========================================================= */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-3);
  }

  .section {
    padding: var(--space-7) 0;
  }

  :root {
    --bar-height: 60px;
  }
}
