/* ==========================================================================
   home hack corner — shared stylesheet (dark)
   --------------------------------------------------------------------------
   The whole niche is cream, blush and clean white. This goes the other way:
   deep forest-black, linen ink, and a woven texture sitting over the whole
   background so the page reads like cloth rather than a screen.

   Three texture layers, all on the background, none on the content:
     1. a warm radial lift, so the dark is never flat
     2. a linen weave — crossing threads at 4px, plus irregular slubs
     3. film grain, the same texture that is on the pins
   ========================================================================== */

:root {
  --bg:          #1E1F16;   /* the page. forest pushed almost to black */
  --bg-lift:     #2A2B20;   /* raised surfaces, hairlines */
  --forest:      #3B3B2A;   /* the original brand forest — now an accent tone */

  --linen:       #EDE7D9;   /* the ink */
  --linen-dim:   #B9B4A2;   /* secondary text */
  --sage:        #8C8D74;   /* labels, quiet marks */
  --clay:        #C8825A;   /* the one accent. warm, readable on dark */

  --rule:        rgba(237, 231, 217, 0.14);

  --display: "Fraunces", Georgia, serif;
  --body:    "Newsreader", Georgia, serif;

  --measure: 34rem;
  --page:    72rem;
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}
body { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--clay); color: var(--bg); }

/* --- page ----------------------------------------------------------------- */
body {
  background: transparent;
  color: var(--linen);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-weight: 350;
  font-optical-sizing: auto;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* layers 1 + 2 — the weave, the slubs, and the warm lift underneath */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(237, 231, 217, 0.030) 0px,
      rgba(237, 231, 217, 0.030) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(237, 231, 217, 0.026) 0px,
      rgba(237, 231, 217, 0.026) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(237, 231, 217, 0.022) 0px,
      rgba(237, 231, 217, 0.022) 1px,
      transparent 1px,
      transparent 37px
    ),
    radial-gradient(120% 80% at 50% -10%, rgba(59, 59, 42, 0.45) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(59, 59, 42, 0.30) 0%, transparent 65%),
    var(--bg);
}

/* layer 3 — grain, over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.30'/%3E%3C/svg%3E");
}

.wrap { width: min(100% - 2.5rem, var(--page)); margin-inline: auto; }
.measure { max-width: var(--measure); }

/* --- masthead ------------------------------------------------------------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  margin-bottom: 3.5rem;
}
.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--linen);
}
.masthead nav {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--linen-dim);
}
.masthead nav a { text-decoration: none; margin-left: 1.5rem; }
.masthead nav a:hover { color: var(--clay); }

/* --- article head --------------------------------------------------------- */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 1.25rem;
}
h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  margin: 0 0 1.5rem;
  max-width: 20ch;
  color: var(--linen);
}
.standfirst {
  font-size: 1.25rem;
  line-height: 1.62;
  color: var(--linen);
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.disclosure {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--linen-dim);
  border-left: 2px solid var(--clay);
  padding-left: 0.9rem;
  max-width: var(--measure);
  margin: 0 0 3rem;
}

/* --- hero ----------------------------------------------------------------- */
/* On a dark page a photo floats unless it is held down. A hairline and a
   deep shadow set it into the cloth instead of on top of it. */
.hero { margin: 0 0 3.5rem; }
.hero img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(237, 231, 217, 0.10);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.55);
}
.hero figcaption {
  font-size: 0.8125rem;
  color: var(--linen-dim);
  margin-top: 0.9rem;
  max-width: var(--measure);
}

/* --- body copy ------------------------------------------------------------ */
h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 4rem 0 1.25rem;
  max-width: 24ch;
  color: var(--linen);
}
p { max-width: var(--measure); color: var(--linen); }

/* --- the picks ------------------------------------------------------------ */
.picks { margin-top: 3rem; counter-reset: pick; }

.pick {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0 1.5rem;
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
}
.pick::before {
  counter-increment: pick;
  content: counter(pick, decimal-leading-zero);
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--sage);
  line-height: 1.1;
  padding-top: 0.35rem;
}
.pick-body { max-width: var(--measure); }
.pick h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--linen);
}
.pick h3 a { text-decoration: none; border-bottom: 1px solid var(--clay); }
.pick h3 a:hover { color: var(--clay); }

.spec {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
  font-size: 0.9375rem;
}
.spec li {
  display: flex;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px dotted rgba(237, 231, 217, 0.16);
}
.spec li span:first-child {
  flex: 0 0 7.5rem;
  color: var(--sage);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.15rem;
}
.noticed { font-style: italic; color: var(--linen-dim); }

.out {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--linen);
  border-bottom: 1px solid rgba(237, 231, 217, 0.45);
  padding-bottom: 0.15rem;
  transition: color .18s ease, border-color .18s ease;
}
.out:hover { color: var(--clay); border-color: var(--clay); }
.out::after { content: " \2197"; }

/* --- the pratfall block --------------------------------------------------- */
/* Inverted. On a dark page the honest block becomes the one bright thing —
   which is what it should have been all along. */
.almost {
  background: var(--linen);
  color: var(--forest);
  padding: 3rem 2rem;
  margin: 4.5rem 0;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.45);
}
.almost .inner { max-width: var(--measure); margin-inline: auto; }
.almost h2 { margin-top: 0; color: var(--forest); }
.almost p { color: #4A4A36; }
.almost .label {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #7C7D62;
  margin: 0 0 0.75rem;
}

/* --- fill-me markers — delete the class once the real value is in ---------- */
.fill {
  background: rgba(200, 130, 90, 0.18);
  border-bottom: 1px dashed var(--clay);
  color: var(--clay);
  padding: 0 0.2em;
}
.almost .fill {
  background: rgba(156, 74, 47, 0.14);
  color: #8A4226;
  border-bottom-color: #8A4226;
}

/* --- pins strip ----------------------------------------------------------- */
.pins {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.pins img { width: 100%; border: 1px solid rgba(237, 231, 217, 0.10); }

/* --- footer --------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2.5rem 0 4rem;
  font-size: 0.875rem;
  color: var(--linen-dim);
}
footer a { text-decoration: none; border-bottom: 1px solid var(--rule); }
footer a:hover { color: var(--clay); }
footer .row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1rem; }
footer p { color: var(--linen-dim); }

/* --- small screens -------------------------------------------------------- */
@media (max-width: 34rem) {
  .pick { grid-template-columns: 1fr; gap: 0; }
  .pick::before { font-size: 1.1rem; padding: 0 0 0.5rem; }
  .spec li { flex-direction: column; gap: 0.1rem; }
  .spec li span:first-child { flex: none; }
  .masthead .wrap { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .masthead nav a { margin: 0 1.25rem 0 0; }
  .almost { padding: 2.25rem 1.5rem; margin-inline: -1.25rem; }
}

/* The weave is a 4px pattern. On a high-density phone screen it can moiré,
   so the threads are scaled up where the pixel ratio is 2x or more. */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body::before { background-size: 6px 6px, 6px 6px, 48px 100%, auto, auto, auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
