/* Vivace@SAS
   Idea: the page reads like a concert program on cream paper.
   The title sits on a five-line staff and a short melody plays in around it.
   That is the one bold move; everything else stays quiet and compact. */

:root {
    --paper: #F6F0E2;
    --paper-light: #FBF8F0;
    --blue: #A9CCE3;
    --blue-pale: #DCEAF4;
    --blue-ink: #47718F;   /* headings, staff lines, links */
    --text: #3F596C;

    --display: "Cormorant Garamond", Garamond, Palatino, "Palatino Linotype", serif;
    --body: "Source Serif 4", Palatino, "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        radial-gradient(rgba(71, 113, 143, 0.035) 0.6px, transparent 0.6px) 0 0 / 22px 22px,
        var(--paper);
    color: var(--text);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

:focus-visible {
    outline: 2px solid var(--blue-ink);
    outline-offset: 3px;
}

.page {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 16px;
    top: 16px;
    z-index: 20;
    padding: 8px 14px;
    background: var(--paper-light);
    color: var(--blue-ink);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

a {
    color: var(--blue-ink);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
a:hover { color: var(--text); text-decoration-thickness: 1.5px; }
.menu a:hover, .faq-list summary:hover { background: var(--blue-pale); }

/* ---------- Top bar: menu on the left, join button on the right ---------- */

.site-nav {
    position: sticky;
    top: 0;
    display: flex;
    z-index: 40;
    align-items: center;
    justify-content: space-between;

    background: var(--paper);


    padding: 14px 0 0;
}

.menu-wrap {
    position: relative;
    display: inline-block;
}

.menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 8px 4px;
    background: none;
    border: 0;
    color: var(--blue-ink);
    font: italic 500 1.45rem var(--display);
    cursor: pointer;
}

/* The menu icon is a five-line staff that morphs into an X when open */
.bars {
    position: relative;
    width: 26px;
    height: 15px;
}
.bars span {
    position: absolute;
    left: 0;
    display: block;
    width: 26px;
    height: 1.5px;
    background: currentColor;
    transition: opacity .25s ease, transform .3s cubic-bezier(.6,.05,.3,1.3);
}
.bars span:nth-child(1) { top: 0; }
.bars span:nth-child(2) { top: 3.4px; }
.bars span:nth-child(3) { top: 6.8px; }
.bars span:nth-child(4) { top: 10.2px; }
.bars span:nth-child(5) { top: 13.5px; }

/* Outer lines fade out; the middle three collapse to center and cross into an X,
   while two hidden lines fade in (rotated -45deg) to complete the other stroke */
.menu-btn.is-open .bars span:nth-child(1),
.menu-btn.is-open .bars span:nth-child(5) {
    opacity: 0;
    transform: translateY(6.8px);
}
.menu-btn.is-open .bars span:nth-child(2) {
    transform: translateY(3.4px) rotate(45deg);
}
.menu-btn.is-open .bars span:nth-child(3) {
    transform: rotate(45deg);
}
.menu-btn.is-open .bars span:nth-child(4) {
    transform: translateY(-3.4px) rotate(45deg);
}
.bars span:nth-child(6),
.bars span:nth-child(7) {
    top: 6.8px;
    opacity: 0;
}
.menu-btn.is-open .bars span:nth-child(6) {
    opacity: 1;
    transform: rotate(-45deg);
}
.menu-btn.is-open .bars span:nth-child(7) {
    opacity: 1;
    transform: translateY(-6.8px) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
    .bars span { transition: none; }
}

.menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 220px;
    margin: 6px 0 0;
    padding: 6px 0;
    list-style: none;
    background: var(--paper-light);
    border: 1px solid var(--blue-ink);
    box-shadow: 5px 5px 0 var(--blue);
}
.menu a {
    display: block;
    padding: 8px 22px;
    color: var(--blue-ink);
    font: 500 1.35rem var(--display);
    text-decoration: none;
}
.menu a:hover { background: var(--blue-pale); }
.menu a[aria-current="page"] {
    font-style: italic;
    font-weight: 600;
}

.cta {
    display: inline-block;
    padding: 7px 24px;
    background: var(--blue-ink);
    color: var(--paper-light);
    font: 600 1.35rem var(--display);
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--blue);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover {
    background: var(--blue-ink);
    color: #fff;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--blue);
}

/* ---------- Nav: small Instagram follow pill (blue & white) ---------- */

.nav-follow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1.5px solid var(--blue);
    border-radius: 999px;
    background: #fff;
    color: var(--blue-ink);
    font: 600 0.95rem var(--display);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, color 0.15s ease,
                transform 0.15s ease, box-shadow 0.15s ease;
}
.nav-follow .ig-icon {
    flex: none;
    color: var(--blue);
    transition: color 0.15s ease, transform 0.2s ease;
}
.nav-follow:hover,
.nav-follow:focus-visible {
    background: var(--blue-ink);
    color: #fff;
    box-shadow: 3px 3px 0 var(--blue-pale);
    transform: translateY(-1px);
}
.nav-follow:hover .ig-icon,
.nav-follow:focus-visible .ig-icon {
    color: #fff;
    transform: rotate(-6deg) scale(1.08);
}
.site-nav { padding-right: clamp(12px, 4vw, 40px); }
@media (max-width: 640px) {
    .nav-follow .follow-label { display: none; }
    .nav-follow { padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .nav-follow, .nav-follow .ig-icon { transition: none; }
    .nav-follow:hover, .nav-follow:focus-visible { transform: none; }
    .nav-follow:hover .ig-icon,
    .nav-follow:focus-visible .ig-icon { transform: none; }
}

/* ---------- Masthead: title on a staff ---------- */

.masthead {
    margin: 14px 0 22px;
    background: var(--paper);
    text-align: center;
}

/* Only the About page keeps its heading pinned */
.about .masthead {
    position: sticky;
    z-index: 30;
    top: var(--nav-h);
}

.title-staff {

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

h1 {
    margin: 0;
    padding: 0 28px;
    color: var(--blue-ink);
    font: 500 clamp(2.2rem, 4.6vw, 3.6rem) / 1.1 var(--display);
    letter-spacing: 0.01em;
    text-wrap: balance;
}

.tempo {
    margin: 6px 0 0;
    font: italic 500 1.25rem var(--display);
}

/* Five-line staff segment with a barline at its outer end */
.staff {
    position: relative;
    height: 33px;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--blue-ink) 0 1px,
        transparent 1px 8px
    );
    color: var(--blue-ink);
}
.staff::before,
.staff::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
}
.staff::before {
    left: 0;
    width: 1px;
    background: var(--blue-ink);
}
.staff::after {
    right: 0;
    width: 7px;
    background: linear-gradient(to right,
        var(--blue-ink) 0 1px,
        transparent 1px 4px,
        var(--blue-ink) 4px 7px);
}
.staff.left::after,
.staff.right::before { display: none; }

