/* ==========================================================================
   InventHelp — Site 15
   Precision grotesque · near-white ground · hairline rules · one accent
   Layout rhythm: a fixed label column on the left, a measured text column
   beside it, and horizontal hairlines marking every section boundary.
   ========================================================================== */

/* --- 1. Reset ------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body,
h1, h2, h3, p, figure, figcaption, blockquote, ul, ol, li {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

a { color: inherit; }

/* --- 2. Tokens ----------------------------------------------------------- */

:root {
  --ground:     #fbfbfa;
  --ground-alt: #f2f2f0;
  --ink:        #101112;
  --ink-mid:    #55585c;
  --ink-soft:   #808387;
  --rule:       #dcdcd8;
  --rule-firm:  #101112;
  --accent:     #cf3520;

  --grotesk: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --text:    'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --shell:  74rem;
  --gutter: 1.6rem;
  --label:  11.5rem;   /* width of the left-hand label column */
  --gap:    3.25rem;   /* space between label column and text column */
  --measure: 41rem;

  --t-mono: 0.7rem;
  --t--1:   0.83rem;
  --t-0:    1.02rem;
  --t-1:    1.2rem;
  --t-2:    1.5rem;
  --t-3:    2rem;
  --t-4:    3.1rem;
}

/* --- 3. Base ------------------------------------------------------------- */

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-0);
  line-height: 1.68;
  font-weight: 400;
  letter-spacing: -0.003em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ink);
  color: var(--ground);
}

p a {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--accent);
}

p a:hover {
  color: var(--accent);
  box-shadow: inset 0 -1px 0 var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: none;
}

strong { font-weight: 600; }

/* --- 4. Shell ------------------------------------------------------------ */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- 5. Masthead --------------------------------------------------------- */

.masthead {
  background: var(--ground);
  border-bottom: 1px solid var(--rule);
}

.mast-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding-top: 1.15rem;
  padding-bottom: 1.15rem;
}

.mark {
  flex: 0 0 auto;
  line-height: 0;
}

.mark img {
  width: 196px;
  height: auto;
}

.mainnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.9rem;
}

.mainnav a {
  font-family: var(--mono);
  font-size: var(--t-mono);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  padding-bottom: 0.2em;
  border-bottom: 1px solid transparent;
}

.mainnav a:hover { color: var(--ink); }

.mainnav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --- 6. Opening block ---------------------------------------------------- */

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  gap: var(--gap);
  align-items: end;
  padding-top: 4.5rem;
  padding-bottom: 3.25rem;
}

.opening-text { max-width: 34rem; }

.kicker {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
}

h1 {
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: var(--t-4);
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.standfirst {
  font-size: var(--t-1);
  line-height: 1.5;
  color: var(--ink-mid);
  margin-top: 1.5rem;
  max-width: 30rem;
}

.byline {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: inline-block;
}

.opening-figure { line-height: 0; }

.opening-figure img { width: 100%; }

.opening-wide { grid-template-columns: minmax(0, 1fr); }

.opening-wide .opening-figure {
  margin-top: 2.75rem;
  grid-column: 1;
}

/* --- 7. Article bands ---------------------------------------------------- */

.paper { padding-bottom: 1rem; }

.overture {
  border-top: 1px solid var(--rule-firm);
  padding: 2.6rem 0 0.5rem;
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: 0 var(--gap);
}

.overture .label { grid-column: 1; }

.overture-body {
  grid-column: 2;
  max-width: var(--measure);
}

.overture-body p { margin-bottom: 1.25rem; }

.lead {
  font-size: var(--t-1);
  line-height: 1.55;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.band {
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: 0 var(--gap);
  border-top: 1px solid var(--rule);
  padding: 2.9rem 0 0.6rem;
  margin-top: 2.9rem;
}

.label {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.5;
  align-self: start;
}

.label .num {
  display: block;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.band-body { max-width: var(--measure); }

h2 {
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: var(--t-3);
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin-bottom: 1.15rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: var(--t-1);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.7rem;
}

.band-body p { margin-bottom: 1.25rem; }

/* Lists — hairline markers, no bullets */

.band-body ul,
.band-body ol { margin: 0 0 1.6rem; }

.band-body li {
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.6rem;
}

.band-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 1.4rem;
  height: 1px;
  background: var(--accent);
}

.band-body ol { counter-reset: seq; }

.band-body ol li { counter-increment: seq; }

.band-body ol li::before {
  content: counter(seq, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: var(--t-mono);
  color: var(--accent);
  line-height: 2.5;
}

/* --- 8. Figures ---------------------------------------------------------- */

figure { line-height: 0; }

.fig {
  margin: 2.2rem 0 2.4rem;
  background: var(--ground-alt);
}

.fig img { width: 100%; }

.fig-bleed {
  grid-column: 1 / -1;
  margin: 2.6rem 0 0.4rem;
}

.fig-narrow { max-width: 21rem; }

.figcap {
  font-family: var(--mono);
  font-size: var(--t-mono);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--ground);
  padding-top: 0.7rem;
  max-width: 26rem;
}

/* --- 9. Pull quote ------------------------------------------------------- */

.quote {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--label) minmax(0, 1fr);
  gap: 0 var(--gap);
  border-top: 1px solid var(--rule-firm);
  border-bottom: 1px solid var(--rule);
  padding: 1.7rem 0 1.8rem;
  margin: 2.6rem 0 2.4rem;
}

.quote p {
  grid-column: 2;
  grid-row: 1;
  max-width: 36rem;
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: var(--t-2);
  line-height: 1.24;
  letter-spacing: -0.022em;
  margin: 0;
}

.quote .source {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--mono);
  font-size: var(--t-mono);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* --- 10. Close ----------------------------------------------------------- */

.close {
  border-top: 1px solid var(--rule-firm);
  margin-top: 3rem;
  padding: 1.1rem 0 3.6rem;
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --- 11. Footer ---------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule-firm);
  background: var(--ground-alt);
  padding: 2.6rem 0 2.2rem;
}

