/* ==========================================================================
   InventHelp — Site 20
   Warm informal magazine · sage ground with clay accents
   Slab-serif headings (Zilla Slab) over a plain humanist sans body (Karla)
   Two-column intro block · boxed pull-quotes with heavy top rules
   ========================================================================== */

/* --- 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, dt, 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 {
  --paper:      #f3f4ea;   /* pale sage page ground */
  --paper-deep: #e5e8d7;   /* recessed sage panel */
  --paper-lift: #fbfbf4;   /* raised sheet */
  --ink:        #22291f;   /* deep sage-black text */
  --ink-soft:   #55604d;
  --sage:       #5c7050;   /* primary accent */
  --sage-deep:  #354229;
  --clay:       #b25f3c;   /* secondary accent */
  --clay-deep:  #8d4526;
  --rule:       #ccd3bc;
  --rule-firm:  #a9b697;

  --slab: 'Zilla Slab', 'Rockwell', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --measure: 44rem;   /* the reading column */
  --flank:   6rem;    /* how far wide figures push past the column */
  --gutter:  1.5rem;

  --step-2: 0.7rem;
  --step-1: 0.84rem;
  --step0:  1.06rem;
  --step1:  1.24rem;
  --step2:  1.55rem;
  --step3:  2rem;
  --step4:  2.85rem;
}

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

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

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

a {
  color: var(--clay-deep);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 0 var(--clay);
  padding-bottom: 0.04em;
}

a:hover {
  color: var(--sage-deep);
  box-shadow: inset 0 -2px 0 0 var(--sage);
}

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

strong { font-weight: 700; }

h1, h2, h3 {
  font-family: var(--slab);
  font-weight: 700;
  letter-spacing: -0.005em;
}

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

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

.column {
  max-width: var(--measure);
  margin: 0 auto;
}

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

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

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

.brand {
  box-shadow: none;
  flex: 0 0 auto;
  line-height: 0;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.7rem;
}

.site-nav a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  box-shadow: none;
  padding: 0.2em 0 0.25em;
  border-bottom: 3px solid transparent;
}

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

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

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

.hero {
  background: var(--paper-deep);
  border-bottom: 1px solid var(--rule);
  padding: 2.2rem 0 0;
}

.hero-figure {
  width: 100%;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  background: var(--sage-deep);
  border: 1px solid var(--rule-firm);
}

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

/* Two-column intro block */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 1.6rem 3.2rem;
  align-items: start;
  border-top: 6px solid var(--ink);
  margin: 2.4rem 0 0;
  padding: 1.6rem 0 2.6rem;
}

.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay-deep);
  background: var(--paper-lift);
  border: 1px solid var(--rule-firm);
  padding: 0.32em 0.8em;
  margin-bottom: 1.1rem;
}

h1 {
  font-size: var(--step4);
  line-height: 1.1;
  text-wrap: balance;
}

.intro-side { padding-top: 0.4rem; }

.standfirst {
  font-size: var(--step1);
  line-height: 1.6;
  color: var(--ink-soft);
  border-left: 4px solid var(--sage);
  padding-left: 1.1rem;
}

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

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

.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.2rem 0 4.4rem;
}

.article p { margin-bottom: 1.45rem; }

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

/* Eyebrow labels sit on a heavy rule above each section */

.eyebrow {
  clear: both;
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-deep);
  border-top: 4px solid var(--rule-firm);
  padding-top: 0.9rem;
  margin-top: 3rem;
  margin-bottom: 0.55rem;
}

.article h2 {
  font-size: var(--step3);
  line-height: 1.18;
  margin-bottom: 1.15rem;
  text-wrap: balance;
}

.article h3 {
  font-size: var(--step2);
  line-height: 1.25;
  margin: 2.2rem 0 0.8rem;
}

/* Lists */

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

.article li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.7rem;
}

.article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--clay);
}

.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(--slab);
  font-weight: 700;
  font-size: 1rem;
  color: var(--clay-deep);
  line-height: 1.8;
}

/* Plain-word definition list */

.terms {
  background: var(--paper-lift);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--sage);
  padding: 1.6rem 1.7rem 0.6rem;
  margin: 2.2rem 0 2.6rem;
}

