@charset "UTF-8";
/* ===============================================================
   Nattevandring -- design.css
   Concept: Time is the grid. A clock-rail runs the left margin.
   The page darkens as the walk descends, then returns to cream.
   One image at the top. After that, only type.
   Scope: per-page (sibling CSS auto-enqueued by PAC)
   =============================================================== */

body {

  /* -- SYSTEM TOKENS -- */
  /* Palette slugs resolve via theme.json -> theme custom properties. */
  --nv-ink:       var(--wp--preset--color--ink);
  --nv-cream:     var(--wp--preset--color--cream);
  --nv-cream-alt: var(--wp--preset--color--cream-alt);
  --nv-muted:     var(--wp--preset--color--muted);
  --nv-sage:      var(--wp--preset--color--sage);

  /* Fonts -- system-safe, theme-agnostic */
  --nv-serif: Georgia, 'Iowan Old Style', 'Iowan Old Style BT', serif;
  --nv-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Scale (flat, not dramatic) */
  --nv-fs-h1:      clamp(2.6rem, 6vw, 4.6rem);
  --nv-fs-h2:      clamp(1.6rem, 3.2vw, 2.4rem);
  --nv-fs-h2-lg:   clamp(1.8rem, 3.6vw, 2.7rem);   /* the clearing */
  --nv-fs-pull:    clamp(1.8rem, 4vw, 3rem);
  --nv-fs-lede:    1.2rem;
  --nv-fs-body:    1.05rem;
  --nv-fs-margin:  0.85rem;
  --nv-fs-stamp:   0.68rem;

  /* Rhythm */
  --nv-measure:       38ch;
  --nv-measure-wide:  44ch;
  --nv-measure-narrow:36ch;
  --nv-margin-col:    18ch;

  --nv-space-xs: 0.5rem;
  --nv-space-s:  1rem;
  --nv-space-m:  2rem;
  --nv-space-l:  4rem;
  --nv-space-xl: clamp(4rem, 10vw, 8rem);
  --nv-space-xxl:clamp(6rem, 14vw, 12rem);

  --nv-track-wide:  0.18em;
  --nv-track-tight: -0.015em;

  --nv-rail-inset:  4.5rem;  /* distance from viewport edge to the clock-rail */
  --nv-rail-width:  1px;

  /* Page-level defaults */
  background: var(--nv-cream);
  color: var(--nv-muted);
  font-family: var(--nv-serif);
  font-size: var(--nv-fs-body);
  line-height: 1.75;
}

/* Reset theme cascade for descendants so our scoped color wins */
:is(p, h1, h2, h3, h4, h5, h6, li, blockquote, figcaption, a, cite) {
  color: inherit;
}

/* -- THE PAGE WRAPPER --
   A generic container selector so each section can be targeted by its id.
   Sections are referenced by the id-suffix classes the next agent will wire up. */

.nv-section {
  position: relative;
  padding-block: var(--nv-space-xl);
  padding-inline: 1.25rem;
}

/* -- THE CLOCK-RAIL -- */
/* A single 1px vertical line in the left gutter, drawn per-section.
   Timestamps sit on the rail via ::before on each section. */

@media (min-width: 48rem) {
  .nv-section {
    padding-left: var(--nv-rail-inset);
  }

  .nv-section.has-rail::after {
    content: "";
    position: absolute;
    left: calc(var(--nv-rail-inset) - 1.25rem);
    top: 0;
    bottom: 0;
    width: var(--nv-rail-width);
    background: currentColor;
    opacity: 0.22;
    pointer-events: none;
  }

  .nv-section.has-rail::before {
    content: var(--nv-stamp, "");
    position: absolute;
    left: calc(var(--nv-rail-inset) - 1.25rem - 2.75rem);
    top: var(--nv-space-xl);
    width: 3.5rem;
    font-family: var(--nv-mono);
    font-size: var(--nv-fs-stamp);
    letter-spacing: var(--nv-track-wide);
    text-transform: uppercase;
    opacity: 0.6;
    white-space: nowrap;
  }
}