.staff svg {
    position: absolute;
    top: 0;
    width: 160px;
    height: 33px;
    overflow: visible;
}
.staff.left svg  { left: 16px; }
.staff.right svg { right: 20px; }

/* The melody plays in once, note by note */
.staff .n {
    opacity: 0;
    animation: note-in 0.4s ease forwards;
    animation-delay: calc(var(--i) * 0.14s + 0.3s);
}
@keyframes note-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}
/* Hovering the title makes the whole melody bounce — the bouncing thingy */
.masthead:hover .staff .n {
    animation: note-bounce 0.6s ease backwards;
    animation-delay: calc(var(--i) * 0.05s);
}
@media (prefers-reduced-motion: reduce) {
    .staff .n { opacity: 1; animation: none; }
    .masthead:hover .staff .n { animation: none; }
}

/* ---------- Photo strip: polaroid frames ---------- */

.pics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Each photo sits inside a white polaroid frame: thin border around the
   picture, deep margin at the bottom for the handwritten caption. */
.pics li {
    position: relative;
    display: block;
    padding: 8px 8px 0;
    background: #fffdf7;
    border: 1px solid rgba(71, 113, 143, 0.12);
    box-shadow: 0 6px 14px rgba(71, 113, 143, 0.16),
                0 1px 3px rgba(71, 113, 143, 0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* Gentle alternating tilt so the polaroids look casually scattered */
.pics li:nth-child(odd)  { transform: rotate(-1.4deg); }
.pics li:nth-child(even) { transform: rotate(1.1deg); }
.pics li:nth-child(3n)   { transform: rotate(-0.6deg); }

.pics li:hover {
    transform: translateY(-6px) rotate(0deg);
    box-shadow: 0 12px 24px rgba(71, 113, 143, 0.22),
                0 2px 6px rgba(71, 113, 143, 0.12);
    z-index: 1;
}

.pics img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;               /* classic square polaroid print */
    object-fit: cover;
    border: 1px solid rgba(71, 113, 143, 0.08);
    background: var(--paper-light);
}

/* Caption: handwritten-feel italic serif in the bottom white space.
   Set data-caption="fall concert" on any .pics <li>. */
.pics li::after {
    content: attr(data-caption);
    display: block;
    min-height: 34px;
    padding: 8px 6px 4px;
    font: italic 500 1.05rem/1.2 var(--display);
    letter-spacing: 0.01em;
    color: var(--blue-ink);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
    .pics li, .pics li:hover { transition: none; }
    .pics li:hover { transform: none; }
}

/* ---------- Info: hello + details, and coming up ---------- */

.bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: start;
    margin-top: 32px;
}

.section-title {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    color: var(--blue-ink);
    font: 500 clamp(1.8rem, 3vw, 2.25rem) / 1.1 var(--display);
}

.note p {
    max-width: 52ch;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.55;
}

/* Program-style listings: label ........ value */
.details,
.comingup ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 3px double var(--blue-ink);
    border-bottom: 3px double var(--blue-ink);
}
.details { margin-top: 14px; }

.details div,
.comingup li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 6px 0;
}

