/* ==========================================================================
   articles.css — /articles and /articles/{slug}.

   Loaded per page via @section Head, after dea.css, and after sales.css on the
   pages that use the photographic hero (.page-hero--film lives there). Colour
   and type come from tokens; no hex values, same rule as everywhere else.

   The whole file has one job: make a long piece of prose comfortable to read
   for eight minutes. That means a measure around 68 characters, generous
   leading, and headings that separate without shouting.
   ========================================================================== */

/* ------------------------------------------------------------ breadcrumbs */
.art-crumbs { font-family: var(--font-mono); font-size: .68rem; letter-spacing: var(--tracking-mono-label); text-transform: uppercase; }
.art-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.art-crumbs li { display: flex; align-items: center; gap: .5rem; color: var(--color-dusk); }
.art-crumbs li + li::before { content: "/"; color: var(--color-haze); }
.art-crumbs a { color: var(--color-dusk); text-decoration: none; }
.art-crumbs a:hover { color: var(--color-bolt); }
.art-crumbs [aria-current="page"] { color: var(--color-ink); }

/* ------------------------------------------------------------------ hero */
/* The band is deeper than the interior default in sales.css. An article opens on
   a photograph and then gives you eight minutes of prose; the picture is the only
   chance the page has to be a place before it becomes text. */
.art-hero.page-hero--film { padding-block: clamp(3rem, 8vw, 6rem); min-height: min(46vh, 26rem); display: flex; align-items: center; }
.art-hero .page-hero__bg img { object-position: var(--art-focus, center 58%); }
.art-hero__inner { display: flex; flex-direction: column; gap: var(--space-4); max-width: 46rem; }

/* Smaller than the site h1, on purpose. An article headline is a sentence, not a
   place name. "Human Design, astrology and the Gene Keys — how they differ and
   why they get used together" at the site's h1 scale is 76px, runs to five
   lines, and makes the band 838px tall — a hero that fills a laptop screen
   before the article has said anything. Capped here it is three lines,
   and the band settles between 434px and 561px across the articles and the
   index. */
.art-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.06; }
.art-hero .lede { max-width: 42ch; }

/* Nearly horizontal — 92deg rather than the pattern's 100deg. At 100deg about a
   sixth of the gradient's run is vertical, which means where the sand gives way
   depends on how tall the band happens to be, which depends on how many lines
   the headline takes. Two articles with the same grade would get visibly
   different heroes for no reason a reader could name. At 92deg the vertical
   component is 3% and every article gets the same picture.

   The shared grade in sales.css is tuned for a hero whose copy stops near half
   width and whose photograph is incidental. These carry copy out to 46rem inside
   a 72rem wrap, so the sand holds almost flat across the whole copy column and
   then gets out of the way quickly, rather than easing off from 34% where the
   words still are.

   The contrast numbers were obtained by compositing this exact gradient over
   each of the seven decoded photographs on a canvas at 1440x900 and sampling
   under the real text rectangles — the CSS as specified, which is the thing
   worth checking. Across all seven the floor is 10.85:1 for the headline,
   11.56:1 for the lede, 4.69:1 for the breadcrumbs and 4.65:1 for the dateline.
   The last two are dusk's own contrast on flat sand, so the photograph is
   costing them nothing. The eyebrow lands at 2.32-2.37:1, and that is the
   sun-on-sand token pair rather than this grade — on flat sand the same pair is
   2.28:1, so the picture is very slightly helping. That pair is a site-wide
   question and not this slice's to change. */
.art-hero .page-hero__scrim {
  background:
    linear-gradient(92deg,
      color-mix(in srgb, var(--color-sand) 99%, transparent) 0%,
      color-mix(in srgb, var(--color-sand) 97%, transparent) 46%,
      color-mix(in srgb, var(--color-sand) 84%, transparent) 68%,
      color-mix(in srgb, var(--color-sand) 30%, transparent) 88%,
      color-mix(in srgb, var(--color-sand) 6%, transparent) 100%),
    linear-gradient(to bottom,
      transparent 58%,
      color-mix(in srgb, var(--color-sand) 55%, transparent) 100%);
}
/* Stacked, no grade is good enough, and the same canvas measurement is what says
   so. On a phone the copy does not sit beside the picture, it sits on top of it
   all the way down, and the last line in the band is the dateline: 11px of dusk,
   the lightest ink on the page. Over the dark half of night-cliffs the stacked
   grade put it at 2.3:1. Holding the sand back far enough to fix that leaves so
   little of the photograph that it reads as a grey wash rather than a picture.

   So the phone gets a different arrangement rather than a compromised one. The
   picture becomes a band of its own across the top, at full strength, and the
   copy sits below it on flat sand. Every hero contrast on a phone is then the
   token's own against sand — 12.3:1 for the headline and lede, 4.9:1 for the
   crumbs and the dateline — because there is no photograph under the words at
   all. Verified structurally rather than by sampling, which is the
   stronger check: the top of the first text rectangle in the hero sits exactly
   one --space-6 below the bottom of the picture, and does so at 390 (241/273),
   at 768 and at 992 (377/409). The gap is the padding, so it cannot drift. */
