/* Winter Shades: Steve's poem as an old scroll, strung with Christmas lights, holly in the corner.
   Self-contained: every rule is scoped under .shades / .cause-top, so it can't touch the rest of the site.
   Needs the font: https://fonts.googleapis.com/css2?family=Pirata+One&display=swap
   Lights + ragged paper edges are drawn by winter-shades.js. Without JS the scroll still reads fine.
   Colours are lifted for a warm-black page (--bg #0F0C0B). Every verse colour passes WCAG AA on the paper. */

.shades {
  --paper:      #231A13;
  --paper-edge: #150F0B;
  --roll-hi:    #6E5641;
  --roll-lo:    #1A130D;
  --wire:       #1E2B1F;
  --ink-rule:   rgba(232, 162, 74, 0.28);
  --byline:     #BBA582;

  --c-green: #86C496;   /* holly / evergreen  */
  --c-blue:  #93C2E6;   /* ice, cold glass    */
  --c-red:   #F78272;   /* Santa red, lifted to pass on the aged paper */
  --c-white: #F7F2EA;   /* snow               */
  --c-gold:  #E8B74F;   /* kin to the site amber */

  display: flex;
  justify-content: center;
  padding: 40px 34px;   /* room for the lights, the caps and the holly */
}

.shades-scroll {
  position: relative;
  width: 100%;
  max-width: 34rem;
  container-type: inline-size;   /* text sizes off the scroll's own width */
}

/* ── placement on /give: beside "Where it goes", stacked below it on narrow screens ── */
.cause-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);   /* half the page each */
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
@media (max-width: 1000px) {
  .cause-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .shades { padding: 30px 25px; }
}

/* ── the rolls: a parchment roll across the top with ornate brass end caps and a crest;
      at the bottom only the brass caps show, the paper hangs torn between them ── */
.shades-rod {
  position: relative;
  z-index: 2;
  height: 34px;
}
.shades-rod--top {
  margin: 0 4px;
  border-radius: 8px / 17px;
  background:
    radial-gradient(60px 34px at 0% 50%, rgba(10, 6, 3, 0.75), transparent 70%),
    radial-gradient(60px 34px at 100% 50%, rgba(10, 6, 3, 0.75), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='40' preserveAspectRatio='none'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03 .2' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .05 0 0 0 0 .02 0 0 0 1.4 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23r)'/%3E%3C/svg%3E") center / 100% 100%,
    linear-gradient(180deg, #8E7655 0%, #6E5A40 26%, #4F3F2C 60%, #241A10 100%);
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 230, 190, 0.25),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4);
}
.shades-rod--bottom { height: 26px; margin-top: -10px; }

.shades-cap {
  --cap-w: clamp(44px, 13.5cqi, 64px);
  position: absolute;
  z-index: 5;
  width: var(--cap-w);
  height: calc(var(--cap-w) * 112 / 48);
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6));
}
.shades-rod--top .shades-cap    { top: calc((34px - var(--cap-w) * 0.917) / 2); }
.shades-rod--top .cap-l         { left: calc(var(--cap-w) * -0.56); }
.shades-rod--top .cap-r         { right: calc(var(--cap-w) * -0.56); transform: scaleX(-1); }
.shades-rod--bottom .shades-cap { bottom: calc((26px - var(--cap-w) * 0.917) / 2); }
.shades-rod--bottom .cap-l      { left: calc(var(--cap-w) * -0.48); transform: scaleY(-1); }
.shades-rod--bottom .cap-r      { right: calc(var(--cap-w) * -0.48); transform: scale(-1, -1); }

.shades-crest {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: -13px;
  width: clamp(52px, 15cqi, 72px);
  height: auto;
  aspect-ratio: 64 / 56;
  transform: translateX(-50%);
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6));
}

/* ── the paper: old parchment by candlelight. Torn, burnt edges (shaped by winter-shades.js),
      tide-mark stains and grain. Kept dark enough that all five verse colours read on it ── */
