/*
Theme Name: The Rippys
Theme URI: https://rippys.net
Author: Havenwood Publishing
Description: Site theme for The Rippys and Havenwood Publishing: songs, story, covers and one-stop licensing for "Lost and Found." Styled after the Lost and Found CD package.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 2.9.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-rippys
*/

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
:where(h1, h2, h3) { text-wrap: balance; font-weight: 400; }
a { text-underline-offset: 3px; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--wp--preset--color--salmon); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: 80px; }
.wp-element-button:hover, .wp-block-button__link:hover { filter: brightness(1.08); }
.label { font-family: var(--wp--preset--font-family--body); font-size: .75rem !important; letter-spacing: .18em; text-transform: uppercase; color: var(--wp--preset--color--dim); margin-bottom: .35rem !important; }
.meta { font-size: .82rem; color: var(--wp--preset--color--dim); }
.is-style-outline-ink .wp-block-button__link { background: transparent !important; color: var(--wp--preset--color--paper) !important; border: 1.5px solid currentColor; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--wp--preset--color--sleeve) 90%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--wp--preset--color--rule); }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.site-header .wp-block-site-title a { text-decoration: none; display: inline-flex; align-items: baseline; gap: .1em; }
.site-header .wp-block-site-title a::before, .site-header .wp-block-site-title a::after { content: "R"; font-family: var(--wp--preset--font-family--caps); color: var(--wp--preset--color--tan); font-size: 1.1em; display: inline-block; }
.site-header .wp-block-site-title a::before { transform: scaleX(-1); order: -2; }
.site-header .wp-block-site-title a::after { order: -1; margin-right: .35em; }
.site-header .wp-block-navigation a:hover { color: var(--wp--preset--color--coral); }
.site-header .nav-cta a { background: var(--wp--preset--color--coral); color: #1A0B05 !important; border-radius: 999px; padding: .4em 1em !important; }
.site-header .nav-cta a:hover { color: #1A0B05 !important; filter: brightness(1.08); }
.hero-actions { margin: 0 0 1.4rem !important; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--sleeve) !important; color: var(--wp--preset--color--paper) !important; }

/* ---------- hero ---------- */
.hero-cols { align-items: center !important; gap: 2.75rem; }
.hero .cover img { width: 100%; height: auto; display: block; }
.hero .album-title { font-family: var(--wp--preset--font-family--hand); color: var(--wp--preset--color--coral); font-size: clamp(3rem, 7.6vw, 5.6rem); line-height: 1; margin: 0; }
.hero .album-title s { text-decoration-thickness: .07em; }
.hero .by { font-family: var(--wp--preset--font-family--hand); font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin: .2em 0 .9em !important; }
.poem { list-style: none; padding: 0; margin: 0; color: var(--wp--preset--color--dim); line-height: 1.75; }
.poem li:nth-child(even) { padding-left: 2.2em; }
.poem em { font-style: normal; color: var(--wp--preset--color--paper); }
.poem-end { font-family: var(--wp--preset--font-family--hand); color: var(--wp--preset--color--coral); font-size: 1.4rem; padding-left: 6em; margin-top: .2rem !important; }

/* ---------- sections ---------- */
.section { border-top: 1px solid var(--wp--preset--color--rule); }
.section-head { margin-bottom: 1.5rem !important; }
.section-head h2 { margin-top: 0; }
.section-note { color: var(--wp--preset--color--dim); max-width: 52ch; }
.listen .wp-block-button { flex: 1 1 200px; }
.listen .wp-block-button__link { width: 100%; text-align: left; background: var(--wp--preset--color--sleeve-2) !important; color: var(--wp--preset--color--paper) !important; border: 1px solid var(--wp--preset--color--rule); border-radius: 10px; }
.listen .wp-block-button__link:hover { border-color: var(--wp--preset--color--coral); color: var(--wp--preset--color--coral) !important; }

/* ---------- songs: back cover ---------- */
.songs-cols { gap: 2.5rem; }
.backshot { position: sticky; top: 100px; }
.backshot img { width: 100%; height: auto; display: block; opacity: .55; filter: saturate(.85) brightness(1.25); mix-blend-mode: screen; }
.tracks { counter-reset: trk; }
.tracks > * { margin-block: 0 !important; }
.tracks .group-label { text-align: right; margin: 1.4rem 0 .3rem !important; }
.tracks .group-label:first-child { margin-top: 0 !important; }
.tracks-note { text-align: right; margin-top: 1rem !important; }
.track { counter-increment: trk; }
.track > summary { list-style: none; cursor: pointer; text-align: right; padding: .38rem 2.4rem .38rem 0; position: relative; font-size: clamp(1.35rem, 2.7vw, 1.85rem); line-height: 1.2; }
.track > summary::-webkit-details-marker { display: none; }
.track > summary::after { content: counter(trk, decimal-leading-zero); position: absolute; right: 0; bottom: .6rem; font-size: .85rem; color: var(--wp--preset--color--dim); }
.track > summary em { font-style: normal; font-size: .55em; color: var(--wp--preset--color--dim); letter-spacing: .08em; text-transform: uppercase; margin-left: .4em; }
.track > summary:hover, .track[open] > summary { color: var(--wp--preset--color--coral); }
.track > :not(summary) { text-align: right; border-right: 2px solid var(--wp--preset--color--coral); padding-right: 1.1rem; margin: 0 2.4rem 0 auto !important; max-width: 56ch; padding-block: .2rem; }
.track > :last-child { margin-bottom: .8rem !important; padding-bottom: .8rem; }
.track .lyric { font-family: var(--wp--preset--font-family--hand); color: var(--wp--preset--color--salmon); font-size: 1.25rem; line-height: 1.35; }
.lyr > summary { list-style: none; cursor: pointer; display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--coral); border: 1px solid var(--wp--preset--color--rule); border-radius: 999px; padding: 5px 14px; }
.lyr > summary::-webkit-details-marker { display: none; }
.lyr[open] > summary { background: var(--wp--preset--color--coral); color: #1A0B05; border-color: var(--wp--preset--color--coral); }
.lyr > :not(summary) { text-align: left; background: var(--wp--preset--color--sleeve-2); padding: .5rem 1.2rem; margin: 0 !important; }
.lyr > summary + * { margin-top: .8rem !important; padding-top: 1.1rem; border-radius: 8px 8px 0 0; }
.lyr > :last-child { padding-bottom: 1.1rem; border-radius: 0 0 8px 8px; }

/* ---------- red-ink band ---------- */
.splash { background-color: var(--wp--preset--color--sand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3Cfilter id='r' x='-10%25' y='-20%25' width='120%25' height='140%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.06' numOctaves='4' seed='7' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='60' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Cpath filter='url(%23r)' fill='%238C1E1A' d='M-40 90 L180 50 L430 70 L700 30 L960 60 L1240 20 L1240 350 L990 330 L720 380 L460 340 L200 385 L-40 345 Z'/%3E%3C/svg%3E"); background-size: 100% 100%; background-repeat: no-repeat; }
.splash-quote { font-weight: 700; color: #FFF8F0; font-size: clamp(1.6rem, 4.4vw, 2.9rem); line-height: 1.2; max-width: 24ch; margin: 0; }
.splash-cite { color: #F6DCCB; margin-top: .5rem !important; }

/* ---------- story ---------- */
.band-name { font-family: var(--wp--preset--font-family--caps) !important; color: var(--wp--preset--color--salmon); font-size: clamp(3rem, 9vw, 6rem) !important; line-height: .95; text-align: center; margin: 0; }
.band-name span { display: block; font-size: .34em; letter-spacing: .12em; }
.band-photo img { width: 100%; height: auto; display: block; filter: grayscale(1) contrast(1.05); }
.story .lead { font-family: var(--wp--preset--font-family--hand); color: var(--wp--preset--color--coral); font-size: 1.6rem; line-height: 1.3; }
.credits { list-style: none; padding: 1rem 0 0; margin-top: 1.4rem; border-top: 1px solid var(--wp--preset--color--tan); font-size: .92rem; display: grid; gap: .35rem; }
.credits li { display: grid; grid-template-columns: 11.5em minmax(0,1fr); gap: 1rem; }
.credits strong { font-weight: 400; color: var(--wp--preset--color--tan); }

/* ---------- licensing: khaki web banner ---------- */
.panel { background: linear-gradient(120deg, var(--wp--preset--color--khaki) 0%, var(--wp--preset--color--khaki-light) 100%) !important; }
.panel .label { color: #D8D3B4; }
.panel .section-note, .panel .offer p { color: #E2DDC0; }
.panel .lic-title { font-family: var(--wp--preset--font-family--caps); }
.panel a { color: var(--wp--preset--color--cream); }
.panel .offer .wp-block-column { border-top: 1px solid rgba(255,251,234,.35); padding-top: .8rem; }
.panel .offer h3 { margin-bottom: .25rem; }
.rq-form { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.rq-form .full { grid-column: 1 / -1; }
.rq-form label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 700; }
.rq-form input, .rq-form select, .rq-form textarea { font: 400 1rem var(--wp--preset--font-family--body); padding: .65rem .75rem; border-radius: 8px; width: 100%; box-sizing: border-box; border: 1px solid rgba(255,251,234,.35); background: rgba(10,10,10,.28); color: var(--wp--preset--color--cream); }
.rq-form select option { color: #111; }
.rq-form textarea { min-height: 96px; resize: vertical; }
.rq-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rq-form button { cursor: pointer; border: 0; background: var(--wp--preset--color--sleeve); color: var(--wp--preset--color--paper); font: 700 1rem var(--wp--preset--font-family--body); padding: .8rem 1.3rem; border-radius: 999px; }
.rq-notice { padding: .9rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 700; background: rgba(10,10,10,.3); }
.rq-notice.err { background: rgba(140,30,26,.6); }
.rq-form .rq-check { min-height: 65px; }

/* ---------- contact + footer ---------- */
.contact-lines { font-size: 1.1rem; }
.site-footer { border-top: 1px solid var(--wp--preset--color--rule); color: var(--wp--preset--color--dim); font-size: .88rem; }
.site-footer .ae { font-family: var(--wp--preset--font-family--caps); letter-spacing: .12em; color: var(--wp--preset--color--tan); }

@media (max-width: 781px) {
  .backshot { position: static; max-width: 420px; }
  .rq-form { grid-template-columns: 1fr; }
  .poem li:nth-child(even) { padding-left: 1em; }
  .poem-end { padding-left: 3em; }
  .credits li { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- v2.2: always-visible Licensing button + phone order ---------- */
.header-right { gap: 1rem !important; align-items: center; }
.header-cta .wp-block-button__link { padding: .45em 1.05em !important; font-size: .95rem; white-space: nowrap; }
@media (max-width: 781px) {
  .site-header .wp-block-site-title { font-size: 1.1rem !important; }
  .hero-cols { display: flex !important; flex-direction: column; }
  .hero-cols > .wp-block-column:first-child { order: 2; }
  .hero-cols > .wp-block-column:last-child { order: 1; }
  .hero .album-title { font-size: 3rem; }
}
