/* =========================================================================
   INGALLS ELECTRIC COMPANY
   Adapted from the AI¹ Dental design system — same token names,
   trade-appropriate values: carbon black, copper, safety-yellow.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  /* NEUTRALS — warmer, slightly more contrast for trade gravitas */
  --ivory:        #F2EEE5;   /* page background */
  --bone:         #E5DFD0;
  --paper:        #FBFAF5;
  --ink:          #0A0A09;   /* near-black carbon */
  --graphite-900: #161513;
  --graphite-700: #34322E;
  --graphite-500: #67645C;
  --graphite-300: #A6A39B;
  --graphite-200: #C8C5BC;
  --graphite-100: #E0DCD3;
  --line:         rgba(10, 10, 9, 0.14);
  --line-strong:  rgba(10, 10, 9, 0.36);

  /* BRAND — single accent: copper. Replaces blue. */
  --signal:       #B8651E;   /* copper — accent */
  --signal-dark:  #8E4D14;
  --signal-soft:  #F0DEC9;

  /* SEMANTIC — safety yellow lives in --amber, the working trade color */
  --moss:         #2F6B4E;
  --moss-soft:    #D8E4DC;
  --amber:        #F5C518;   /* SAFETY YELLOW — the Identify CTA */
  --amber-soft:   #F8E9A6;
  --rust:         #B8331E;   /* danger / hot */
  --rust-soft:    #EDD2CB;

  /* Aliases used in product code */
  --bg:           var(--ivory);
  --bg-elevated:  var(--paper);
  --bg-sunken:    var(--bone);
  --fg-1:         var(--ink);
  --fg-2:         var(--graphite-700);
  --fg-3:         var(--graphite-500);
  --fg-muted:     var(--graphite-300);
  --border:       var(--line);
  --border-bold:  var(--line-strong);
  --accent:       var(--signal);
  --accent-fg:    #FFFFFF;

  /* TYPE — same families as parent system */
  --font-serif:   'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-system:  ui-sans-serif, system-ui, -apple-system, sans-serif;

  --t-eyebrow:    0.75rem;
  --t-micro:      0.8125rem;
  --t-small:      0.9375rem;
  --t-body:       1.125rem;
  --t-lead:       1.375rem;
  --t-h6:         1.25rem;
  --t-h5:         1.5rem;
  --t-h4:         2rem;
  --t-h3:         2.75rem;
  --t-h2:         3.75rem;
  --t-h1:         5.25rem;
  --t-display:    7.5rem;

  --w-regular:    400;
  --w-medium:     500;
  --w-semibold:   600;

  --lh-tight:     1.02;
  --lh-headline:  1.12;
  --lh-body:      1.55;
  --lh-loose:     1.7;

  --track-tight:  -0.025em;
  --track-normal: 0;
  --track-wide:   0.1em;

  --s-0:   0;    --s-1:   4px; --s-2:   8px; --s-3:  12px;
  --s-4:  16px;  --s-5:  24px; --s-6:  32px; --s-7:  48px;
  --s-8:  64px;  --s-9:  96px; --s-10:128px; --s-11:192px; --s-12:256px;

  --r-0:    0px;
  --r-1:    2px;
  --r-full: 999px;

  --bw-hair:   1px;
  --bw-bold:   2px;

  --shadow-0:   none;
  --shadow-pop: 0 1px 0 0 rgba(10, 10, 9, 0.06),
                0 8px 24px -8px rgba(10, 10, 9, 0.16);

  --ease:       cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast:   150ms;
  --dur-mid:    240ms;
  --dur-slow:   400ms;

  --max-w:      1280px;
  --gutter:     48px;
}

/* ===================== BASE ===================== */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--font-serif);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: var(--w-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 { font-family: var(--font-serif); font-size: var(--t-h1); line-height: var(--lh-tight); letter-spacing: var(--track-tight); font-weight: var(--w-regular); margin: 0 0 var(--s-5); text-wrap: balance; }
h2, .h2 { font-family: var(--font-serif); font-size: var(--t-h2); line-height: var(--lh-headline); letter-spacing: var(--track-tight); font-weight: var(--w-regular); margin: 0 0 var(--s-5); text-wrap: balance; }
h3, .h3 { font-family: var(--font-serif); font-size: var(--t-h3); line-height: var(--lh-headline); letter-spacing: var(--track-tight); font-weight: var(--w-regular); margin: 0 0 var(--s-4); }
h4, .h4 { font-family: var(--font-serif); font-size: var(--t-h4); line-height: var(--lh-headline); font-weight: var(--w-regular); margin: 0 0 var(--s-4); }
h5, .h5 { font-family: var(--font-serif); font-size: var(--t-h5); line-height: var(--lh-headline); font-weight: var(--w-regular); margin: 0 0 var(--s-3); }

p { margin: 0 0 var(--s-4); max-width: 62ch; text-wrap: pretty; }
.lead { font-size: var(--t-lead); line-height: var(--lh-body); color: var(--fg-2); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--fg-3);
  font-weight: var(--w-medium);
  display: inline-block;
}

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

a {
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness var(--dur-fast) var(--ease);
}
a:hover { text-decoration-thickness: 2px; }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

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

/* ===================== LAYOUT ===================== */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

.row { display: flex; gap: var(--s-5); align-items: center; }

@media (max-width: 880px) {
  :root { --gutter: 24px; --t-h1: 3.5rem; --t-h2: 2.5rem; --t-h3: 2rem; }
  .hide-mobile { display: none !important; }
}

