/* ==========================================================================
   Monolith — Downey's Rebrand (concept case study)
   Full brand immersion: the page's own background morphs through Downey's
   palette as you scroll (driven from js/pages/downeys.js via [data-bg]),
   figures hang like posters, the campaign headline oozes. Relies on
   site.css for @font-face, resets, nav/footer, keyframes.
   ========================================================================== */

html { background: #0F0D0A; }
body {
  background: #0A5CFF; /* morphed at runtime; blue is the opening plate */
  color: #F4EFE4;
  transition: background-color 0.7s ease;
}

.dw-cursor { color: #FFB40A; animation: blink 1.2s steps(1) infinite; }

.dw-wrap { max-width: 1280px; margin: 0 auto; padding: 0 80px; box-sizing: border-box; }

/* ============ hero ============ */
.dw-hero { position: relative; padding: 96px 0 72px; overflow: hidden; cursor: pointer; }
.dw-hero .dw-wrap { position: relative; z-index: 1; }

/* ---- the knife stroke ----
   One palette-knife stroke of honey butter across the blue: an
   irregular smear (lopsided border-radius), butter body from inset
   shadows (lit crest above, toffee weight below), knife tracks as
   faint lines along the swipe. It swipes in by scaling from its own
   left edge; clicks butter more of them on (js/pages/downeys.js). */
.dw-strokes { position: absolute; inset: 0; pointer-events: none; }
.dw-stroke {
  position: absolute; left: -4%; width: 108%; top: 120px;
  height: clamp(140px, 24vw, 280px);
  background:
    repeating-linear-gradient(0deg, rgba(15,13,10,0.045) 0 2px, transparent 2px 30px),
    linear-gradient(180deg, #FFC63A 0%, #FFB40A 45%, #F0A200 100%);
  border-radius: 46% 8% 42% 10% / 58% 30% 62% 26%;
  box-shadow:
    0 12px 44px rgba(15, 13, 10, 0.22),
    inset 0 14px 22px rgba(255, 236, 170, 0.55),
    inset 0 -16px 26px rgba(190, 120, 0, 0.4);
  transform: rotate(var(--ang, -4deg)) scaleX(0);
  transform-origin: 0% 50%;
}
.dw-stroke.on { transform: rotate(var(--ang, -4deg)) scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
  .dw-stroke { transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.25, 1); }
  /* the first stroke drips, slowly, the way honey does */
  .dw-stroke-first::after {
    content: ""; position: absolute; left: 31%; bottom: -20px;
    width: 15px; height: 26px; border-radius: 45% 45% 60% 60% / 30% 30% 75% 75%;
    background: linear-gradient(180deg, #F0A200, #DE9200);
    transform-origin: 50% 0;
    animation: dwDrip 9.5s ease-in infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dw-stroke { transform: rotate(var(--ang, -4deg)) scaleX(1); }
  .dw-hero { cursor: auto; }
}
@keyframes dwDrip {
  0%, 58% { transform: scaleY(0.12); opacity: 0.95; }
  72%     { transform: scaleY(1); opacity: 0.95; }
  78%     { transform: scaleY(1.1) translateY(4px); opacity: 0.95; }
  94%     { transform: scaleY(1) translateY(150px); opacity: 0; }
  100%    { transform: scaleY(0.12) translateY(0); opacity: 0; }
}

.dw-hero-hint {
  margin: 26px 0 0; font-family: 'VCR OSD Mono', monospace; font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,239,228,0.55);
}
.dw-kick { font-family: 'VCR OSD Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,239,228,0.72); }
.dw-kick a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.dw-kick a:hover { color: #FFB40A; }

.dw-bars { display: flex; flex-direction: column; align-items: flex-start; margin: 36px 0 0; gap: 0; }
.dw-bar {
  display: inline-block; padding: 0.04em 0.35em 0.16em; font-weight: 700;
  font-size: clamp(52px, 9vw, 128px); line-height: 0.98; letter-spacing: -0.045em;
  text-transform: uppercase; color: #0F0D0A;
}
.dw-bar-cream { background: #F4EFE4; transform: rotate(-1.1deg); box-shadow: 6px 6px 0 rgba(15,13,10,0.82); }
.dw-bar-honey { background: #FFB40A; transform: rotate(0.8deg); margin: 8px 0 0 clamp(24px, 6vw, 120px); box-shadow: 6px 6px 0 rgba(15,13,10,0.82); }

.dw-dek { max-width: 560px; margin: 48px 0 0; font-size: 20px; line-height: 1.45; color: rgba(244,239,228,0.88); }

.dw-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 64px; padding-top: 28px; border-top: 1px solid rgba(244,239,228,0.28); }
.dw-meta-item { display: flex; flex-direction: column; gap: 8px; }
.dw-meta-label { font-family: 'VCR OSD Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(244,239,228,0.6); }
.dw-meta-val { font-size: 15px; line-height: 1.4; color: #F4EFE4; }

/* ============ sections ============ */
.dw-section { padding: clamp(80px, 9vw, 140px) 0 clamp(48px, 5vw, 80px); }
.dw-grid { display: grid; grid-template-columns: minmax(220px, 0.8fr) 1.6fr; gap: 48px; align-items: start; }
.dw-num-col { display: flex; flex-direction: column; gap: 14px; }

.dw-num { font-family: 'VCR OSD Mono', monospace; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; color: #FFB40A; }
.dw-num-dark { color: #0F0D0A; }
.dw-num-blue { color: #0A5CFF; }

.dw-h { margin: 0; font-weight: 700; font-size: clamp(30px, 3.4vw, 52px); line-height: 1.05; letter-spacing: -0.03em; color: #F4EFE4; }
.dw-h-dark { color: #0F0D0A; }

.dw-copy { max-width: 640px; }
.dw-copy-solo { margin-top: 28px; }
.dw-lead { margin: 0 0 22px; font-size: clamp(21px, 2.2vw, 27px); line-height: 1.32; color: #F4EFE4; }
.dw-body { margin: 0; font-size: 17px; line-height: 1.55; color: rgba(244,239,228,0.82); }
.dw-copy-dark .dw-lead { color: #0F0D0A; }
.dw-copy-dark .dw-body { color: rgba(15,13,10,0.78); }

/* ============ squiggle (draw-in from downeys.js) ============ */
.dw-squig { display: block; width: min(300px, 70%); height: auto; margin-top: 30px; overflow: visible; }
.dw-squig path { will-change: stroke-dashoffset; }

/* ============ figures: poster plates ============ */
.dw-plate {
  max-width: 1120px; margin: clamp(48px, 6vw, 80px) auto 0; padding: 0 80px;
}
.dw-plate img {
  display: block; width: 100%; height: auto;
  border: 3px solid #0F0D0A; box-shadow: 12px 12px 0 rgba(15,13,10,0.85);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.dw-tilt-l img { transform: rotate(-1.3deg); }
.dw-tilt-r img { transform: rotate(1.1deg); }
.dw-plate:hover img { transform: rotate(0deg) translate(-3px, -3px); box-shadow: 18px 18px 0 rgba(15,13,10,0.85); }

/* the black quote slide blends into the black plate — no frame */
.dw-slide { max-width: 1120px; margin: clamp(48px, 6vw, 80px) auto 0; padding: 0 80px; }
.dw-slide img { display: block; width: 100%; height: auto; }

.dw-duo {
  max-width: 1120px; margin: 0 auto; padding: 0 80px;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px);
}
.dw-duo .dw-plate { margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; max-width: none; }

.dw-cap {
  display: flex; justify-content: space-between; gap: 24px; margin-top: 16px;
  font-family: 'VCR OSD Mono', monospace; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(244,239,228,0.62);
}
.dw-cap-dark { color: rgba(15,13,10,0.62); }

/* ============ marquee band ============ */
.dw-band { border-top: 3px solid #0F0D0A; border-bottom: 3px solid #0F0D0A; background: #FFB40A; overflow: hidden; }
.dw-band-track { display: flex; width: max-content; animation: mq 18s linear infinite; }
.dw-band-set { display: flex; align-items: baseline; }
.dw-band-set i {
  font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em;
  font-size: clamp(44px, 6vw, 84px); line-height: 1.25; padding: 0 0.35em; white-space: nowrap;
}
.dw-band-set .solid { color: #0F0D0A; }
.dw-band-set .ghost { color: transparent; -webkit-text-stroke: 2px #0F0D0A; }

/* ============ ooze headline ============ */
.dw-ooze {
  margin: 20px 0 0; font-weight: 700; letter-spacing: -0.04em; line-height: 1.02;
  font-size: clamp(44px, 7.5vw, 108px); color: #0F0D0A; overflow-wrap: anywhere;
}
.dw-ooze-hint { margin: 22px 0 0; font-family: 'VCR OSD Mono', monospace; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(15,13,10,0.55); }

/* ============ outro ============ */
.dw-outro { padding: clamp(100px, 12vw, 170px) 0 90px; }
.dw-outro-line { margin: 0; font-weight: 700; font-size: clamp(30px, 4.5vw, 64px); letter-spacing: -0.03em; color: #F4EFE4; }
.dw-squig-outro { margin-top: 24px; }
.dw-fine {
  max-width: 560px; margin: 64px 0 0; font-family: 'VCR OSD Mono', monospace;
  font-size: 11px; letter-spacing: 0.08em; line-height: 1.8; text-transform: uppercase;
  color: rgba(244,239,228,0.42);
}
.dw-next { display: inline-block; margin-top: 48px; font-family: 'VCR OSD Mono', monospace; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #FFB40A; text-decoration: none; }
.dw-next:hover { text-shadow: 0 0 12px rgba(255,180,10,0.6); }

/* footer sits on the black outro */
footer.mono-foot { border-top-color: rgba(244,239,228,0.16); }

/* ============ reveal (scoped copy of site pattern) ============ */
[data-reveal] { opacity: 0.06; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.33,1,0.68,1), transform 0.7s cubic-bezier(0.33,1,0.68,1); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============ mobile ============ */
@media (max-width: 900px) {
  .dw-wrap, .dw-plate, .dw-slide, .dw-duo { padding-left: 22px; padding-right: 22px; }
  .dw-grid { grid-template-columns: 1fr; gap: 24px; }
  .dw-meta { grid-template-columns: 1fr 1fr; gap: 22px; }
  .dw-duo { grid-template-columns: 1fr; }
  .dw-duo .dw-plate { margin-top: 40px; }
}
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .dw-hero { padding-top: 64px; }
  .dw-meta { grid-template-columns: 1fr; }
  .dw-bar { font-size: clamp(44px, 12vw, 64px); }
  .dw-bar-honey { margin-left: 10vw; }
  .dw-plate img { box-shadow: 8px 8px 0 rgba(15,13,10,0.85); }
}