.terms dt {
  font-family: var(--slab);
  font-weight: 700;
  font-size: var(--step1);
  line-height: 1.3;
  color: var(--sage-deep);
  margin-bottom: 0.25rem;
}

.terms dd {
  margin-bottom: 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--rule);
}

.terms dd:last-child { border-bottom: 0; }

/* Boxed pull quote with a heavy top rule */

.pull {
  background: var(--paper-deep);
  border-top: 9px solid var(--clay);
  padding: 1.7rem 1.8rem 1.6rem;
  margin: 2.8rem 0 3rem;
}

.pull p {
  font-family: var(--slab);
  font-weight: 600;
  font-size: var(--step2);
  line-height: 1.32;
  color: var(--sage-deep);
  margin-bottom: 0;
}

.pull .attrib {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

/* Figures */

.article figure { margin: 2.6rem 0 2.8rem; }

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

.shot {
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--rule-firm);
  width: 100%;
}

.ratio-wide  { aspect-ratio: 3 / 2; }
.ratio-still { aspect-ratio: 4 / 3; }
.ratio-tall  { aspect-ratio: 4 / 5; }

.figure-wide {
  width: calc(100% + (2 * var(--flank)));
  margin-left: calc(-1 * var(--flank));
}

.figure-side {
  float: right;
  width: 47%;
  margin: 0.5rem calc(-1 * var(--flank)) 1.5rem 2rem;
}

.caption {
  font-family: var(--sans);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--clay);
}

/* Closing line */

.closing {
  clear: both;
  margin-top: 3rem;
  padding: 1.4rem 0 0;
  border-top: 4px solid var(--rule-firm);
  font-family: var(--slab);
  font-weight: 600;
  font-size: var(--step1);
  line-height: 1.4;
  color: var(--sage-deep);
}

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

.site-footer {
  background: var(--paper-deep);
  border-top: 7px solid var(--sage);
  padding: 2.8rem 0 2.4rem;
}

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

.footer-mark {
  box-shadow: none;
  line-height: 0;
}

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

.footer-wordmark {
  display: block;
  font-family: var(--slab);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-top: 0.7rem;
}

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

.footer-nav a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--ink-soft);
  box-shadow: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.2em;
}

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

/* Injected link columns */

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

.footer-cols h2 {
  font-family: var(--slab);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.7rem;
  margin-bottom: 0.9rem;
  border-bottom: 4px solid var(--rule-firm);
}

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

.footer-cols a {
  font-family: var(--sans);
  font-size: 0.83rem;
  color: var(--ink-soft);
  box-shadow: none;
}

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

.copyright {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule-firm);
  padding-top: 1.3rem;
}

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

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

@media (max-width: 900px) {
  :root {
    --step4: 2.3rem;
    --step3: 1.78rem;
    --flank: 1.5rem;
  }

  .hero-figure { aspect-ratio: 16 / 9; }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
    padding-bottom: 2.2rem;
  }

  .intro-side { padding-top: 0; }

  .figure-side {
    float: none;
    width: 100%;
    margin: 2.4rem 0 2.6rem;
  }

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

@media (max-width: 720px) {
  :root {
    --step0: 1.02rem;
    --step4: 1.95rem;
    --step3: 1.55rem;
    --step2: 1.32rem;
    --step1: 1.14rem;
    --gutter: 1.15rem;
    --flank: 0rem;
  }

  body { line-height: 1.72; }

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

  .brand img { width: 172px; }

  .site-nav { gap: 0.3rem 1.15rem; }

  .site-nav a { font-size: 0.78rem; }

  .hero { padding-top: 1.5rem; }

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

  .intro { border-top-width: 5px; margin-top: 1.8rem; }

  .article { padding-top: 2.4rem; }

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

  .article figure { margin: 2.1rem 0 2.3rem; }

  .ratio-wide { aspect-ratio: 4 / 3; }

  .pull { padding: 1.4rem 1.25rem 1.3rem; border-top-width: 7px; }

  .terms { padding: 1.3rem 1.2rem 0.4rem; }

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

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

/* --- 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; }
}