/* ===================== NAV ===================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 238, 229, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-wordmark .sup { font-family: var(--font-mono); font-size: 0.55em; vertical-align: super; color: var(--signal); margin-left: 2px; }
.nav-est {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--fg-3);
  border-left: 1px solid var(--line);
  padding-left: 14px;
  margin-left: 4px;
  line-height: 1.3;
}
.nav-links { display: flex; gap: 28px; flex: 1; }
.nav-links a {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}
.nav-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav-cta {
  background: var(--ink);
  color: var(--ivory);
  padding: 10px 18px;
  font-family: var(--font-serif);
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background var(--dur-fast) var(--ease);
}
.nav-cta:hover { background: #000; text-decoration: none; }
.nav-cta .arrow { font-family: var(--font-mono); margin-left: 4px; }

/* ===================== BUTTONS ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-serif);
  font-size: 18px;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn .arrow { font-family: var(--font-mono); }

.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: #000; }

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

.btn-ivory { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn-ivory:hover { background: #fff; }

/* ===================== HERO / DARK SECTIONS ===================== */

.dark { background: var(--ink); color: var(--ivory); }
.dark a { color: var(--amber); }
.dark .eyebrow { color: var(--graphite-300); }
.dark p { color: var(--graphite-300); }
.dark hr { border-color: rgba(244,241,234,0.15); }

/* Film-grain texture overlay for cinematic dark sections */
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  z-index: 1;
}
.grain > * { position: relative; z-index: 2; }

/* ===================== HAIRLINE GRID UTILITIES ===================== */

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

/* Numbered eyebrows (01 / 02 / 03) — signature device */
.numbered {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--track-wide);
  color: var(--fg-3);
  text-transform: uppercase;
}

/* Arrow bullets */
.arrow-list { list-style: none; padding: 0; margin: 0; }
.arrow-list li {
  padding-left: 22px;
  text-indent: -22px;
  margin-bottom: var(--s-2);
  line-height: var(--lh-body);
}
.arrow-list li::before {
  content: "→ ";
  font-family: var(--font-mono);
  color: var(--signal);
  margin-right: 6px;
}

.dark .arrow-list li::before { color: var(--amber); }

/* ===================== STATUS TAGS ===================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  border: 1px solid var(--line-strong);
  color: var(--fg-2);
  background: transparent;
}
.tag .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.tag-live { color: var(--moss); }
.tag-hot  { color: var(--rust); border-color: var(--rust); background: var(--rust-soft); }
.tag-warn { color: #8E6A1A; border-color: var(--amber); background: var(--amber-soft); }
.tag-cool { color: var(--signal-dark); border-color: var(--signal); background: var(--signal-soft); }

.dark .tag { border-color: rgba(244,241,234,0.4); color: var(--graphite-300); }
.dark .tag-live { color: #6EBF8E; }

/* ===================== FOOTER ===================== */

footer.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--s-7) var(--gutter);
  background: var(--ivory);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 880px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
.footer-col h6 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 16px;
  font-weight: var(--w-medium);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; font-size: 15px; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }

/* ===================== SAFETY BAR (sticky bottom) ===================== */

.safety-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--ivory);
  padding: 10px var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 2px solid var(--amber);
}
.safety-bar .warn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  font-weight: var(--w-medium);
  flex-shrink: 0;
}
.safety-bar .warn::before {
  content: "⚠";
  font-size: 14px;
}
.safety-bar .copy { color: var(--graphite-300); flex: 1; line-height: 1.4; }
.safety-bar .copy strong { color: var(--ivory); font-weight: 500; }
.safety-bar button.close {
  background: none; border: none; color: var(--graphite-300); cursor: pointer;
  font-family: inherit; font-size: 18px; padding: 0 4px;
}
.safety-bar button.close:hover { color: var(--ivory); }

@media (max-width: 720px) {
  .safety-bar { font-size: 11px; flex-wrap: wrap; }
  .safety-bar .copy { width: 100%; }
}

body.has-safety-bar { padding-bottom: 60px; }

/* ===================== IMAGE SLOT — customize for dark hero ===================== */

image-slot {
  --is-bg: var(--bone);
  --is-fg: var(--fg-3);
  --is-border: var(--line);
}

/* Fill the parent when slot is used as an absolutely-positioned fill.
   image-slot's shadow DOM hard-codes 240x160 on :host, so external
   inset:0 alone isn't enough — explicit width/height wins the cascade. */
:where(.hero-bg, .snap-photo, .story-cinema, .viewfinder-img, .ab-hero, .photo-break) > image-slot,
:where(.hero-bg, .snap-photo, .story-cinema, .viewfinder-img, .ab-hero, .photo-break) > image-slot[style] {
  width: 100% !important;
  height: 100% !important;
}
.dark image-slot {
  --is-bg: #1a1816;
  --is-fg: var(--graphite-500);
  --is-border: rgba(244,241,234,0.12);
}

/* ===================== UTILITIES ===================== */

.section { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-7) 0; }
.section-big { padding: var(--s-10) 0; }

.divider-thick { border-top: 2px solid var(--ink); }

.text-mono { font-family: var(--font-mono); }
.text-mute { color: var(--fg-2); }
.text-muter { color: var(--fg-3); }
.text-copper { color: var(--signal); }
.text-amber { color: var(--amber); }
.text-rust { color: var(--rust); }

.cap-rule {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  color: var(--fg-3);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: block;
}

/* Print: hide sticky / nav for save-as-PDF */
@media print {
  .nav, .safety-bar { display: none !important; }
  body.has-safety-bar { padding-bottom: 0; }
}