/* On mobile the rail collapses; timestamps become a label above the H2. */
@media (max-width: 47.999rem) {
  .nv-section.has-rail::before {
    content: var(--nv-stamp, "");
    display: block;
    font-family: var(--nv-mono);
    font-size: var(--nv-fs-stamp);
    letter-spacing: var(--nv-track-wide);
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 0.75rem;
  }
}

/* -- BODY / HEADING DEFAULTS (within a section) -- */

.nv-section h1,
.nv-section h2 {
  font-family: var(--nv-serif);
  font-weight: 400;
  color: var(--nv-ink);
  letter-spacing: var(--nv-track-tight);
  text-wrap: balance;
}

.nv-section h1 {
  font-size: var(--nv-fs-h1);
  line-height: 0.98;
  margin: 0 0 1.25rem 0;
}

.nv-section h2 {
  font-size: var(--nv-fs-h2);
  line-height: 1.05;
  margin: 0 0 1.75rem 0;
}

.nv-section p {
  font-family: var(--nv-serif);
  font-size: var(--nv-fs-body);
  line-height: 1.75;
  max-width: var(--nv-measure);
  margin: 0 0 1.5rem 0;
  color: var(--nv-muted);
  text-wrap: pretty;
  hyphens: auto;
}

.nv-section p:last-child {
  margin-bottom: 0;
}

/* Body role variants */

.nv-section p.lede {
  font-size: var(--nv-fs-lede);
  line-height: 1.65;
  max-width: var(--nv-measure-narrow);
  color: var(--nv-ink);
}

.nv-section p.marginalia {
  font-size: var(--nv-fs-margin);
  font-style: italic;
  line-height: 1.6;
  max-width: 32ch;
  color: var(--nv-muted);
  opacity: 0.85;
}

.nv-section p.marginalia::before {
  content: "NB -- ";
  font-family: var(--nv-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: var(--nv-track-wide);
  text-transform: uppercase;
  opacity: 0.7;
  margin-right: 0.25em;
}

.nv-section p.kicker {
  font-family: var(--nv-mono);
  font-size: 0.75rem;
  letter-spacing: var(--nv-track-wide);
  text-transform: uppercase;
  color: var(--nv-sage);
  margin-top: var(--nv-space-m);
}

/* -- DARK SECTION INVERSION -- */

.nv-section.is-dark {
  background: var(--nv-ink);
  color: var(--nv-cream);
}

.nv-section.is-dark h1,
.nv-section.is-dark h2 {
  color: var(--nv-cream);
}

.nv-section.is-dark p {
  color: var(--nv-cream);
  opacity: 0.78;
}

.nv-section.is-dark p.lede {
  opacity: 0.7;
}

/* === SECTION: #opener =========================================== */

.nv-opener {
  --nv-stamp: "20:45";
  min-height: 100svh;
  background: var(--nv-ink);
  color: var(--nv-cream);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block: var(--nv-space-l) var(--nv-space-xl);
  position: relative;
  overflow: hidden;
}

/* Placeholder dusk wash when no image is present; also serves as overlay when one is. */
.nv-opener::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      color-mix(in srgb, var(--nv-ink) 55%, transparent) 0%,
      color-mix(in srgb, var(--nv-ink) 85%, transparent) 70%,
      var(--nv-ink) 100%);
  pointer-events: none;
  z-index: 1;
}

.nv-opener > * {
  position: relative;
  z-index: 2;
}

/* If an image is placed inside the opener, it bleeds under everything */
.nv-opener img,
.nv-opener figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  z-index: 0;
}

