/* ==========================================================================
   InventHelp — Editorial longform stylesheet
   Site 1 · navy ink on warm paper · printed-feature layout
   ========================================================================== */

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

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

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

body,
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd, 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 {
  --ink:        #15181d;
  --ink-soft:   #4c5462;
  --paper:      #fbfaf6;
  --paper-deep: #f1eee6;
  --navy:       #123166;
  --navy-deep:  #0b2049;
  --amber:      #b0611b;
  --rule:       #ded8cb;

  --serif:  'Source Serif 4', 'Lora', Georgia, 'Times New Roman', serif;
  --display:'Playfair Display', Georgia, serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --measure: 64ch;
  --flank:   8.5rem;   /* how far images break out of the text column */
  --gutter:  1.5rem;

  --step-1: 0.78rem;
  --step0:  1.075rem;
  --step1:  1.28rem;
  --step2:  1.62rem;
  --step3:  2.1rem;
  --step4:  2.9rem;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step0);
  line-height: 1.75;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 0.05em;
}

a:hover { color: var(--amber); border-bottom-color: var(--amber); }

a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-bottom-color: transparent;
}

strong { font-weight: 600; }

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

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

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

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

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

.brand {
  border-bottom: 0;
  flex: 0 0 auto;
  line-height: 0;
}

.brand:focus-visible { outline-offset: 6px; }

.brand img {
  width: 210px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 2rem;
}

.site-nav a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.3em;
}

.site-nav a:hover { color: var(--navy-deep); border-bottom-color: var(--rule); }

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

/* --- 6. Hero ------------------------------------------------------------- */

.hero-figure {
  margin: 0;
  width: 100%;
}

.hero-frame {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--paper-deep);
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.title-block {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.2rem var(--gutter) 0;
  text-align: center;
}

.kicker {
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 1.2rem;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step4);
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.standfirst {
  font-size: var(--step1);
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 1.5rem;
  font-style: italic;
}

.byline {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  display: inline-block;
}

/* --- 7. Article grid ----------------------------------------------------- */

.article {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [wide-start] minmax(0, var(--flank))
    [text-start] minmax(0, var(--measure))
    [text-end]   minmax(0, var(--flank))
    [wide-end]   minmax(var(--gutter), 1fr)
    [full-end];
  padding: 3.4rem 0 4.5rem;
}

.article > * { grid-column: text-start / text-end; }

.article > p { margin-bottom: 1.5rem; }

.article > ul,
.article > ol { margin-bottom: 1.7rem; }

/* Lead paragraph with a true three-line drop cap */

.lead { font-size: var(--step1); line-height: 1.65; }

.lead::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 700;
  font-size: 4.35em;
  line-height: 0.86;
  color: var(--amber);
  padding: 0.04em 0.09em 0 0;
  margin-top: 0.02em;
}

/* Section headings: hairline, eyebrow, then the heading itself */

.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amber);
  border-top: 1px solid var(--rule);
  padding-top: 1.05rem;
  margin-top: 3.2rem;
  margin-bottom: 0.85rem;
}

.article > h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step3);
  line-height: 1.2;
  letter-spacing: -0.008em;
  margin-bottom: 1.3rem;
  text-wrap: balance;
}

.article > h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step2);
  line-height: 1.28;
  margin: 2.4rem 0 0.9rem;
}

/* Lists */

.article ul li,
.article ol li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.75rem;
}

.article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.85rem;
  height: 1px;
  background: var(--amber);
}

.article ol { counter-reset: seq; }

.article ol li { counter-increment: seq; }

.article ol li::before {
  content: counter(seq);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  line-height: 2.5;
}

/* Pull quote */

.article > blockquote {
  border-left: 5px solid var(--navy);
  padding: 0.35rem 0 0.35rem 1.9rem;
  margin: 2.7rem 0 2.9rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step2);
  line-height: 1.35;
  letter-spacing: -0.006em;
  color: var(--ink);
}

.article > blockquote p { margin-bottom: 0; }

.article > blockquote .attrib {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

/* Figures that break out of the measure, alternating side */

.article > figure {
  margin: 2.9rem 0 3.1rem;
}

.article > .bleed-left  { grid-column: wide-start / text-end; }
.article > .bleed-right { grid-column: text-start / wide-end; }

.frame {
  overflow: hidden;
  background: var(--paper-deep);
  width: 100%;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ratio-wide  { aspect-ratio: 16 / 9; }
.ratio-still { aspect-ratio: 4 / 3; }
.ratio-tall  { aspect-ratio: 3 / 4; }

/* Closing rule */

.endmark {
  margin-top: 3.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --- 8. Footer ----------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 3rem 0 2.6rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2.5rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--rule);
}

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

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

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.8rem;
}

.footer-nav a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.25em;
}

.footer-nav a:hover { color: var(--navy-deep); border-bottom-color: var(--rule); }

/* Resource columns */

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.4rem 3rem;
  padding: 2.4rem 0 2.2rem;
}

.footer-cols h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.footer-cols ul li { margin-bottom: 0.5rem; }

.footer-cols a {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border-bottom: 0;
}

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

.copyright {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

/* --- 9. Responsive ------------------------------------------------------- */

@media (max-width: 1080px) {
  :root { --flank: 4.5rem; }
}

@media (max-width: 900px) {
  :root { --step4: 2.4rem; --step3: 1.85rem; --flank: 2rem; }
  .hero-frame { aspect-ratio: 16 / 9; }
  .title-block { padding-top: 2.6rem; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root {
    --step0: 1.02rem;
    --step4: 2.05rem;
    --step3: 1.6rem;
    --step2: 1.35rem;
    --gutter: 1.15rem;
  }

  body { line-height: 1.7; }

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

  .brand img { width: 176px; }

  .site-nav { gap: 0.35rem 1.35rem; }

  .site-nav a { font-size: 0.7rem; letter-spacing: 0.11em; }

  .hero-frame { aspect-ratio: 3 / 2; }

  .title-block { text-align: left; }

  .article { padding-top: 2.4rem; }

  /* On narrow screens the break-out images run edge to edge */
  .article > .bleed-left,
  .article > .bleed-right { grid-column: full-start / full-end; }

  .article > figure { margin: 2.2rem 0 2.4rem; }

  .ratio-tall { aspect-ratio: 4 / 5; }

  .lead::first-letter { font-size: 3.8em; }

  .article > blockquote { padding-left: 1.3rem; border-left-width: 4px; }

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

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

@media (max-width: 420px) {
  .lead::first-letter { font-size: 3.4em; }
}

/* --- 10. Motion & 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 {
  .site-nav, .site-footer { display: none; }
  body { background: #fff; }
}