.details dt,
.date {
    display: flex;
    flex: 1;
    align-items: baseline;
    color: var(--blue-ink);
    white-space: nowrap;
}
.details dt {
    font: italic 500 1.35rem var(--display);
}
.date {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.details dt::after,
.date::after {
    content: "";
    flex: 1;
    margin: 0 0 0.3em 10px;
    border-bottom: 2px dotted var(--blue);
}
.details dd { margin: 0; text-align: right; }
.what { max-width: 62%; text-align: right; }

/* The next event stands out by tint and weight */
.comingup li.next {
    margin: 0 -10px;
    padding: 6px 10px;
    background: var(--blue-pale);
    font-weight: 600;
}

/* ---------- About page ---------- */

.prose {
    max-width: 62ch;
    margin: 32px auto 0;
}
.prose section + section { margin-top: 32px; }
.prose p { margin: 0; }

/* ---------- Who we are: scrolling display ---------- */

/* Default layout (no JavaScript, reduced motion, or a very short screen):
   the frames are simply stacked down the page. */
.frames { margin-top: 40px; }
.frame {
    max-width: 900px;
    margin-inline: auto;
}
.frame + .frame { margin-top: 72px; }

.frame-intro { text-align: center; }
.frame-intro .lead {
    max-width: 38ch;
    margin: 0 auto;
    font-size: 1.4rem;
    line-height: 1.5;
}
.scroll-hint {
    margin: 28px 0 0;
    font: italic 500 1.25rem var(--display);
}

.officer {
    display: grid;
    grid-template-columns: 320px minmax(0, 46ch);
    gap: 56px;
    justify-content: center;   /* keeps text the same distance from centre as centered frames */
    align-items: center;
    width: 100%;
}
.officer.flip { grid-template-columns: minmax(0, 46ch) 320px; }
.officer.flip .photo { order: 2; }

.photo { margin: 0; }
.photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    padding: 8px;
    background: var(--paper-light);
    border: 1px solid var(--blue);
    box-shadow: 4px 4px 0 var(--blue-pale);
}
.officer h2 {
    margin: 0;
    color: var(--blue-ink);
    font: 500 clamp(1.9rem, 3.4vw, 2.5rem) / 1.1 var(--display);
}
.officer .role {
    margin: 2px 0 12px;
    color: var(--blue-ink);
    font: italic 500 1.4rem var(--display);
}
.officer .bio {
    max-width: 46ch;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Scrolling mode: one full-screen stage stays pinned while the page scrolls
   past it, and the frames swap in place. script.js adds the .scrolly class. */
.scene.scrolly {
    height: calc(100vh + var(--n) * 240vh);
    height: calc(100svh + var(--n) * 240svh);
}
.scrolly .stage {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100svh;
}
.scrolly .masthead { margin-bottom: 0; }
.scrolly .frames {
    position: relative;
    flex: 1;
    margin-top: 0;
}
.scrolly .frame {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}
.scrolly .frame.active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* (old ticket list replaced by the vinyl record grid below) */

/* Frame markers: one dot per frame, also usable as buttons */
.stage-nav {
    position: absolute;
    top: 50%;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform: translateY(-50%);
}
.stage-nav[hidden] { display: none; }
.stage-nav button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}
.stage-nav button::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--blue-ink);
    border-radius: 50%;
    transition: background 0.2s ease;
}
.stage-nav button:hover::after { background: var(--blue); }
.stage-nav button[aria-current="true"]::after { background: var(--blue-ink); }

@media (prefers-reduced-motion: reduce) {
    .scrolly .frame { transition: none; }
}

/* ---------- Forms page ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    align-items: stretch;
    margin-top: 36px;
}

/* Each form is a card, like a page in a concert program */
.card {
    display: flex;
    flex-direction: column;
    background: var(--paper-light);
    border: 1px solid var(--blue-ink);
    box-shadow: 6px 6px 0 var(--blue);
}
.card-staff {
    position: relative;
    height: 25px;
    margin: 20px 28px 0;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--blue-ink) 0 1px,
        transparent 1px 6px
    );
}
.card-staff::before {
    position: absolute;
    top: -6px;
    left: 4px;
    color: var(--blue-ink);
    font: 400 34px/1 "Noto Music", "Bravura", "Segoe UI Symbol", serif;
}
.card:nth-child(1) .card-staff::before { content: "\1D11E"; }
.card:nth-child(2) .card-staff::before { content: "\1D122"; }
.card:nth-child(1) .card-staff::before {
    top: -13px;
    font-size: 46px;
}
.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 28px 28px;
}
.card-body p { margin: 0 0 12px; }
.card-no {
    margin-bottom: 0 !important;
    font: italic 500 1.25rem var(--display);
    padding-bottom: 23px
}
.card .section-title { margin-bottom: 14px; }

/* Tinted status line, same idea as the "next event" row on the home page */
.card .status {
    margin: 0 -28px 18px !important;
    padding: 8px 28px;
    background: var(--blue-pale);
    color: var(--blue-ink);
    font-weight: 600;
    text-align:center;
}
.card .hint { font-style: italic; }

