/* ==========================================================================
   Fable Software LLC — design system
   Plain CSS, no build step. Construction-credible, plainspoken, not hypey.
   ========================================================================== */

:root {
  /* Color — steel/slate with a work-safety amber accent */
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f8;
  --color-bg-dark: #0f1b26;
  --color-bg-dark-alt: #16283a;
  --color-ink: #16222e;
  --color-ink-soft: #47576a;
  --color-ink-invert: #eef3f7;
  --color-ink-invert-soft: #9fb2c4;
  --color-line: #dde3e9;
  --color-line-dark: #26394c;
  --color-accent: #e8873a;        /* amber — construction/safety */
  --color-accent-ink: #b5641f;
  --color-primary: #12405f;       /* deep steel blue */
  --color-primary-dark: #0d3049;

  /* Typography */
  --font-sans: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.5rem;
  --lh-tight: 1.15;
  --lh-normal: 1.6;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Structure */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 34, 46, 0.06), 0 1px 3px rgba(16, 34, 46, 0.08);
  --shadow-md: 0 4px 16px rgba(16, 34, 46, 0.10);
  --maxw: 1120px;
  --header-h: 68px;
}

/* --- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: var(--lh-tight); color: var(--color-ink); font-weight: 700; margin: 0 0 var(--space-4); }
h1 { font-size: var(--fs-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-4); }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* --- Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-7); }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: var(--color-ink-invert); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--color-ink-invert-soft); }

.section__head { max-width: 760px; margin-bottom: var(--space-6); }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-ink);
  margin-bottom: var(--space-3);
}
.section--dark .eyebrow { color: var(--color-accent); }
.lead { font-size: var(--fs-lg); color: var(--color-ink-soft); }
.section--dark .lead { color: var(--color-ink-invert-soft); }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn--primary:hover { background: var(--color-accent-ink); border-color: var(--color-accent-ink); }
.btn--secondary { background: transparent; color: var(--color-primary); border-color: var(--color-line); }
.btn--secondary:hover { border-color: var(--color-primary); }
.btn--ghost-invert { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn--ghost-invert:hover { border-color: #fff; }
.btn--sm { padding: 0.55rem 1rem; font-size: var(--fs-xs); }

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: baseline; gap: 0.5ch; font-weight: 800; font-size: var(--fs-lg); color: var(--color-ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--color-accent); }
.brand__sub { font-size: var(--fs-xs); font-weight: 600; color: var(--color-ink-soft); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav__list { display: flex; align-items: center; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.nav__link { font-size: var(--fs-sm); font-weight: 600; color: var(--color-ink-soft); }
.nav__link:hover { color: var(--color-ink); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  font-size: var(--fs-lg);
  color: var(--color-ink);
  cursor: pointer;
}

/* Menu toggle without JS via :target */
#menu:target ~ .nav .nav__list,
.nav__list.is-open { display: flex; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--color-bg-dark) 0%, var(--color-bg-dark-alt) 100%);
  color: var(--color-ink-invert);
  padding-block: var(--space-9);
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero__accent { color: var(--color-accent); }
.hero__sub { font-size: var(--fs-lg); color: var(--color-ink-invert-soft); max-width: 54ch; margin-bottom: var(--space-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__note { margin-top: var(--space-5); font-size: var(--fs-sm); color: var(--color-ink-invert-soft); }

/* --- Bands / prose ------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose p { color: var(--color-ink-soft); }
.band-quote {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.3;
  max-width: 24ch;
  color: #fff;
}
.band-quote .accent { color: var(--color-accent); }

/* --- Grids --------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #c9d2db; }

.product-card__name { font-size: var(--fs-xl); margin-bottom: var(--space-1); }
.product-card__tag { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-accent-ink); margin-bottom: var(--space-3); }
.product-card__benefit { color: var(--color-ink-soft); flex: 1; }
.product-card__link { margin-top: var(--space-4); font-weight: 700; font-size: var(--fs-sm); }
.product-card__link::after { content: " \2192"; }
.product-card--primary { border-color: var(--color-accent); border-width: 2px; }
.product-card--primary .product-card__tag { color: var(--color-accent-ink); }

/* --- Pillars ------------------------------------------------------------- */
.pillar__icon { color: var(--color-accent); font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.pillar h3 { margin-bottom: var(--space-2); }
.pillar p { color: var(--color-ink-soft); margin: 0; }

/* --- Contact band -------------------------------------------------------- */
.contact-band { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-7); align-items: center; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.contact-list a { color: #fff; font-weight: 600; }
.contact-list .muted { color: var(--color-ink-invert-soft); font-weight: 400; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--color-bg-dark); color: var(--color-ink-invert-soft); padding-block: var(--space-8) var(--space-6); font-size: var(--fs-sm); }
.site-footer a { color: var(--color-ink-invert-soft); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: var(--space-6); }
.footer-col h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer-brand__name { font-weight: 800; font-size: var(--fs-lg); color: #fff; margin-bottom: var(--space-2); }
.footer-brand__tag { max-width: 34ch; }
.footer-nap { font-style: normal; display: grid; gap: var(--space-2); }
.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
}
.footer-bottom__links { display: flex; gap: var(--space-5); flex-wrap: wrap; }

/* --- Utilities ----------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --fs-4xl: 2.6rem; --fs-3xl: 2.1rem; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-band { grid-template-columns: 1fr; }

  .nav__list {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    padding: var(--space-3) var(--space-5);
  }
  .nav__list li { width: 100%; }
  .nav__link { display: block; padding-block: var(--space-3); width: 100%; }
  .nav-toggle { display: inline-block; }
  .site-header__inner { position: relative; }
}

@media (max-width: 640px) {
  :root { --fs-4xl: 2.2rem; --fs-3xl: 1.8rem; --fs-2xl: 1.6rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: var(--space-7); }
}