.shades-scroll { filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.6)); }
.shades-sheet {
  position: relative;
  z-index: 1;
  margin: -8px 10px 0;
  padding: clamp(2.25rem, 10cqi, 3.25rem) clamp(1.25rem, 8cqi, 2.75rem) clamp(2.5rem, 11cqi, 3.5rem);
  text-align: center;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .32 0 0 0 0 .22 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.22'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' preserveAspectRatio='none'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .05 0 0 0 0 .03 0 0 0 0 .01 0 0 0 2.2 -.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E"),
    radial-gradient(70% 45% at 30% 25%, rgba(120, 92, 60, 0.11), transparent 70%),
    radial-gradient(60% 40% at 72% 70%, rgba(120, 92, 60, 0.09), transparent 70%),
    radial-gradient(120% 85% at 50% 45%, #2C2219 0%, var(--paper) 50%, #120B06 100%);
  background-size: 220px 220px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  box-shadow:
    inset 28px 0 30px -14px rgba(8, 4, 1, 0.85),
    inset -28px 0 30px -14px rgba(8, 4, 1, 0.85),
    inset 0 -30px 30px -14px rgba(8, 4, 1, 0.85),
    inset 0 22px 22px -12px rgba(0, 0, 0, 0.6),
    inset 0 0 90px rgba(70, 38, 10, 0.4);
}

/* the poem's name, top of the scroll */
.shades-title {
  margin: 0 0 1.6rem;
  font-family: 'Pirata One', 'Old English Text MT', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 9.5cqi, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0.05em;
  color: var(--c-gold);
  text-shadow: 0 0 22px rgba(232, 183, 79, 0.35), 0 1px 0 rgba(0, 0, 0, 0.5);
}
.shades-title::after {
  content: "";
  display: block;
  width: 38%;
  height: 5px;
  margin: 0.7rem auto 0;
  border-top: 1px solid rgba(232, 183, 79, 0.45);
  border-bottom: 1px solid rgba(232, 183, 79, 0.2);
}

.shades-verse {
  margin: 0;
  font-family: 'Pirata One', 'Old English Text MT', Georgia, serif;   /* blackletter with readable capitals */
  font-size: clamp(0.95rem, 4.5cqi, 1.45rem);
  line-height: 1.55;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.shades-verse p { margin: 0; }
.shades-verse p + p { margin-top: 0.15em; }

/* the named shade, underlined as in Steve's original, with a faint glow */
.shades-name {
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-shadow: 0 0 14px currentColor;
}

.v-green { color: var(--c-green); }
.v-blue  { color: var(--c-blue); }
.v-red   { color: var(--c-red); }
.v-white { color: var(--c-white); }
.v-gold  { color: var(--c-gold); }

/* the dashed rules between verses, from the original page */
.shades-rule {
  display: block;
  width: 70%;
  margin: 1.4rem auto;
  border: 0;
  border-top: 1px dashed var(--ink-rule);
}

.shades-byline {
  margin: 2rem 0 0;
  font-family: 'Pirata One', Georgia, serif;
  letter-spacing: 0.03em;
  font-size: 1.05rem;
  color: var(--byline);
}

/* ── Christmas lights: drawn by winter-shades.js, in the poem's five colours ── */
.shades-lights {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}
.shades-lights .wire   { fill: none; stroke: #2E5A2C; stroke-width: 1.7; stroke-linejoin: round; }
.shades-lights .wire-b { stroke: #1B381A; }
.shades-lights .glass  { opacity: 0.92; }
.shades-lights .filament { fill: none; stroke: #FFF4C8; stroke-width: 0.8; stroke-linejoin: round; opacity: 0.9; }
.shades-lights .ribs   { fill: none; stroke: #14280F; stroke-width: 0.9; opacity: 0.8; }
.shades-lights .b-green { color: var(--c-green); }
.shades-lights .b-blue  { color: var(--c-blue); }
.shades-lights .b-red   { color: var(--c-red); }
.shades-lights .b-white { color: var(--c-white); }
.shades-lights .b-gold  { color: var(--c-gold); }
.shades-lights .halo {
  opacity: 0.5;
  animation: shades-twinkle 4.5s ease-in-out infinite;
}
@keyframes shades-twinkle {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.75; }
}
@media (prefers-reduced-motion: reduce) {
  .shades-lights .halo { animation: none; }
}

/* ── holly, top-left corner ── */
.shades-holly {
  position: absolute;
  z-index: 4;
  top: -24px;
  left: 14px;
  width: clamp(96px, 30cqi, 136px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}