/* Officer email buttons */
.contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}
.contacts .or {
    font: italic 500 1.25rem var(--display);
}
.contacts a {
    display: block;
    padding: 9px 16px;

    line-height: 1.35;
    text-decoration: none;
}
.contacts a:hover { background: var(--blue-pale); }
.contacts .who { display: block; font-weight: 600; }
.contacts .role {
    display: block;
    font: italic 500 1.15rem var(--display);
}
.contacts .addr {
    display: block;
    font-size: 0.95rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* The main button sits at the bottom of every card so the two line up */
.card-action { margin-top: auto;
    padding: 20px;
    padding-bottom: 30px;
}
.card-action p {
    padding-bottom: 20px;
}
.card-action .cta {
    display: block;
    padding: 12px 24px;
    font-size: 1.5rem;
    text-align: center;
}
.card .meta {
    margin: 12px 0 0 !important;
    font-size: 0.95rem;
    font-style: italic;
    text-align: center;
}

/* Questions */
.faq { margin-top: 64px; }
.faq-list {
    max-width: 760px;
    border-top: 3px double var(--blue-ink);
    border-bottom: 3px double var(--blue-ink);
}
.faq-list details + details { border-top: 1px dotted var(--blue-ink); }
.faq-list summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 8px;
    color: var(--blue-ink);
    font: 500 1.4rem var(--display);
    cursor: pointer;
    list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
    content: "+";
    font-size: 1.6rem;
    line-height: 1;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list summary:hover { background: var(--blue-pale); }
.faq-list details p {
    max-width: 62ch;
    margin: 0;
    padding: 0 8px 14px;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 56px;
    padding-top: 14px;
    border-top: 3px double var(--blue-ink);
}
.footer-cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 56px;
}
.footer-cols div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.footer-cols h3 {
    margin: 0;
    color: var(--blue-ink);
    font: italic 500 1.35rem var(--display);
}
.footer-cols p { margin: 0; }

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
    /* Title on top, staff with the melody underneath */
    .title-staff { grid-template-columns: 1fr 1fr; }
    h1 {
        grid-row: 1;
        grid-column: 1 / -1;
        padding: 0 0 14px;
    }
    .staff.left  { grid-row: 2; grid-column: 1; }
    .staff.right { grid-row: 2; grid-column: 2; }
    .tempo { margin-top: 24px; }
}

@media (max-width: 820px) {
    .cards { grid-template-columns: 1fr; gap: 32px; }
    .frame + .frame { margin-top: 56px; }
    .officer,
    .officer.flip {
        grid-template-columns: 1fr;
        justify-content: initial;
        gap: 20px;
    }
    .officer.flip .photo { order: 0; }
    .photo { max-width: 260px; }
    .scrolly .photo { max-width: 220px; }
    .scrolly .frame { bottom: 40px; } /* leave room for the dots */

    /* Frame markers move to the bottom edge */
    .stage-nav {
        top: auto;
        right: auto;
        bottom: 10px;
        left: 50%;
        flex-direction: row;
        transform: translateX(-50%);
    }

    .bottom {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .page { padding: 0 18px 32px; }

    .card-staff { margin: 16px 20px 0; }
    .card-body { padding: 16px 20px 24px; }
    .card .status { margin: 0 -20px 18px !important; padding: 8px 20px; }
    .faq { margin-top: 48px; }
    .contacts { flex-direction: column; align-items: stretch; gap: 6px; }
    .contacts .or { text-align: center; }

    .staff.left svg  { left: 6px; }
    .staff.right svg { right: 10px; }

    .cta { padding: 6px 18px; font-size: 1.2rem; }

    .pics { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .pics li:nth-child(n+4) { display: none; }
    .pics img { aspect-ratio: 4 / 3; }

    .what { max-width: 55%; }
}
:root{
    --nav-h: 72px;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--blue);
}


/* ---------- Home page: a bit more breathing room ---------- */

.home .page { padding-bottom: 64px; }

.home .masthead { margin: 20px 0 40px; }

.home .pics { gap: 22px; }

.home .bottom {
    gap: 72px;
    margin-top: 60px;
}
.home .section-title {
    margin-bottom: 14px;
    font-size: clamp(2rem, 3.4vw, 2.6rem);
}
.home .note p {
    font-size: 1.15rem;
    line-height: 1.65;
}
.home .details { margin-top: 26px; }
.home .details div,
.home .comingup li { padding: 11px 0; }
.home .comingup li.next {
    margin: 0 -12px;
    padding: 11px 12px;
}
.home .site-footer {
    margin-top: 80px;
    padding-top: 22px;
}

/* Hello section: a join button echoing the nav CTA */
.home .join-echo {
    display: inline-block;
    margin-top: 26px;
    font-size: 1.2rem;
}

/* Coming Up: quiet text link to the full sign-ups page */
.see-signups {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 16px;
    color: var(--blue-ink);
    font: italic 500 1.15rem var(--display);
    text-decoration: none;
}
.see-signups span[aria-hidden] { font-style: normal; transition: transform 0.15s ease; }
.see-signups:hover { text-decoration: underline; }
.see-signups:hover span[aria-hidden] { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
    .see-signups span[aria-hidden] { transition: none; }
    .see-signups:hover span[aria-hidden] { transform: none; }
}

@media (max-width: 820px) {
    .home .bottom { gap: 44px; }
}
@media (max-width: 640px) {
    .home .masthead { margin-bottom: 28px; }
    .home .pics { gap: 12px; }
    .home .bottom { margin-top: 44px; }
    .home .site-footer { margin-top: 56px; }
}
/* ---------- Sign-ups page: spinning vinyl records ---------- */

/* "Pick a date": a simple stack of admission tickets */
.tickets {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 26px;
    max-width: 560px;
}
a.ticket {
    --perf: rgba(71, 113, 143, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px 14px 24px;
    text-decoration: none;
    color: var(--text);
    background: var(--paper-light);
    border: 1px solid var(--blue);
    border-left: 3px solid var(--accent, var(--blue));
    border-radius: 8px;
    box-shadow: 3px 3px 0 var(--blue-pale);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
a.ticket::before {
    /* perforation down the stub line, like a real ticket */
    content: "";
    position: absolute;
    left: 56px;
    top: 7px;
    bottom: 7px;
    border-left: 1px dashed var(--perf);
}
a.ticket::after {
    /* punched half-notches on both edges at the perforation */
    content: "";
    position: absolute;
    left: 51px;
    top: -7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 calc(100% + 14px) 0 0 var(--paper);
}
.ticket-no {
    flex: 0 0 auto;
    width: 28px;
    text-align: center;
    font: italic 600 1.05rem/1 var(--display);
    color: var(--blue-ink);
    opacity: 0.8;
}
.ticket-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ticket-title {
    color: var(--blue-ink);
    font: 600 1.12rem/1.3 var(--display);
    letter-spacing: 0.01em;
}
.ticket-sub {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.8;
}
.ticket-cta {
    margin-left: auto;
    flex: 0 0 auto;
    font: italic 600 0.78rem/1 var(--display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-ink);
    opacity: 0.55;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
a.ticket:hover {
    transform: translateY(-2px);
    border-color: var(--blue-ink);
    box-shadow: 5px 5px 0 var(--blue-pale);
}
a.ticket:hover .ticket-title { text-decoration: underline; text-underline-offset: 3px; }
a.ticket:hover .ticket-cta { opacity: 1; transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
    a.ticket:hover { transform: none; }
    a.ticket:hover .ticket-cta { transform: none; }
}

/* "New to the club?": two turntables side by side */
.record-grid.turns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 26px;
    margin-top: 26px;
}

a.record {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 18px 12px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border-radius: 10px;
    transition: background 0.25s ease, transform 0.25s ease;
}
a.record:hover {
    background: var(--paper-light);
    transform: translateY(-3px);
}

/* The disc itself: black vinyl with a colored paper label */
.disc {
    position: relative;
    display: block;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16), transparent 45%),
        var(--vinyl, #1b1b1d);
    box-shadow:
        0 10px 22px -8px rgba(31, 49, 62, 0.45),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.3s ease;
}
a.record:hover .disc {
    box-shadow:
        0 16px 30px -8px rgba(31, 49, 62, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Fine grooves: concentric rings that make the spin visible */
.grooves {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: repeating-radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.05) 0 1px,
        rgba(0, 0, 0, 0.35) 1px 3px,
        rgba(255, 255, 255, 0.02) 3px 4px,
        transparent 4px 7px
    );
}

/* A soft highlight sweeping across the vinyl (does not rotate) */
.sheen {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255, 255, 255, 0.13) 47%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.13) 53%,
        transparent 70%
    );
    opacity: 0.55;
    transition: opacity 0.3s ease;
}
a.record:hover .sheen { opacity: 1; }

