/* ============================================
   NOMADCOMPASS - BASE STYLES
   Bold, vibrant travel aesthetic - Ocean Explorer
   ============================================ */

/* --------------------------------------------
   GOOGLE FONTS IMPORT
   DM Serif Display: Bold editorial headlines
   Source Sans 3: Clean, readable body text
   -------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Source+Sans+3:wght@400;500;600&display=swap');

/* --------------------------------------------
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   All design decisions live here for easy
   updates and consistency across the site
   -------------------------------------------- */
:root {
  /* --- PRIMARY COLORS --- */
  /* Electric Blue: Bold, vibrant blue for CTAs and accents */
  --color-terracotta: #0066FF;
  --color-terracotta-dark: #0052CC;
  --color-terracotta-light: #FF6B4A;

  /* --- SECONDARY COLORS --- */
  /* Slate: Cool, modern tones for headlines, nav, and footer */
  --color-forest: #1A1F36;
  --color-forest-light: #334155;
  --color-forest-muted: #FF6B4A;

  /* --- NEUTRAL COLORS --- */
  /* Clean, cool neutrals with subtle blue undertones */
  --color-cream: #FFFFFF;       /* Page background */
  --color-sand: #F0F7FF;        /* Cards, sections */
  --color-sand-dark: #DBEAFE;   /* Borders, dividers */
  --color-stone: #6B7280;       /* Muted/secondary text */
  --color-charcoal: #334155;    /* Body text */
  --color-ink: #0F172A;         /* Headlines */
  --color-white: #FFFFFF;       /* Pure white */

  /* --- UTILITY COLORS --- */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;

  /* --- TYPOGRAPHY --- */
  /* Font families */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  /* Font sizes - using rem for accessibility */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */

  /* Line heights */
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;

  /* --- SPACING SCALE --- */
  /* Based on 4px grid (0.25rem increments) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* --- BORDER RADIUS --- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* --- SHADOWS --- */
  /* Cool-tinted shadows using slate color */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.16);

  /* --- TRANSITIONS --- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* --- LAYOUT --- */
  --container-max: 1200px;
  --container-narrow: 720px;
  --nav-height: 72px;
}

/* --------------------------------------------
   CSS RESET
   A modern reset for consistent cross-browser
   styling. Removes default margins, padding,
   and sets sensible box-sizing defaults.
   -------------------------------------------- */

/* Box sizing for all elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margins */
* {
  margin: 0;
}

/* Set up the body with our design tokens */
html {
  /* Smooth scrolling for anchor links */
  scroll-behavior: smooth;
  /* Prevent layout shift from scrollbar */
  overflow-y: scroll;
}

body {
  /* Base typography */
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-charcoal);
  background-color: var(--color-cream);

  /* Improve text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Make images and media responsive by default */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Remove list styles on ul, ol with role="list" */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Remove button default styles */
button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Reduce motion for users who prefer it */
@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;
  }
}

/* --------------------------------------------
   BASE TYPOGRAPHY
   Headings use the display font (DM Serif)
   Body text uses the body font (Source Sans)
   -------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-normal);
  color: var(--color-ink);
  line-height: var(--leading-snug);
}

h1 {
  font-size: var(--text-5xl);
  line-height: var(--leading-tight);
}

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

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

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

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

h6 {
  font-size: var(--text-lg);
}

/* Paragraph spacing */
p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* Lead text - larger intro paragraphs */
.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-stone);
}

/* Small text */
small,
.text-small {
  font-size: var(--text-sm);
}

/* Strong/bold text */
strong,
b {
  font-weight: var(--font-semibold);
}

/* Links with hover effect */
a:not(.btn):not(.nav-link) {
  color: var(--color-terracotta);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:not(.btn):not(.nav-link):hover {
  color: var(--color-terracotta-dark);
}

/* --------------------------------------------
   LAYOUT UTILITIES
   Containers and section spacing
   -------------------------------------------- */

/* Main container - centers content with max-width */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* Narrow container for text-heavy content */
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* Section wrapper - adds vertical padding */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

/* Larger section spacing for hero areas */
.section-lg {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* Smaller section spacing */
.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

/* Account for fixed nav height */
.main-content {
  padding-top: var(--nav-height);
}

/* --------------------------------------------
   BUTTON STYLES
   Primary (terracotta) and secondary (outline)
   -------------------------------------------- */

/* Base button styles shared by all buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

/* Primary button - filled terracotta */
.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-white);
  border-color: var(--color-terracotta);
}

.btn-primary:hover {
  background-color: var(--color-terracotta-dark);
  border-color: var(--color-terracotta-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary button - outlined */
.btn-secondary {
  background-color: transparent;
  color: var(--color-forest);
  border-color: var(--color-forest);
}

.btn-secondary:hover {
  background-color: var(--color-forest);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Ghost button - minimal, text-like */
.btn-ghost {
  background-color: transparent;
  color: var(--color-charcoal);
  border-color: transparent;
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover {
  background-color: var(--color-sand);
  color: var(--color-ink);
}

/* Small button variant */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* Large button variant */
.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* --------------------------------------------
   FORM ELEMENTS
   Inputs, textareas, and labels
   -------------------------------------------- */

/* Labels */
label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-charcoal);
  margin-bottom: var(--space-2);
}

/* Text inputs and textareas */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  border: 1px solid var(--color-sand-dark);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-stone);
}

/* --------------------------------------------
   CARD COMPONENT
   Reusable card with subtle shadow
   -------------------------------------------- */

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card-body {
  padding: var(--space-6);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-sand);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-sand);
  background-color: var(--color-sand);
}

/* --------------------------------------------
   UTILITY CLASSES
   Helpful single-purpose classes
   -------------------------------------------- */

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text colors */
.text-ink { color: var(--color-ink); }
.text-charcoal { color: var(--color-charcoal); }
.text-stone { color: var(--color-stone); }
.text-terracotta { color: var(--color-terracotta); }
.text-forest { color: var(--color-forest); }
.text-white { color: var(--color-white); }

/* Background colors */
.bg-cream { background-color: var(--color-cream); }
.bg-sand { background-color: var(--color-sand); }
.bg-white { background-color: var(--color-white); }
.bg-forest { background-color: var(--color-forest); }
.bg-terracotta { background-color: var(--color-terracotta); }

/* Font families */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* Font weights */
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Margin utilities */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Padding utilities */
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }

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

/* Divider/separator */
.divider {
  height: 1px;
  background-color: var(--color-sand-dark);
  border: none;
  margin: var(--space-8) 0;
}

/* --------------------------------------------
   RESPONSIVE BREAKPOINTS
   Mobile-first approach
   -------------------------------------------- */

/* Tablet and up (768px) */
@media (min-width: 768px) {
  h1 {
    font-size: var(--text-6xl);
  }

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

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

  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }

  .section-lg {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

/* Desktop and up (1024px) */
@media (min-width: 1024px) {
  .container,
  .container-narrow {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

