/* Log Drum (logdrum.space): a Sunday-afternoon lounge rendered in sound.
   Bounce arcs, sawn-log growth rings, taxi-rank sign painting. Loaded only on this title's pages.
   Every class and keyframe is prefixed logdrum-. */

#site-root[data-site='logdrum'] {
  --ld-clay: #efd6c0;
  --ld-clay-deep: #e6c3a5;
  --ld-wood: #9a6136;
  --ld-ring: rgba(154, 97, 54, .32);
  --ld-arc: var(--accent2);
  --ld-shadow: 0 12px 30px rgba(156, 80, 20, .12);
}
/* Shrikhand ships one weight: never let the browser fake a bold. */
#site-root[data-site='logdrum'] .font-head { font-synthesis: none; font-weight: 400; }
#site-root[data-site='logdrum'] ::selection { background: #ffd2a6; color: #24140b; }

/* ---------- surfaces ---------- */
.logdrum-clay { background: var(--ld-clay); }
.logdrum-soft { box-shadow: var(--ld-shadow); }
.logdrum-emerald {
  --bg: #00704a; --fg: #fff3e4; --muted: #cfe6d9; --surface: #0b7d55; --line: rgba(255, 243, 228, .22);
  --accent: #ff8a1f; --on-accent: #24140b; --ld-arc: #ffb066; --ld-ring: rgba(255, 243, 228, .16);
  background: #00704a; color: #fff3e4;
}
.logdrum-wood {
  --bg: #24140b; --fg: #fff3e4; --muted: #d9c2ad; --surface: #33200f; --line: rgba(255, 243, 228, .18);
  --on-accent: #24140b; --ld-arc: #ff8a1f; --ld-ring: rgba(255, 176, 102, .14);
  background: #24140b; color: #fff3e4;
}

/* Wood rings as a background pattern: slightly off-centre, like a real sawn log. */
.logdrum-grain {
  background-image:
    repeating-radial-gradient(ellipse 62% 48% at 72% 38%, transparent 0 22px, var(--ld-ring) 22px 23.5px, transparent 23.5px 34px, var(--ld-ring) 34px 35px);
}
.logdrum-grain-faint { position: relative; }
.logdrum-grain-faint::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: repeating-radial-gradient(ellipse 58% 46% at 78% 30%, transparent 0 26px, var(--ld-ring) 26px 27.5px, transparent 27.5px 41px, var(--ld-ring) 41px 42px);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 78% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 78% 30%, #000 30%, transparent 75%);
}

/* ---------- buttons: fully round tangerine pills that hop ---------- */
.logdrum-hop { transition: transform .38s cubic-bezier(.34, 1.8, .5, 1), box-shadow .3s; }
.logdrum-hop:hover, .logdrum-hop:focus-visible { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(156, 80, 20, .22); }
.group:hover .logdrum-hop-in { transform: translateY(-3px); }
.logdrum-hop-in { transition: transform .38s cubic-bezier(.34, 1.8, .5, 1); }

/* ---------- links: 2px emerald wavy underline that flattens on hover ---------- */
.logdrum-wavy {
  text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: var(--ld-arc);
  text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-skip-ink: none;
}
.logdrum-wavy:hover, .logdrum-wavy:focus-visible { text-decoration-style: solid; }
/* Headline hover on cards: the wavy line appears under the title. */
.logdrum-h { text-decoration: underline wavy transparent 2px; text-underline-offset: 5px; text-decoration-skip-ink: none; transition: text-decoration-color .2s; }
.group:hover .logdrum-h, .group:focus-visible .logdrum-h { text-decoration-color: var(--ld-arc); }

/* ---------- images: pebble crops with a slow settle on hover ---------- */
.logdrum-blob { overflow: hidden; isolation: isolate; transition: border-radius .9s cubic-bezier(.34, 1.4, .5, 1); }
.logdrum-blob img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.group:hover .logdrum-blob img { transform: scale(1.045); }

/* ---------- kickers: hand-painted taxi signs ---------- */
.logdrum-sign {
  border-radius: 9px 11px 10px 8px / 8px 10px 11px 9px;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.logdrum-chev { display: inline-flex; gap: 1px; }
.logdrum-chev i {
  display: block; width: .42em; height: .7em; background: currentColor;
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
}

/* ---------- bullets: three dots decaying, like a bounce ---------- */
.logdrum-bounce-dots {
  display: inline-block; width: 22px; height: 10px; flex-shrink: 0;
  background:
    radial-gradient(circle at 4px 5px, var(--accent) 3.4px, transparent 3.9px),
    radial-gradient(circle at 12px 6px, var(--accent) 2.4px, transparent 2.9px),
    radial-gradient(circle at 18.5px 7px, var(--accent) 1.5px, transparent 2px);
}

/* ---------- the menu button: three dots that hop in sequence ---------- */
.logdrum-dots { display: inline-flex; align-items: flex-end; gap: 4px; height: 16px; }
.logdrum-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: logdrum-hop3 2.4s cubic-bezier(.3, .7, .4, 1) infinite; }
.logdrum-dots i:nth-child(2) { animation-delay: .14s; background: var(--accent); }
.logdrum-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes logdrum-hop3 {
  0%, 30%, 100% { transform: translateY(0) scale(1, 1); }
  8% { transform: translateY(-8px) scale(.9, 1.1); }
  16% { transform: translateY(0) scale(1.3, .7); }
  21% { transform: translateY(-2.5px) scale(1, 1); }
}