.footer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem 2.5rem;
  padding-bottom: 2rem;
}

.footer-mark { line-height: 0; }

.footer-mark img { width: 168px; height: auto; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.7rem;
}

.footer-nav a {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--accent); }

/* Injected link columns */

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.2rem 3rem;
  border-top: 1px solid var(--rule);
  padding: 2.2rem 0 2rem;
}

.footer-cols h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--t-mono);
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.8rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.footer-cols ul li {
  margin-bottom: 0.42rem;
  line-height: 1.45;
}

.footer-cols a {
  font-family: var(--text);
  font-size: var(--t--1);
  color: var(--ink-mid);
  text-decoration: none;
}

.footer-cols a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.copyright {
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* --- 12. Responsive ------------------------------------------------------ */

@media (max-width: 1080px) {
  :root { --label: 9rem; --gap: 2.4rem; }
}

@media (max-width: 900px) {
  :root {
    --t-4: 2.5rem;
    --t-3: 1.75rem;
    --t-2: 1.35rem;
  }

  .opening {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding-top: 3rem;
  }

  .opening-text { max-width: 40rem; }

  .opening-figure { max-width: 28rem; }

  .opening-wide .opening-figure { max-width: none; margin-top: 0; }

  .overture,
  .band,
  .quote {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .overture .label,
  .overture-body,
  .quote p,
  .quote .source { grid-column: 1; }

  .quote p { grid-row: 2; }

  .quote .source {
    grid-row: 1;
    margin-bottom: 0.9rem;
  }

  .label { margin-bottom: 1rem; }

  .label .num { display: inline; margin-right: 0.6rem; }

  .band-body,
  .overture-body { max-width: 42rem; }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root {
    --t-0: 1rem;
    --t-4: 2.05rem;
    --t-3: 1.55rem;
    --t-2: 1.25rem;
    --t-1: 1.12rem;
    --gutter: 1.15rem;
  }

  .mast-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .mark img { width: 168px; }

  .mainnav { gap: 0.3rem 1.15rem; }

  .mainnav a { font-size: 0.65rem; letter-spacing: 0.04em; }

  .opening { padding-top: 2.4rem; padding-bottom: 2.4rem; }

  .opening-figure { max-width: none; }

  .band { padding-top: 2.3rem; margin-top: 2.3rem; }

  .fig { margin: 1.8rem 0 1.9rem; }

  .fig-narrow { max-width: none; }

  .quote { margin: 2rem 0 1.9rem; }

  .footer-head { flex-direction: column; align-items: flex-start; }

  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}

/* --- 13. Motion and print ------------------------------------------------ */

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

@media print {
  .mainnav,
  .site-footer { display: none; }
  body { background: #fff; }
}
