/* =============================================================================
   VertHurt — Brand Design System
   Version: 2.0
   Source: VertHurt Brand Guidelines v2 (April 2026)

   Usage: <link rel="stylesheet" href="/css/verthurt.css">
   Load BEFORE page-specific stylesheets.

   TABLE OF CONTENTS
   1.  Reset & Base
   2.  Design Tokens (CSS Custom Properties)
   3.  Typography
   4.  Layout & Containers
   5.  Base Elements
   6.  Utility Classes
   7.  Animations
   8.  Responsive Overrides
============================================================================= */


/* =============================================================================
   1. RESET & BASE
============================================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: light dark;  /* native dialogs (file picker etc.) follow OS preference */
}

body {
  font-family: var(--font-family);
  background-color: var(--color-page-bg);
  color: var(--color-forest-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

button, input, select, textarea {
  font-family: inherit;
}


/* =============================================================================
   2. DESIGN TOKENS (CSS Custom Properties)
============================================================================= */

:root {

  /* ── Brand Core ───────────────────────── */
  --color-forest:         #1C5C1E;   /* Forest Green — logo "Vert", primary brand  */
  --color-sun-gold:       #F7C948;   /* Sun Gold — logo "Hurt", accent, CTAs        */
  --color-forest-text:    #2C3E2D;   /* Forest Text — primary text, dark bg          */

  /* ── Green Family — Terrain Hierarchy ─── */
  --color-green-900:      #1C5C1E;   /* Logo green                                  */
  --color-green-800:      #2C3E2D;   /* Forest text                                 */
  --color-green-700:      #3D6128;   /* Ground dark — deep canopy                   */
  --color-green-600:      #5A8C3C;   /* Ground — hillside turf                      */
  --color-green-500:      #6B7D5E;   /* Muted olive — secondary text                */
  --color-green-400:      #52B788;   /* Trail green — success, easy                  */

  /* ── Warm Tones — Sun & Trail ──────────── */
  --color-sun:            #F7C948;   /* CTAs, highlights                             */
  --color-path-tan:       #C8A96E;   /* Trails, warm mid-tone                       */

  /* ── Hilliness Spectrum — Data & Status ── */
  --color-flat:           #52B788;   /* 0–30 — Easy / Success                       */
  --color-rolling:        #F4A261;   /* 30–60 — Moderate / Warning                  */
  --color-hilly:          #E76F51;   /* 60–82 — Hard / Alert                        */
  --color-mountainous:    #C1121F;   /* 82–100 — Extreme / Danger                   */

  /* ── Surfaces ──────────────────────────── */
  --color-white:          #FFFFFF;
  --color-card-bg:        #F8FAF7;   /* Card / panel surface                        */
  --color-page-bg:        #E8F4FD;   /* Sky blue — page background                  */

  /* ── UI ────────────────────────────────── */
  --color-accent-blue:    #3A86FF;   /* Links / informational                       */
  --color-danger:         #C1121F;   /* Destructive actions                          */

  /* ── Strava Integration ────────────────── */
  --color-strava:         #FC4C02;
  --color-strava-light:   #FFF4F0;
  --color-strava-border:  #FFD5C5;
  --color-strava-dark:    #C73D00;

  /* ── Borders ───────────────────────────── */
  --color-border:         #D4DDD0;   /* Default borders (green-tinted)              */
  --color-border-light:   #E8EDE5;   /* Subtle dividers                             */
  --color-border-medium:  #B8C4B4;   /* Stronger borders                            */

  /* ── Overlay ───────────────────────────── */
  --color-overlay:        rgba(44, 62, 45, 0.75);

  /* ── Disabled ──────────────────────────── */
  --color-disabled-bg:    #E5E5E5;
  --color-disabled-text:  #AAAAAA;

  /* ── Typography ────────────────────────── */
  --font-family:          'Nunito', sans-serif;

  /* Type scale — Brand Guidelines v2 */
  --text-display:         48px;      /* Display — weight 800, line-height 1.05      */
  --text-h1:              36px;      /* H1 — weight 800, line-height 1.1            */
  --text-h2:              28px;      /* H2 — weight 700, line-height 1.2            */
  --text-h3:              22px;      /* H3 — weight 700, line-height 1.3            */
  --text-h4:              18px;      /* H4 — weight 600, line-height 1.35           */
  --text-body-lg:         20px;      /* Body Large — weight 400, line-height 1.6    */
  --text-body:            18px;      /* Body — weight 400, line-height 1.5          */
  --text-body-sm:         14px;      /* Body Small — weight 400, line-height 1.5    */
  --text-label:           12px;      /* Label — weight 800, line-height 1.4         */
  --text-caption:         11px;      /* Caption — weight 600, line-height 1.4       */

  /* ── Spacing ───────────────────────────── */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;

  /* ── Border Radius ─────────────────────── */
  --radius-sm:    8px;    /* Buttons, tags                                */
  --radius-md:   12px;    /* Inputs                                       */
  --radius-lg:   16px;    /* Cards                                        */
  --radius-xl:   20px;    /* Modals, large cards                          */
  --radius-pill: 9999px;  /* Pills, avatars                               */

  /* ── Shadows (green-tinted) ────────────── */
  --shadow-sm:   0  1px  3px rgba(44, 62, 45, 0.08);
  --shadow-md:   0  4px 20px rgba(44, 62, 45, 0.09);
  --shadow-lg:   0 12px 32px rgba(44, 62, 45, 0.12);
  --shadow-xl:   0 24px 48px rgba(44, 62, 45, 0.16);

  /* ── Transitions ───────────────────────── */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
}


/* =============================================================================
   2b. DARK MODE
============================================================================= */

[data-theme="light"] {
  color-scheme: light;  /* native dialogs match forced light mode even when OS is dark */
}

[data-theme="dark"] {
  color-scheme: dark;  /* native dialogs match forced dark mode */
  --color-forest-text:    #E8EDE5;
  --color-green-500:      #9AB494;
  --color-page-bg:        #1A2A1B;
  --color-card-bg:        #243625;
  --color-white:          #2C3E2D;
  --color-border:         #3D5C3A;
  --color-border-light:   #2F4A30;
  --color-border-medium:  #4A6B48;
  --color-overlay:        rgba(10, 18, 10, 0.85);
  --color-disabled-bg:    #3D5C3A;
  --color-disabled-text:  #6B7D5E;
  --shadow-sm:   0  1px  3px rgba(0, 0, 0, 0.20);
  --shadow-md:   0  4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.30);
  --shadow-xl:   0 24px 48px rgba(0, 0, 0, 0.35);
}


/* =============================================================================
   3. TYPOGRAPHY
============================================================================= */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-forest-text);
  line-height: 1.2;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1.3;
}