/* ---------- live pulse: a drum dot bouncing on an arc at 112 BPM (0.536 s a beat) ---------- */
.logdrum-beat-x { animation: logdrum-beat-x 1.072s linear infinite; }
.logdrum-beat-y { animation: logdrum-beat-y .536s infinite; transform-origin: 50% 100%; }
@keyframes logdrum-beat-x { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(18px); } }
@keyframes logdrum-beat-y {
  0% { transform: translateY(0) scale(1.35, .62); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  10% { transform: translateY(-1px) scale(.92, 1.12); animation-timing-function: cubic-bezier(.2, .6, .4, 1); }
  50% { transform: translateY(-8px) scale(1, 1); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  92% { transform: translateY(-.5px) scale(.94, 1.08); }
  100% { transform: translateY(0) scale(1.35, .62); }
}
.logdrum-trail { stroke-dasharray: 1.6 2.4; animation: logdrum-trail 1.072s linear infinite; }
@keyframes logdrum-trail { to { stroke-dashoffset: -8; } }

/* Label frame: a pebble whose outline slowly morphs. */
.logdrum-morph { border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%; animation: logdrum-morph 7s ease-in-out infinite; }
@keyframes logdrum-morph {
  0%, 100% { border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%; }
  33% { border-radius: 56% 44% 46% 54% / 42% 58% 44% 56%; }
  66% { border-radius: 48% 52% 60% 40% / 58% 46% 54% 44%; }
}

/* ---------- article body ---------- */
.logdrum-prose { font-size: 1.0625rem; line-height: 1.75; color: var(--fg); }
@media (min-width: 768px) { .logdrum-prose { font-size: 1.125rem; } }
.logdrum-prose > * + * { margin-top: 1.2em; }
.logdrum-prose h2 {
  font-family: var(--font-head), Georgia, serif; font-weight: 400; font-synthesis: none;
  font-size: 1.65rem; line-height: 1.18; margin-top: 1.9em; scroll-margin-top: 6rem; color: var(--fg);
}
.logdrum-prose h2::before {
  content: ''; display: block; width: 74px; height: 22px; margin-bottom: .45em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 74 22'%3E%3Cpath d='M3 19Q18-6 33 19Q45 3 57 19Q64 11 71 19' fill='none' stroke='%2300704a' stroke-width='2' stroke-dasharray='3 3.4' stroke-linecap='round'/%3E%3Ccircle cx='3' cy='19' r='2.6' fill='%23ff8a1f'/%3E%3Ccircle cx='33' cy='19' r='2.2' fill='%23ff8a1f'/%3E%3Ccircle cx='57' cy='19' r='1.8' fill='%23ff8a1f'/%3E%3Ccircle cx='71' cy='19' r='1.4' fill='%23ff8a1f'/%3E%3C/svg%3E") no-repeat 0 0 / contain;
}
.logdrum-prose h3 { font-weight: 800; font-size: 1.2rem; margin-top: 1.6em; }
.logdrum-prose a { color: inherit; font-weight: 700; }
.logdrum-prose a { text-decoration: underline wavy var(--accent2) 2px; text-underline-offset: 4px; text-decoration-skip-ink: none; }
.logdrum-prose a:hover { text-decoration-style: solid; }
.logdrum-prose strong { font-weight: 800; }
.logdrum-prose ul { list-style: none; padding-left: 0; }
.logdrum-prose ul > li { position: relative; padding-left: 34px; }
.logdrum-prose ul > li::before {
  content: ''; position: absolute; left: 0; top: .62em; width: 22px; height: 10px;
  background:
    radial-gradient(circle at 4px 5px, var(--accent) 3.4px, transparent 3.9px),
    radial-gradient(circle at 12px 6px, var(--accent) 2.4px, transparent 2.9px),
    radial-gradient(circle at 18.5px 7px, var(--accent) 1.5px, transparent 2px);
}
.logdrum-prose ol { list-style: none; padding-left: 0; counter-reset: ld; }
.logdrum-prose ol > li { position: relative; padding-left: 46px; counter-increment: ld; min-height: 34px; }
.logdrum-prose ol > li::before {
  content: counter(ld); position: absolute; left: 0; top: .05em; width: 34px; height: 28px; display: grid; place-items: center;
  font-family: var(--font-head), Georgia, serif; font-size: .95rem; color: var(--fg); line-height: 1;
  border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ld-wood), inset 0 0 0 5px var(--bg), inset 0 0 0 6px var(--ld-ring);
  background: color-mix(in srgb, var(--accent) 22%, var(--bg));
}
.logdrum-prose li + li { margin-top: .55em; }

/* Pull quotes: emerald Shrikhand, two wooden drum dots for the quote marks. */
.logdrum-prose blockquote {
  position: relative; margin: 2.2em 0; padding: 1.1em 0 0 0;
  font-family: var(--font-head), Georgia, serif; font-synthesis: none; color: var(--accent2);
  font-size: 1.45rem; line-height: 1.32;
}
@media (min-width: 768px) { .logdrum-prose blockquote { font-size: 1.8rem; margin-left: -.2em; } }
.logdrum-prose blockquote::before {
  content: ''; display: block; width: 46px; height: 24px; margin-bottom: .35em;
  background:
    radial-gradient(circle at 11px 12px, #ff8a1f 0 4px, #9a6136 4px 5.2px, #ff8a1f 5.2px 8px, #6e3f1e 8px 10.5px, transparent 11px),
    radial-gradient(circle at 34px 12px, #ff8a1f 0 4px, #9a6136 4px 5.2px, #ff8a1f 5.2px 8px, #6e3f1e 8px 10.5px, transparent 11px);
}
.logdrum-prose blockquote p { margin: 0; }
.logdrum-prose blockquote p + p { margin-top: .6em; }

/* The huge tangerine drop cap on its wood-ring oval (an element, so it renders the same everywhere). */
.logdrum-cap {
  float: left; position: relative; display: grid; place-items: center;
  width: 4.9em; height: 5.35em; margin: .2em .5em .05em -.1em; shape-outside: ellipse(50% 50%); shape-margin: 6px;
}
@media (min-width: 768px) { .logdrum-cap { width: 5.9em; height: 6.5em; margin-right: .6em; } }
.logdrum-cap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.logdrum-cap b {
  position: relative; font-family: var(--font-head), Georgia, serif; font-weight: 400; font-synthesis: none;
  color: var(--accent); font-size: 4.3em; line-height: 1; transform: translate(-.03em, -.02em);
  text-shadow: 2px 3px 0 #24140b;
}
@media (min-width: 768px) { .logdrum-cap b { font-size: 5.3em; text-shadow: 3px 4px 0 #24140b; } }

/* Desktop hero: an organic blob floated right, the opening wraps its curve. */
@media (min-width: 1024px) {
  .logdrum-float { float: right; width: 48%; margin: .2em 0 1.2em 2em; shape-outside: margin-box; shape-margin: 12px; border-radius: 55% 0 0 30% / 46% 0 0 22%; }
}

/* ---------- misc ---------- */
.logdrum-fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
.logdrum-noscroll { scrollbar-width: none; }
.logdrum-noscroll::-webkit-scrollbar { display: none; }
.logdrum-step { transition: transform .45s cubic-bezier(.34, 1.6, .5, 1); }
.logdrum-step:hover { transform: translateY(-4px) rotate(-.4deg); }
.logdrum-tilt-l { transform: rotate(-1.2deg); }
.logdrum-tilt-r { transform: rotate(1deg); }
.logdrum-sheet { animation: logdrum-drop .42s cubic-bezier(.34, 1.4, .5, 1) both; }
@keyframes logdrum-drop { from { transform: translateY(-24px); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .logdrum-dots i, .logdrum-beat-x, .logdrum-beat-y, .logdrum-trail, .logdrum-morph, .logdrum-sheet { animation: none !important; }
  .logdrum-hop, .logdrum-hop-in, .logdrum-step, .logdrum-blob, .logdrum-blob img { transition: none !important; }
  .logdrum-hop:hover, .logdrum-step:hover, .group:hover .logdrum-hop-in { transform: none; }
}

/* ---------- no photo: a sawn log, the section name painted over its rings ---------- */
#site-root[data-site="logdrum"] .logdrum-nopic {
  background: repeating-radial-gradient(ellipse 120% 100% at 64% 38%, transparent 0 13px, rgba(154, 97, 54, .2) 13px 14.5px, transparent 14.5px 22px), #ffe1c2;
  color: #24140b;
}
#site-root[data-site="logdrum"] .logdrum-nopic .nopic-glyph { color: #9a6136; opacity: .22; }
#site-root[data-site="logdrum"] .logdrum-nopic .nopic-rule { background: var(--accent2); }
#site-root[data-site="logdrum"] .logdrum-nopic .nopic-mono { color: #9a6136; }
.logdrum-disc {
  background: radial-gradient(circle at 50% 50%, #ff8a1f 0 31%, transparent 31.5%),
    repeating-radial-gradient(circle at 50% 50%, #1b0f08 0 2px, #2c1a0e 2px 3.5px), #1b0f08;
}