@media (max-width: 62rem) {
  .art-hero.page-hero--film {
    display: block;
    min-height: 0;
    /* The strip grows with the viewport. A fixed 11rem is right on a 390px
       phone and a 4:1 letterbox on a 768px tablet, and a letterbox crop of a
       landscape photograph is a stripe, not a picture. */
    --art-strip: clamp(11rem, 30vw, 17rem);
    padding-block: calc(var(--art-strip) + var(--space-6)) var(--space-6);
  }
  .art-hero .page-hero__bg,
  .art-hero .page-hero__scrim { inset: 0 0 auto 0; height: var(--art-strip); }
  .art-hero .page-hero__bg img { height: var(--art-strip); }
  /* Just enough to seat the strip: a breath of the deep across the top so it
     does not float, and a hard landing into sand at the bottom so the join is a
     join and not a fade to grey. */
  .art-hero .page-hero__scrim {
    background: linear-gradient(to bottom,
      color-mix(in srgb, var(--color-deep) 14%, transparent) 0%,
      transparent 42%,
      color-mix(in srgb, var(--color-sand) 40%, transparent) 84%,
      var(--color-sand) 100%);
  }
}

/* The dateline. Mono, because it is dates and numbers, which is what mono is
   for in this system. */
.art-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: .7rem; letter-spacing: var(--tracking-mono-label); text-transform: uppercase;
  color: var(--color-dusk); margin: 0;
}
.art-meta__sep { color: var(--color-haze); }

/* --------------------------------------------------------- the draft note */
/* Deliberately not subtle and deliberately above the article rather than in a
   footer. Corrine is the expert and the byline; this text was drafted for her
   to correct, and a reader is entitled to know that before reading it and not
   after. */
.art-draft { border-left-color: var(--color-sun); max-width: 46rem; }
.art-draft .eyebrow { color: var(--color-sun-ink); }

/* ------------------------------------------------------------------ body */
.art-layout {
  display: grid;
  gap: clamp(2rem, 5vw, var(--space-8));
  grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
  align-items: start;
}
@media (max-width: 60rem) {
  /* minmax(0, 1fr), not 1fr. A bare 1fr track cannot shrink below its content's
     min-content width, so one wide table dragged the whole article column past
     the viewport (26-246px on phones, every body line running off the edge).
     With a zero minimum the column holds the viewport and .table-scroll does the
     scrolling it was built to do. Same pattern as .pg-cols in pages.css. */
  .art-layout { grid-template-columns: minmax(0, 1fr); }
}

.art-body { max-width: 38rem; font-size: 1.09rem; line-height: 1.72; }
.art-body > * + * { margin-top: var(--space-4); }
.art-body p { max-width: none; }
.art-body h2 {
  font-size: clamp(1.6rem, 3.2vw, var(--scale-step-3));
  line-height: 1.12;
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-haze);
}
.art-body h3 {
  font-size: var(--scale-step-2);
  color: var(--color-bolt);
  margin-top: var(--space-6);
}
.art-body ul, .art-body ol { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.art-body li::marker { color: var(--color-sun-ink); }
.art-body li > strong:first-child { color: var(--color-ink); }
.art-body blockquote {
  margin: 0; padding-left: var(--space-4); border-left: 2px solid var(--color-bolt);
  font-family: var(--font-display); font-size: 1.3rem; line-height: 1.42;
}
.art-body hr { border: none; border-top: 1px solid var(--color-haze); }
.art-body .table-scroll { margin-top: var(--space-5); }
.art-body table.data th:first-child, .art-body table.data td:first-child {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em;
  text-transform: uppercase; color: var(--color-dusk); white-space: nowrap;
}

/* --------------------------------------------------------------- the aside */
.art-aside { display: flex; flex-direction: column; gap: var(--space-4); position: sticky; top: calc(var(--masthead-h, 4.25rem) + 1.25rem); }
@media (max-width: 60rem) { .art-aside { position: static; } }

.art-offer { display: flex; flex-direction: column; gap: var(--space-3); }
.art-offer__item { display: flex; flex-direction: column; gap: .25rem; padding-block: var(--space-3); border-top: 1px solid var(--color-haze); }
.art-offer__item:first-of-type { border-top: none; padding-top: 0; }
.art-offer__name { font-family: var(--font-body); font-weight: var(--weight-body-bold); }
.art-offer__why { font-size: .88rem; color: var(--color-dusk); margin: 0; }

/* ----------------------------------------------------------------- the FAQ */
.art-faq { max-width: 38rem; display: flex; flex-direction: column; gap: var(--space-5); }
.art-faq__item { display: flex; flex-direction: column; gap: var(--space-2); }
.art-faq__q { font-family: var(--font-display); font-size: var(--scale-step-2); line-height: 1.24; color: var(--color-ink); }
.art-faq__a { color: var(--color-ink); }

/* -------------------------------------------------------------- the index */
.art-list { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); }

.art-card {
  display: flex; flex-direction: column;
  background: var(--color-shell);
  border: 1px solid var(--color-haze);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .15s ease;
}
.art-card:hover { border-color: var(--color-bolt); }
.art-card__shot { display: block; aspect-ratio: 16 / 9; background: var(--color-dune); }
.art-card__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); flex: 1; }
.art-card__title { font-size: var(--scale-step-2); line-height: 1.18; }
.art-card__title a { color: var(--color-ink); text-decoration: none; }
.art-card__title a:hover { color: var(--color-bolt); }
.art-card__what { font-size: .95rem; color: var(--color-dusk); margin: 0; flex: 1; }
.art-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

/* ------------------------------------------------------------- see also */
.art-next { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.art-next__item { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-3); border-top: 2px solid var(--color-haze); }
.art-next__item:hover { border-top-color: var(--color-bolt); }
/* --scale-step-1 is 19.2px, which is under the Didone floor — the hairlines go
   and the face reads as damaged. Same max() the .lede and .display-min use. */
.art-next__title { font-family: var(--font-display); font-size: max(1.25rem, var(--scale-step-1)); line-height: 1.24; }
.art-next__title a { color: var(--color-ink); text-decoration: none; }
.art-next__title a:hover { color: var(--color-bolt); }
.art-next__what { font-size: .88rem; color: var(--color-dusk); margin: 0; }
