/* === FILE: assets/css/main.css === */

/* ============================================================
   main.css — Global reset, base tokens, typography, utilities
   Trimble Aviation
   ============================================================ */

/* ─── CSS CUSTOM PROPERTIES ──────────────────────────────────── */
:root {
  /* Brand palette — charcoal/black system to match B&W logo */
  --color-primary:      #111827;   /* charcoal — matches logo black */
  --color-secondary:    #374151;   /* medium charcoal */
  --color-accent:       #E8971A;   /* amber — signature only */
  --color-accent-rgb:   232, 151, 26;
  --color-accent-dark:  #C97008;
  --color-text:         #111827;
  --color-text-muted:   #6B7280;
  --color-bg:           #FFFFFF;
  --color-bg-soft:      #F9FAFB;
  --color-border:       #E5E7EB;
  --color-border-mid:   #D1D5DB;

  /* Typography */
  --font-display: 'Cormorant Garant', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  /* Scale (1.25x) */
  --text-xs:   0.64rem;
  --text-sm:   0.8rem;
  --text-base: 1rem;
  --text-md:   1.25rem;
  --text-lg:   1.5625rem;
  --text-xl:   1.953rem;
  --text-2xl:  2.441rem;
  --text-3xl:  3.052rem;

  /* Spacing (8px grid) */
  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  40px;
  --space-6:  48px;
  --space-8:  64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  /* Layout */
  --max-w:       1380px;
  --max-w-prose: 720px;
  --radius-sm:   5px;
  --radius-md:   8px;
  --radius-lg:   14px;

  /*
   * Container gutter — fluid from 20px (mobile) → 72px (≥1440px).
   *
   * Breakpoints at a glance:
   *   320px  → clamp floor   → 20px each side
   *   768px  → 5vw           → ~38px each side
   *   1024px → 5vw           → ~51px each side
   *   1280px → 5vw           → 64px each side  ← MBP 13"
   *   1440px → clamp ceiling → 72px each side  ← MBP 14" / 16"
   *   >1440px→ max-w centres the block; gutters stay at 72px
   *
   * Exposed as a CSS variable so full-bleed sections can mirror
   * the same inset without hardcoding a value.
   */
  --container-px: clamp(20px, 5vw, 72px);

  /* Transitions */
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#main-content { flex: 1; }

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

a { color: var(--color-accent); }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Pointer cursor on every interactive control — covers <a href>,
   <button>, <summary>, <label for>, role="button", and any element
   tagged .clickable. Browsers don't apply pointer to <summary> or
   <button> by default in some configurations, so this normalises. */
a[href],
button:not(:disabled),
summary,
label[for],
[role="button"]:not([aria-disabled="true"]),
[role="link"],
[role="tab"],
.clickable {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(3rem, 5vw + 1rem, 6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(2.25rem, 3vw + 0.875rem, 4.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h3 {
  font-size: clamp(1.625rem, 2vw + 0.5rem, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h4 {
  font-size: clamp(1.25rem, 1vw + 0.5rem, 2rem);
  font-weight: 600;
  line-height: 1.15;
}
h5 {
  font-size: clamp(1rem, 0.5vw + 0.5rem, 1.375rem);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}
h6 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.4;
}

p  { margin: 0 0 var(--space-2); }
ul, ol { padding-left: var(--space-3); }

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

/*
 * .container
 * Fluid horizontal padding via --container-px (defined in :root above).
 *
 * Split into explicit padding-left / padding-right so the shorthand
 * doesn't accidentally collapse any vertical padding added by
 * child rules in page-specific stylesheets.
 */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left:  var(--container-px);
  padding-right: var(--container-px);
}

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