/* ============================================================
   palette.css — warm interior tuning
   28 Aug 2026

   Reference: the chocolate-velvet / bouclé / Arabescato interior.
   Sampled dominant hues from that image sit at H22–H33, low-to-mid
   saturation, with red-leaning darks. The site was tuned to H38–41,
   which is a yellow-tan — the same value, the wrong temperature.
   This sheet rotates the neutrals to the reference.

   No colour accent. The original accents (oxblood, acc, aubergine,
   olive) are left untouched and apply as they always did.

   Loaded last on every page. Delete the <link> to revert.
   ============================================================ */

:root{
  /* ---- warm neutrals, rotated to the reference (H22–28) ---- */
  --paper:    #F3EEE5;   /* was #F2EEE6 — a touch warmer            */
  --paper-2:  #EEE8DE;
  --cream:    #F3EEE5;
  --bone:     #DFD5C6;   /* was #DDD6C9 — redder, matches the rug   */
  --stone:    #AFA294;   /* sampled #ACA094                          */
  --silver:   #AFA294;
  --muted:    #7D6D5F;   /* was #8A8175 — warmer AND now AA on paper */
  --body:     #3E322A;   /* was #3A342C — red-brown, not olive       */

  /* ---- darks: the reference's browns are red-leaning, not olive ---- */
  --ink:      #16100E;   /* was #11110F */
  --espresso: #2C1C17;   /* was #241A17 — deeper, more saturated     */
  --wood:     #1B120F;   /* was #15140F — this was the olive one     */
  --void:     #120C0A;
  --char:     #2E231D;
  --navy:     #1D1512;

  /* ---- hairlines: warmer and softer, so rules stop cutting ---- */
  --line:     rgba(34,20,16,.13);
  --line-fine:rgba(34,20,16,.08);
  --line-lt:  rgba(243,238,229,.20);
  --hair:     #EAE3D8;
}

/* ------------------------------------------------------------
   0 · PRE-EXISTING CONTRAST BUG
   --acc (#7E2A31, brick) is used for the Shell Theory accent text,
   which sits on the dark band. On that ground it measures 1.98:1 —
   a WCAG failure, and it was failing before this sheet existed
   (1.99:1 against the old --wood). It reads as muddy rather than
   as an accent.

   The section already contains the right colour: the nautilus is
   stroked #C98B79, a warm rose that belongs to the reference
   palette. Using it for accent-on-dark takes the pair to 6.5:1 and
   makes the drawing and the type finally agree.
   ------------------------------------------------------------ */
.shell .code.acc, .shell .it.acc{ color:#C98B79; }

/* ------------------------------------------------------------
   1 · WARM THE PHOTOGRAPHY
   Sixteen hard grayscale(1) filters were doing more to make this
   feel cold than any colour choice. The reference is warm, low
   contrast, diffused. Desaturate partially and push it warm,
   then let hover bring the full image up.
   ------------------------------------------------------------ */
.city::before,
.room::before,
.cov.photo::before,
.portrait,
.split .portrait,
.leadmag .vis,
.dimg i,
.gal img,
.wimg,
.hero .art{
  filter: grayscale(.62) sepia(.26) saturate(1.08) contrast(1.02) brightness(1.02);
}
.city:hover::before,
.room:hover::before,
.room:focus-visible::before,
.cov.photo:hover::before{
  filter: grayscale(0) sepia(.06) saturate(1.06) contrast(1.02);
}

/* the dark scrims over photography were near-black; warm them so the
   image sits in the same room as the type */
.room::after{
  background:linear-gradient(to top,rgba(27,18,15,.80) 0%,rgba(27,18,15,.30) 42%,rgba(27,18,15,.06) 74%);
}
.city::after{
  background:linear-gradient(to top,rgba(27,18,15,.62) 0%,rgba(27,18,15,.12) 46%,transparent 72%);
}
.cov.photo::after{
  background:linear-gradient(to top,rgba(27,18,15,.74),rgba(27,18,15,.18) 60%,rgba(27,18,15,.05));
}

/* ------------------------------------------------------------
   2 · SOFTEN THE SURFACES
   The reference has no hard edges — the light does the separating.
   ------------------------------------------------------------ */
.portrait{ box-shadow:0 30px 70px rgba(34,20,16,.14); }
.city, .room, .cov, .dimg, .hero .art{ border-radius:2px; }
.head-code .line, .crail-line{ opacity:.6; }

/* ------------------------------------------------------------
   3 · LEGIBILITY ON THE DEEPER DARKS
   The dark bands got deeper, so the text on them gets a lift.
   ------------------------------------------------------------ */
.dark .code, .rooms .head-code .code, .method-band .head-code .code{ color:rgba(243,238,229,.62); }
.mrole{ color:rgba(243,238,229,.80); }
.dcard p{ color:rgba(243,238,229,.70); }
.rres em{ color:rgba(243,238,229,.78); }

@media (prefers-reduced-motion:reduce){
  .city::before,.room::before,.cov.photo::before{ transition:none; }
}