/* Paper label in the middle — rotates with the disc */
.label-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 46%;
    height: 46%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), transparent 55%),
        var(--label, var(--blue));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
    display: grid;
    place-items: center;
}
.label-text {
    font: italic 600 0.8rem var(--display);
    letter-spacing: 0.08em;
    color: rgba(27, 27, 29, 0.75);
    text-transform: uppercase;
}

/* The spindle hole sits above everything and never moves */
.spindle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

/* Spin: wrap the rotating layers in .spin so they turn as one unit while
   the disc base and the sheen highlight stay put — like real vinyl under
   a light. The grooves make the rotation visible. */
@keyframes record-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(200deg); }
}
.spin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.3, 1);
}
a.record:hover .spin,
a.record:focus-visible .spin {
    animation: record-spin 1.6s cubic-bezier(0.3, 0.05, 0.2, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    a.record:hover .spin,
    a.record:focus-visible .spin { animation: none; }
    a.record:hover { transform: none; }
}

/* ---------- "New to the club?": turntable cards ---------- */
/* The disc sits on a felt slipmat inside a rounded platter deck, with a
   tonearm resting at its side. Hovering spins the record and swings the
   arm onto it — like dropping the needle to start. */
.platter {
    position: relative;
    display: block;
    width: 210px;
    height: 178px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.06), transparent 55%),
        #2e3b46;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.3s ease;
}
a.record.turntable:hover .platter {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 14px 26px -12px rgba(31, 49, 62, 0.5);
}
.platter::before {
    /* felt slipmat under the record */
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: var(--blue-pale);
    opacity: 0.5;
}
.disc.small {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 142px;
    height: 142px;
    transform: translateY(-50%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tonearm {
    position: absolute;
    top: 24px;
    right: 22px;
    width: 4px;
    height: 106px;
    border-radius: 3px;
    background: linear-gradient(#cfd8de, #8d9aa5);
    transform-origin: 50% 0;
    transform: rotate(18deg);
    transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.tonearm::before {
    /* pivot base */
    content: "";
    position: absolute;
    top: -9px;
    left: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #b7c3cc;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.tonearm::after {
    /* cartridge / stylus */
    content: "";
    position: absolute;
    bottom: -7px;
    left: -4px;
    width: 12px;
    height: 14px;
    border-radius: 3px;
    background: #5b6a76;
}
a.record.turntable:hover .tonearm,
a.record.turntable:focus-visible .tonearm {
    transform: rotate(-8deg);
}
a.record.turntable:hover .disc.small,
a.record.turntable:focus-visible .disc.small {
    transform: translateY(-50%) scale(1.02);
}
.disc.small .label-text { font-size: 0.7rem; }

/* Text under the disc */
.record-info { display: flex; flex-direction: column; gap: 3px; }
.record-title {
    color: var(--blue-ink);
    font: 600 1.15rem/1.3 var(--display);
    letter-spacing: 0.01em;
}
.record-sub {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text);
    opacity: 0.85;
    max-width: 24ch;
}
a.record:hover .record-title { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Centered headings: "New to the club?" & Forms titles ---------- */
/* The turntable cards on Sign Ups, and the form card titles on Forms, read
   better centered over their artwork / staff flourish. Everything below the
   title keeps its normal alignment. */
.note.center > .section-title,
.note.center > p {
    text-align: center;
}
.note.center > p { margin-left: auto; margin-right: auto; }

.forms .card-no,
.forms .card-body .section-title { text-align: center; }

@media (max-width: 640px) {
    /* Turntable cards shrink to fit narrow screens */
    .platter { width: 184px; height: 158px; }
    .platter::before { left: 11px; width: 132px; height: 132px; }
    .disc.small { left: 14px; width: 126px; height: 126px; }
    .tonearm { top: 20px; right: 17px; height: 92px; }

    /* Tickets tighten up: smaller number column and perforation */
    a.ticket { gap: 12px; padding: 12px 16px 12px 18px; }
    a.ticket::before { left: 44px; }
    a.ticket::after { left: 39px; }
    .ticket-no { width: 20px; font-size: 0.95rem; }
}

/* ---------- Home page: music-note bullets on the "Coming Up" listing ---------- */
/* Hand-built CSS notes (note head + stem + optional flag/beam) so they match
   the ink style of the staff melodies. Hovering a row makes its note bounce.
   Geometry: 10 x 7.5 tilted oval head; right-hand stem rising from the head's
   top edge, exactly one head-height above it — the same proportions used by
   the SVG notes in the masthead melodies. */
.note-bullet {
    position: relative;
    flex: 0 0 auto;
    width: 26px;
    height: 24px;
    align-self: center;
    color: var(--ink, var(--blue-ink));
}
.note-bullet::before {
    /* note head */
    content: "";
    position: absolute;
    left: 0;
    bottom: 1px;
    width: 10px;
    height: 7.5px;
    border-radius: 50%;
    background: currentColor;
    transform: rotate(-20deg);
}
.note-bullet::after {
    /* stem: base tucked into the head, tip one head-height above it */
    content: "";
    position: absolute;
    left: 8.2px;
    bottom: 4px;
    width: 1.8px;
    height: 18px;
    border-radius: 1px;
    background: currentColor;
}
.note-bullet.eighth { width: 28px; }
.note-bullet.eighth i {
    /* single flag: a curl peeling off the top of the stem */
    position: absolute;
    left: 9.6px;
    top: 1.5px;
    width: 7px;
    height: 10px;
    border-top: 2.4px solid currentColor;
    border-right: 2.4px solid currentColor;
    border-radius: 0 9px 0 7px;
}
.note-bullet.beamed { width: 34px; }
.note-bullet.beamed::before {
    /* second note head, a third of a head-height higher than the first */
    box-shadow: 13px 1.5px 0 0 currentColor;
}
.note-bullet.beamed i {
    /* second stem, aligned to the offset head */
    position: absolute;
    left: 21.2px;
    bottom: 6.5px;
    width: 1.8px;
    height: 18px;
    border-radius: 1px;
    background: currentColor;
}
.note-bullet.beamed b {
    /* beam connecting the tops of both stems. Drawn as a parallelogram so
       its ends land exactly on the two stem tips (left tip is 2.5px higher
       than the right one) — no tilted rectangle poking past the stems. */
    content: "";
    position: absolute;
    left: 8.2px;
    top: 1.2px;
    width: 14.8px;
    height: 3.2px;
    background: currentColor;
    transform: skewY(9.6deg);
}
.comingup li:hover .note-bullet,
.comingup li:focus-within .note-bullet {
    animation: note-bounce 0.6s ease;
}
@keyframes note-bounce {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-7px) rotate(-8deg); }
    55%  { transform: translateY(0); }
    72%  { transform: translateY(-3px) rotate(5deg); }
    100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .comingup li:hover .note-bullet,
    .comingup li:focus-within .note-bullet { animation: none; }
}

/* ---------- Home page: faint treble clef in the bottom-left corner ---------- */
.home .page {
    position: relative;
    /* clear band at the foot of the page so the disc never sits behind copy */
    padding-bottom: 200px;
}
.treble-clef {
    position: absolute;
    z-index: 0;
    left: -84px;
    bottom: 118px;
    width: 290px;
    height: 490px;
    pointer-events: none;
    color: rgba(71, 113, 143, 0.15);
    font: 400 430px/1 "Noto Music", "Bravura", "Segoe UI Symbol", serif;
    text-align: center;
    transform: rotate(-7deg);
}
.treble-clef::before {
    content: "𝄞";
    position: absolute;
    inset: 0;
}
.hello > * { position: relative; z-index: 1; }
.hello .section-title { z-index: 1; }

/* Faint, page-specific clefs echo the home-page watermark. */
.page-clef {
    position: absolute;
    z-index: 0;
    right: -78px;
    bottom: 108px;
    width: 300px;
    height: 360px;
    color: rgba(71, 113, 143, 0.12);
    pointer-events: none;
    transform: rotate(-7deg);
}
.page-clef::before {
    position: absolute;
    inset: 0;
    font: 400 300px/1 "Noto Music", "Bravura", "Segoe UI Symbol", serif;
    text-align: center;
}
.page-clef--bass::before { content: "\1D122"; }
.page-clef--alto::before { content: "\1D121"; }
.page-clef--tenor::before { content: "\1D121"; }
.page-clef--forms-bass::before { content: "\1D122"; }
.page-clef--signup-treble::before { content: "\1D11E"; }
.page-clef--alto { right: auto; left: -145px; transform: rotate(-7deg) translateY(-14px); }
.page-clef--tenor { right: -92px; transform: rotate(-7deg) translateY(12px); }
.page-clef--forms-bass { transform: rotate(7deg); }
.page-clef--signup-treble {
    top: 180px;
    right: -78px;
    bottom: auto;
    transform: rotate(7deg);
}

.about main,
.signups main,
.forms main,
.about .site-footer,
.signups .site-footer,
.forms .site-footer { position: relative; z-index: 1; }

@media (max-width: 640px) {
    .home .page { padding-bottom: 160px; }
    .treble-clef {
        width: 110px;
        height: 210px;
        left: -30px;
        bottom: 10px;
        font-size: 190px;
    }
    .page-clef {
        right: -34px;
        bottom: 72px;
        width: 190px;
        height: 240px;
    }
    .page-clef::before { font-size: 200px; }
    .page-clef--alto { right: auto; left: -90px; }
    .page-clef--tenor { right: -55px; }
    .page-clef--forms-bass { right: -34px; }
    .page-clef--signup-treble { top: 135px; right: -34px; }
}

/* ---------- Resources page: liner notes + programme cards ---------- */

.resources .lead-note {
    max-width: 62ch;
    margin: 8px auto 44px;
    text-align: center;
    font: italic 500 1.3rem/1.5 var(--display);
    color: var(--blue-ink);
}

.res-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.8fr);
    gap: clamp(24px, 3.5vw, 40px);
    align-items: start;
}

