/*
 * NomaDirection — main.css
 * Global reset, custom properties, typography, layout utilities
 *
 * HTML <head> preconnect hints (copy to every HTML file):
 * <link rel="preconnect" href="https://fonts.googleapis.com">
 * <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 * <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
 */

/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colors */
  --color-navy:       #0D1B2A;
  --color-navy-mid:   #1B2E42;
  --color-navy-light: #2A4160;
  --color-amber:      #F0A500;
  --color-amber-dark: #C8870A;
  --color-white:      #FFFFFF;
  --color-off-white:  #F5F6F8;
  --color-text:       #1A1A2E;
  --color-text-muted: #5A6478;
  --color-success:    #2D7A4F;
  --color-error:      #C0392B;

  /* Typography — families */
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Typography — scale */
  --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 */

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

  /* Layout */
  --container-max: 1280px;
  --container-pad: var(--space-6);

  /* Grid */
  --grid-cols: 12;
  --grid-gap:  1.5rem;

  /* Borders */
  --radius-sm: 2px;
  --radius:    4px;
  --radius-md: 6px;
  --radius-lg: 8px;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(13, 27, 42, 0.12);
  --shadow:    0 2px 8px rgba(13, 27, 42, 0.16);
  --shadow-md: 0 4px 16px rgba(13, 27, 42, 0.20);
  --shadow-lg: 0 8px 32px rgba(13, 27, 42, 0.24);

  /* Z-index scale */
  --z-base:    1;
  --z-dropdown: 100;
  --z-sticky:  200;
  --z-overlay: 300;
  --z-modal:   400;
  --z-toast:   500;

  /* Hero title & tracking */
  --hero-title-size:  clamp(2rem, 5.5vw, 3.5rem);
  --tracking-tight:  -0.02em;
  --tracking-wide:    0.05em;
  --tracking-wider:   0.1em;
}

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

/* ============================================================
   BASE / NORMALIZE
   ============================================================ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ============================================================
   TYPOGRAPHY — HEADINGS
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 { font-size: clamp(1.875rem, 5vw, 3rem);    line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3.5vw, 1.875rem); line-height: 1.2; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); line-height: 1.25; }
h4 { font-size: clamp(1rem, 1.8vw, 1.25rem);    line-height: 1.3; }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm);   }

/* Headings inside dark sections */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-white);
}

/* ============================================================
   TYPOGRAPHY — BODY COPY
   ============================================================ */
p {
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

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

.text-muted {
  color: var(--color-text-muted);
}

.text-white {
  color: var(--color-white);
}

.text-amber {
  color: var(--color-amber);
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

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

/* Inline links */
.prose a,
.content-link {
  color: var(--color-amber-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.prose a:hover,
.content-link:hover {
  color: var(--color-amber);
}

/* ============================================================
   TYPOGRAPHY — SIZES (utility)
   ============================================================ */
.text-xs   { font-size: var(--text-xs);   }
.text-sm   { font-size: var(--text-sm);   }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg);   }
.text-xl   { font-size: var(--text-xl);   }
.text-2xl  { font-size: var(--text-2xl);  }
.text-3xl  { font-size: var(--text-3xl);  }
.text-4xl  { font-size: var(--text-4xl);  }
.text-5xl  { font-size: var(--text-5xl);  }

/* ============================================================
   LAYOUT — CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--container-pad);
  padding-left: var(--container-pad);
}

@media (min-width: 768px) {
  .container {
    --container-pad: var(--space-8);
  }
}

@media (min-width: 1280px) {
  .container {
    --container-pad: var(--space-10);
  }
}

/* ============================================================
   LAYOUT — GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  gap: var(--grid-gap);
}

/* Preset column spans */
.col-full   { grid-column: 1 / -1; }
.col-half   { grid-column: span 12; }
.col-third  { grid-column: span 12; }
.col-two-thirds { grid-column: span 12; }
.col-quarter    { grid-column: span 12; }

@media (min-width: 768px) {
  .col-half       { grid-column: span 6; }
  .col-third      { grid-column: span 4; }
  .col-two-thirds { grid-column: span 8; }
  .col-quarter    { grid-column: span 6; }
}

@media (min-width: 1024px) {
  .col-quarter    { grid-column: span 3; }
}

/* Auto-fit grids */
.grid--2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

.grid--3col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

.grid--4col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
}

@media (min-width: 768px) {
  .grid--2col { grid-template-columns: repeat(2, 1fr); }
  .grid--3col { grid-template-columns: repeat(2, 1fr); }
  .grid--4col { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid--3col { grid-template-columns: repeat(3, 1fr); }
  .grid--4col { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   LAYOUT — FLEX HELPERS
   ============================================================ */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-start  { align-items: flex-start; }
.items-center { align-items: center; }
.items-end    { align-items: flex-end; }
.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.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); }

/* ============================================================
   SECTION SPACING
   ============================================================ */
.section {
  padding-top:    var(--space-12);
  padding-bottom: var(--space-12);
}

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

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

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

@media (min-width: 768px) {
  .section    { padding-top: var(--space-16); padding-bottom: var(--space-16); }
  .section--sm { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .section--lg { padding-top: var(--space-20); padding-bottom: var(--space-20); }
  .section--xl { padding-top: var(--space-24); padding-bottom: var(--space-24); }
}

/* Section background variants */
.section--dark {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.section--mid {
  background-color: var(--color-navy-mid);
  color: var(--color-white);
}

.section--light {
  background-color: var(--color-off-white);
}

.section--white {
  background-color: var(--color-white);
}

.section--alt {
  background-color: var(--color-white);
}

/* ============================================================
   SECTION HEADER (title block above content)
   ============================================================ */
.section-header {
  margin-bottom: var(--space-10);
}

.section-header--center {
  text-align: center;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-amber);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

.section-lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.section--dark .section-lead,
.section--mid .section-lead {
  color: rgba(245, 246, 248, 0.75);
}

@media (min-width: 768px) {
  .section-title { font-size: var(--text-3xl); }
  .section-header { margin-bottom: var(--space-12); }
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid rgba(90, 100, 120, 0.2);
  margin: var(--space-8) 0;
}

.divider--amber {
  border-top-color: var(--color-amber);
  width: 48px;
  margin-left: 0;
}

/* ============================================================
   DISPLAY / 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: 0;
}

.hidden { display: none; }

@media (max-width: 767px)  { .hide-mobile  { display: none; } }
@media (min-width: 768px)  { .hide-tablet  { display: none; } }
@media (min-width: 1024px) { .hide-desktop { display: none; } }