h4 {
  font-size: var(--text-h4);
  font-weight: 600;
  line-height: 1.35;
}

p {
  font-size: var(--text-body);
  color: var(--color-forest-text);
  margin-bottom: 14px;
}

small { font-size: var(--text-body-sm); color: var(--color-green-500); }

strong, b { color: var(--color-forest-text); }

/* Eyebrow / label text */
.eyebrow {
  display: block;
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-500);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}

ul, ol {
  margin: var(--space-2) 0 var(--space-4) var(--space-5);
}

li {
  font-size: var(--text-body);
  color: var(--color-forest-text);
  margin-bottom: 6px;
}


/* =============================================================================
   4. LAYOUT & CONTAINERS
============================================================================= */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-9);
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}


/* =============================================================================
   5. BASE ELEMENTS
============================================================================= */

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

a:hover {
  text-decoration: underline;
}

input[type="file"] { display: none; }


/* =============================================================================
   6. UTILITY CLASSES
============================================================================= */

/* Flex */
.flex            { display: flex; }
.flex-col        { display: flex; flex-direction: column; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap       { flex-wrap: wrap; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-5  { gap: var(--space-5); }
.gap-6  { gap: var(--space-6); }

/* Spacing */
.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-5  { margin-top: var(--space-5); }
.mt-6  { margin-top: var(--space-6); }
.mb-1  { margin-bottom: var(--space-1); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-5  { margin-bottom: var(--space-5); }
.mb-6  { margin-bottom: var(--space-6); }

/* Text */
.text-muted     { color: var(--color-green-500); }
.text-secondary { color: var(--color-green-500); }
.text-sm        { font-size: var(--text-body-sm); }
.text-xs        { font-size: var(--text-label); }
.text-center    { text-align: center; }

/* Visibility */
.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;
}

/* Rounded images */
.avatar {
  border-radius: var(--radius-pill);
  object-fit: cover;
}


/* =============================================================================
   7. ANIMATIONS
============================================================================= */

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* =============================================================================
   8. RESPONSIVE OVERRIDES
============================================================================= */

@media (max-width: 768px) {
  .container {
    padding: var(--space-6) var(--space-4) var(--space-7);
  }

  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

@media (max-width: 480px) {
  .container {
    padding: var(--space-5) var(--space-3) var(--space-6);
  }

  h1 { font-size: 24px; }
}