/* Top-left timestamp on opener (the first mark on the clock) */
.nv-opener::after {
  content: "20:45";
  position: absolute;
  top: var(--nv-space-l);
  left: var(--nv-rail-inset);
  font-family: var(--nv-mono);
  font-size: var(--nv-fs-stamp);
  letter-spacing: var(--nv-track-wide);
  text-transform: uppercase;
  color: var(--nv-cream);
  opacity: 0.6;
  z-index: 2;
}

@media (max-width: 47.999rem) {
  .nv-opener::after {
    left: 1.25rem;
    top: 2rem;
  }
}

.nv-opener h1 {
  color: var(--nv-cream);
  font-size: var(--nv-fs-h1);
  line-height: 0.95;
  letter-spacing: var(--nv-track-tight);
  max-width: 14ch;
  margin: 0 0 0.75rem 0;
  padding-left: var(--nv-rail-inset);
}

.nv-opener h2 {
  color: var(--nv-cream);
  opacity: 0.85;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.35;
  max-width: 34ch;
  margin: 0 0 2rem 0;
  padding-left: var(--nv-rail-inset);
}

.nv-opener p.lede,
.nv-opener p {
  color: var(--nv-cream);
  opacity: 0.72;
  max-width: 40ch;
  padding-left: var(--nv-rail-inset);
}

@media (max-width: 47.999rem) {
  .nv-opener h1,
  .nv-opener h2,
  .nv-opener p {
    padding-left: 0;
  }
}

/* === SECTION: #first-steps ===================================== */

.nv-first-steps {
  --nv-stamp: "21:00";
  background: var(--nv-cream);
}

/* On desktop, split into a main column + right-gutter for marginalia */
@media (min-width: 48rem) {
  .nv-first-steps {
    display: grid;
    grid-template-columns: minmax(0, var(--nv-measure-wide)) var(--nv-margin-col);
    column-gap: 3rem;
    align-items: start;
  }

  .nv-first-steps > h2,
  .nv-first-steps > p:not(.marginalia) {
    grid-column: 1;
  }

  .nv-first-steps > p.marginalia {
    grid-column: 2;
    margin-top: 4.5rem;    /* align with the top of the body */
    padding-left: 1rem;
    border-left: 1px solid var(--nv-muted);
    opacity: 0.85;
    max-width: var(--nv-margin-col);
  }
}

/* === SECTION: #the-listening (dark) ============================ */

.nv-listening {
  --nv-stamp: "21:05";
  background: var(--nv-ink);
  color: var(--nv-cream);
}

.nv-listening h2 {
  color: var(--nv-cream);
}

.nv-listening p {
  color: var(--nv-cream);
  opacity: 0.78;
}

.nv-listening ul,
.nv-listening ol {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0 0;
  max-width: var(--nv-measure-wide);
}

.nv-listening li {
  font-family: var(--nv-serif);
  font-size: var(--nv-fs-body);
  line-height: 1.65;
  color: var(--nv-cream);
  opacity: 0.78;
  padding: 0 0 1.25rem 1.5rem;
  position: relative;
}

.nv-listening li::before {
  content: "--";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--nv-mono);
  opacity: 0.5;
}

.nv-listening li:last-child {
  padding-bottom: 0;
}

/* === SECTION: #specs (ledger strip) ============================ */

.nv-specs {
  --nv-stamp: "21:20";
  background: var(--nv-cream-alt);
}

.nv-specs h2 {
  margin-bottom: 2.5rem;
}

.nv-specs .nv-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--nv-muted);   /* becomes the hairlines via gap */
  border-top: 1px solid var(--nv-muted);
  border-bottom: 1px solid var(--nv-muted);
  max-width: min(100%, 56rem);
}

@media (min-width: 48rem) {
  .nv-specs .nv-stat-row {
    grid-template-columns: repeat(5, 1fr);
  }
}