/* Open book: two paper pages facing each other across a faint centre fold */
.open-book {
    position: relative;
    padding: 0;
    isolation: isolate;
}
/* A cloth-bound cover peeks out around the paper leaves. */
.open-book::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -9px -10px -8px -9px;
    border: 1px solid rgba(47, 82, 108, 0.56);
    border-radius: 5px 8px 8px 5px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 18px),
        linear-gradient(145deg, #8ba9b8, #7899aa 58%, #6f91a2);
    box-shadow:
        0 13px 25px rgba(31, 58, 82, 0.17),
        inset 4px 0 7px rgba(34, 65, 87, 0.17),
        inset 0 0 0 3px rgba(251, 248, 240, 0.12);
    pointer-events: none;
}
/* cloth ribbon marker lying over the right-hand leaf */
.book-ribbon {
    position: absolute;
    top: -10px;
    right: clamp(28px, 8%, 64px);
    width: 18px;
    height: 62px;
    /* silk ribbon picked out in the site's muted rose */
    background: linear-gradient(to right, #c9a9a6, #bb938f 55%, #ad8783);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.35);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
    z-index: 3;
    pointer-events: none;
}
.book-pages {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    /* Each wide leaf reads like a horizontal page in a bound volume. */
    box-shadow: 0 14px 28px rgba(31, 58, 82, 0.12);
}
.book-page,
.book-spine { isolation: isolate; }
.book-page {
    --gutter: to right;
    position: relative;
    padding: 25px 26px 36px;
    /* Papery stock: two grain dot layers, a warm tone that deepens toward the
       gutter, and a slightly aged foot where the pages have been turned. */
    background:
        radial-gradient(rgba(120, 96, 58, 0.055) 0.5px, transparent 0.6px) 0 0 / 4px 4px,
        radial-gradient(rgba(71, 113, 143, 0.045) 0.5px, transparent 0.6px) 2px 2px / 6px 6px,
        linear-gradient(var(--gutter), rgba(222, 206, 178, 0.55), rgba(251, 248, 240, 0) 42%),
        linear-gradient(to top, rgba(198, 180, 150, 0.22), rgba(251, 248, 240, 0) 15%),
        var(--paper-light);
}
.page-left  { --gutter: to left; }
.page-right { --gutter: to right; }
.page-left  { border-radius: 4px 4px 0 0; --gutter: to top; box-shadow: inset 0 -12px 16px -12px rgba(31, 58, 82, 0.25); }
.page-right {
    border-radius: 0 0 4px 4px;
    --gutter: to bottom;
    box-shadow: inset 0 10px 14px -12px rgba(31, 58, 82, 0.18);
    border-top: 1px solid rgba(71, 113, 143, 0.12);
}

/* the fold: one faint line where the pages meet, fading out top and bottom */
.book-spine {
    display: none;
}
/* sewn head band (top) and tail band (bottom) */
.book-spine::before,
.book-spine::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 7px;
    background-image: repeating-linear-gradient(to right,
        var(--paper-light) 0 4px,
        var(--blue-ink) 4px 8px);
    box-shadow: inset 0 0 0 1px rgba(31, 58, 82, 0.16);
}
.book-spine::before { top: 0; }
.book-spine::after { bottom: 0; }

