/* ============================================================
   Finglas Iron & Fabrication — base.css
   Reset · tokens · typography · utilities
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Tokens ---------- */
:root {
  /* Color — industrial concrete + weld-spark orange + torch-blue.
     Footer / cookie banner are dark-steel. */
  --ink:        #1A1C1F;
  --ink-2:      #292B2E;
  --ink-3:      #44464A;
  --surface-dark: #0F1012;        /* footer + banner — near-black steel */
  --paper:      #DCD8D2;          /* cool concrete grey */
  --paper-2:    #E6E2D8;          /* card surface, slightly lighter */
  --line:       #B9B2A4;
  --line-2:     #8C8576;
  --muted:      #5C594F;
  --accent:     #E55A1E;          /* weld-spark orange */
  --accent-deep:#B23E0C;
  --accent-on-dark:#FF7E48;       /* on the dark footer / cookie only */
  --accent-tint:#F5D6C0;
  --cta-bg:     #E55A1E;
  --cta-bg-hover:#B23E0C;
  --good:       #4A7A55;

  /* Torch-blue secondary spark (acetylene flame core) — kept var name "brass" for scaffold compatibility */
  --brass:      #2A6AA6;
  --brass-soft: rgba(42, 106, 166, 0.18);

  /* Engineer graph-paper backdrop for hero + dark sections */
  --grid-line:  rgba(26, 28, 31, 0.06);
  --grid-line-strong: rgba(26, 28, 31, 0.09);

  /* Typography
     Display: Anton — condensed industrial uppercase
     Italic accent: Crimson Pro italic — warm serif for soft moments
     Body / UI: IBM Plex Sans — engineered grotesk
     Mono: IBM Plex Mono — workshop ticket mono */
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-serif:   "Crimson Pro", "Hoefler Text", Georgia, serif;
  --font-sans:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* Type scale — mobile defaults */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  32px;
  --fs-display: 38px;

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

  /* Layout */
  --container: 1240px;
  --gutter: 20px;

  --r-sm: 4px;
  --r-md: 10px;
  --r-pill: 999px;

  --shadow-card: 0 14px 32px -16px rgba(20, 22, 26, 0.28);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t: 280ms;
}

@media (min-width: 768px) {
  :root {
    --fs-base: 17px;
    --fs-md:   20px;
    --fs-lg:   26px;
    --fs-xl:   30px;
    --fs-2xl:  40px;
    --fs-display: 52px;
    --gutter: 32px;
  }
}

@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 ---------- */
html {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400; /* Anton is heavy by nature */
  line-height: 1.04;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  color: var(--ink);
}
h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--ink);
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.005em; }

em, .italic { font-family: var(--font-serif); font-style: italic; font-weight: 500; text-transform: none; }
h1 em, h2 em, .word-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  color: var(--accent-deep);
  letter-spacing: -0.008em;
  font-size: 1.06em;
  line-height: 0.96;
}

p { max-width: 65ch; color: var(--ink-3); }
p.lead { color: var(--ink-2); font-size: var(--fs-md); max-width: 58ch; }

small, .small { font-size: var(--fs-sm); color: var(--muted); }
strong { font-weight: 600; color: var(--ink); }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-decoration-color: rgba(26,28,31,0.28); text-underline-offset: 4px; transition: text-decoration-color var(--t-fast) var(--ease); }
a:hover { text-decoration-color: var(--accent); }

::selection { background: var(--accent); color: var(--paper-2); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent-deep); }

.divide-top { border-top: 1px solid var(--line); }
.divide-bottom { border-bottom: 1px solid var(--line); }

/* Accent scoped to dark backgrounds */
.site-footer,
.cookie-banner {
  --accent: var(--accent-on-dark);
  --accent-deep: var(--accent-on-dark);
}

/* ---------- Engineer graph-paper grid utility ---------- */
.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-position: -1px -1px, -1px -1px, -1px -1px, -1px -1px;
}
.section--ink.bg-grid,
.cta-band.bg-grid,
.hero.bg-grid {
  background-image:
    linear-gradient(rgba(220, 216, 210, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 216, 210, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(220, 216, 210, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 216, 210, 0.07) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  background-color: var(--surface-dark);
}

/* ---------- LED indicator dot ---------- */
.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(74, 122, 85, 0.18), inset 0 0 2px rgba(255,255,255,0.4);
  flex-shrink: 0;
  vertical-align: middle;
}
.led--brass { background: var(--brass); box-shadow: 0 0 0 3px var(--brass-soft), inset 0 0 2px rgba(255,255,255,0.4); }
.led--accent { background: var(--accent); box-shadow: 0 0 0 3px rgba(229, 90, 30, 0.2), inset 0 0 2px rgba(255,255,255,0.4); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