.nv-specs .nv-stat {
  background: var(--nv-cream-alt);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nv-specs .nv-stat__label {
  font-family: var(--nv-mono);
  font-size: var(--nv-fs-stamp);
  letter-spacing: var(--nv-track-wide);
  text-transform: uppercase;
  color: var(--nv-muted);
  opacity: 0.75;
}

.nv-specs .nv-stat__value {
  font-family: var(--nv-serif);
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--nv-ink);
}

/* === SECTION: #the-clearing (dark, the midpoint) =============== */

.nv-clearing {
  --nv-stamp: "21:40";
  background: var(--nv-ink);
  color: var(--nv-cream);
  padding-block: var(--nv-space-xxl);   /* this section breathes */
}

.nv-clearing h2 {
  color: var(--nv-cream);
  font-size: var(--nv-fs-h2-lg);
}

.nv-clearing p {
  color: var(--nv-cream);
  opacity: 0.8;
  max-width: var(--nv-measure-wide);
}

/* Callout inside the clearing */

.nv-clearing .nv-callout {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--nv-cream) 30%, transparent);
  max-width: var(--nv-measure);
}

.nv-clearing .nv-callout__title {
  font-family: var(--nv-mono);
  font-size: 0.72rem;
  letter-spacing: var(--nv-track-wide);
  text-transform: uppercase;
  color: var(--nv-cream);
  opacity: 0.7;
  margin: 0 0 0.75rem 0;
}

.nv-clearing .nv-callout p {
  font-family: var(--nv-serif);
  font-size: var(--nv-fs-body);
  line-height: 1.75;
  color: var(--nv-cream);
  opacity: 0.85;
  margin: 0;
}

/* === SECTION: #the-quote (dark, time stops, scale explodes) ==== */

.nv-quote {
  background: var(--nv-ink);
  color: var(--nv-cream);
  min-height: 70svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--nv-space-xxl);
}

/* No has-rail class here -- the clock-line is intentionally absent. */

.nv-quote blockquote,
.nv-quote .nv-pull {
  font-family: var(--nv-serif);
  font-style: italic;
  font-size: var(--nv-fs-pull);
  line-height: 1.25;
  color: var(--nv-cream);
  opacity: 0.95;
  max-width: 22ch;
  margin: 0 auto;
  padding: 0;
  border: none;
  text-wrap: balance;
}

.nv-quote blockquote p {
  font: inherit;
  color: inherit;
  opacity: 1;
  max-width: none;
  margin: 0;
}

/* === SECTION: #walking-home ==================================== */

.nv-walking-home {
  --nv-stamp: "21:55";
  background: var(--nv-cream);
}

/* Mirror of first-steps layout, but no right gutter */

.nv-walking-home h2,
.nv-walking-home p {
  max-width: var(--nv-measure-wide);
}

/* === SECTION: #close =========================================== */

.nv-close {
  --nv-stamp: "22:00";
  background: var(--nv-cream);
  padding-bottom: var(--nv-space-xxl);
}

.nv-close h2 {
  max-width: 20ch;
}

.nv-close p {
  max-width: var(--nv-measure);
}

.nv-close p.kicker {
  margin-top: 3rem;
  color: var(--nv-sage);
}

/* === LINKS ===================================================== */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: currentColor;
}

a:hover {
  text-decoration-color: var(--nv-sage);
}

/* === SELECTION (respects the quiet) ============================ */

::selection {
  background: var(--nv-ink);
  color: var(--nv-cream);
}
.is-dark ::selection,
.nv-opener ::selection,
.nv-listening ::selection,
.nv-clearing ::selection,
.nv-quote ::selection {
  background: var(--nv-cream);
  color: var(--nv-ink);
}

/* === PRINT (the kind of reader who saves night-walk essays) ==== */

@media print {
  .nv-section.is-dark,
  .nv-opener,
  .nv-listening,
  .nv-clearing,
  .nv-quote {
    background: #fff !important;
    color: #000 !important;
  }
  .nv-section::after,
  .nv-opener::before {
    display: none !important;
  }
}