.mvt {
    margin: 0 0 1px;
    font: italic 500 0.92rem var(--display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-ink);
}
.book-page h2 {
    margin: 2px 0 13px;
    color: var(--blue-ink);
    font: 500 clamp(1.35rem, 2vw, 1.75rem)/1.15 var(--display);
}
/* short printer's rule under each movement heading */
.book-page h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 2px;
    margin-top: 9px;
    background: rgba(71, 113, 143, 0.32);
}
.book-rules {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    /* every rule sits on a ruled line */
    background-image: repeating-linear-gradient(to bottom,
        transparent 0 calc(var(--rule-line-height) - 1px),
        rgba(71, 113, 143, 0.16) calc(var(--rule-line-height) - 1px) var(--rule-line-height));
    background-position: 0 1px;
}
.book-rules li {
    --rule-line-height: 24px;
    position: relative;
    margin: 0 0 9px;
    padding-left: 34px;
    font-size: 0.96rem;
    line-height: 1.45;
}
.book-rules .rule-no {
    position: absolute;
    left: 0;
    top: 0;
    width: 27px;
    font: italic 600 0.96rem var(--display);
    color: var(--blue-ink);
    text-align: right;
}
.page-no {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    margin: 0;
    text-align: center;
    font: italic 500 0.95rem var(--display);
    color: var(--blue-ink);
    opacity: 0.75;
}

/* Sidebar cards */
.res-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Handbook card: looks like a little programme booklet, whole card links out */
.handbook-card {
    position: relative;
    display: block;
    padding: 19px 18px 19px 32px;
    background: var(--paper-light);
    border: 1px solid var(--blue-ink);
    box-shadow: 5px 5px 0 var(--blue-pale);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.handbook-card:hover,
.handbook-card:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--blue-pale);
}
.handbook-flap {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    background: var(--blue-pale);
    border-right: 1px dashed var(--blue-ink);
}
/* two "stitch" holes in the spine */
.handbook-flap::before,
.handbook-flap::after {
    content: "";
    position: absolute;
    left: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--blue-ink);
}
.handbook-flap::before { top: 30%; }
.handbook-flap::after { top: 62%; }

.handbook-body { display: block; }
.handbook-kicker {
    display: block;
    font: italic 500 0.95rem var(--display);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-ink);
}
.handbook-title {
    display: block;
    margin: 2px 0 10px;
    color: var(--blue-ink);
    font: 500 1.5rem/1.1 var(--display);
}
.handbook-text {
    display: block;
    font-size: 0.94rem;
    line-height: 1.55;
}
.handbook-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--blue-ink);
    font: italic 600 1.05rem var(--display);
}
.handbook-link span[aria-hidden] {
    display: inline-block;
    transition: transform 0.15s ease;
}
.handbook-card:hover .handbook-link { text-decoration: underline; }
.handbook-card:hover .handbook-link span[aria-hidden] { transform: translateX(4px); }

/* Login card: styled like a library book pocket */
.login-card {
    padding: 19px 19px 18px;
    background: var(--paper-light);
    border: 1px solid var(--blue);
    box-shadow: 5px 5px 0 var(--blue-pale);
}
.login-card h2 {
    margin: 0 0 10px;
    color: var(--blue-ink);
    font: 500 1.3rem/1.2 var(--display);
}
.login-card .clef { font-size: 1.7rem; line-height: 1; }
.login-card p {
    margin: 0 0 14px;
    font-size: 0.94rem;
    line-height: 1.55;
}
.cred { margin: 0; }
.cred > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--blue);
}
.cred > div:last-of-type { border-bottom: 0; }
.cred dt {
    font: italic 500 0.97rem var(--display);
    color: var(--blue-ink);
}
.cred dd { margin: 0; text-align: right; }
.cred code {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
    background: var(--blue-pale);
    padding: 2px 8px;
    border-radius: 3px;
}
.lock-note {
    margin: 12px 0 0 !important;
    font: italic 400 0.95rem var(--body);
    color: var(--blue-ink);
}

@media (max-width: 700px) {
    .res-grid { grid-template-columns: 1fr; }
    .open-book { padding: 8px 5px 12px; }
    .open-book::before { inset: 0 -5px 4px -5px; }
    .book-ribbon { height: 46px; right: 22px; }
    .book-pages { grid-template-columns: minmax(0, 1fr); }
    .book-page { padding: 26px 22px 42px; }
    .book-rules li { padding-left: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    .handbook-card,
    .handbook-card:hover,
    .handbook-card:focus-visible { transform: none; transition: none; }
    .handbook-link span[aria-hidden] { transition: none; transform: none; }
}
