/* =========================================================
   legal.css — About and Privacy Policy only.

   Uses the tokens in style.css. Does not restyle the cropper.
   ========================================================= */

/* Global style.css centres every <article> as a grid. Undo that here. */
.pageAbout,
.pagePrivacy {
    background-color: var(--color-bg);
}

.pageAbout main,
.pagePrivacy main,
.pageAbout article,
.pagePrivacy article {
    display: block;
    text-align: left;
    justify-items: stretch;
}

.pageAbout section,
.pagePrivacy section {
    text-align: left;
    justify-items: stretch;
}

.aboutWrap {
    width: min(1080px, calc(100% - 56px));
    margin: 0 auto;
}

.legalShell {
    width: min(1120px, calc(100% - (var(--gutter) * 2)));
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) 0 8px;
}

/* ---- hero (privacy still uses this) ---- */

.legalHero {
    display: grid;
    justify-items: center;
    gap: var(--space-3);
    width: 100%;
    margin-bottom: clamp(28px, 4vw, 44px);
    text-align: center;
}

.legalKicker {
    margin: 0;
    padding: 0;
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legalHero h1 {
    margin: 0;
    padding: 0;
    max-width: none;
    color: var(--color-text);
    font-size: var(--fs-display);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.legalLede {
    margin: 0;
    padding: 0;
    max-width: 52ch;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.legalMeta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

.legalMeta time {
    color: var(--color-text);
    font-weight: 500;
}

.legalActions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.legalHero .legalActions {
    justify-content: center;
}

.legalBtn,
.legalBtnGhost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: var(--fs-base);
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.legalBtn {
    color: var(--color-text-inverse);
    background-color: var(--color-accent);
}

.legalBtn:hover {
    color: var(--color-text-inverse);
    background-color: var(--color-accent-hover);
}

.legalBtn:active,
.legalBtnGhost:active {
    transform: scale(0.98);
}

.legalBtnGhost {
    color: var(--color-accent);
    background: var(--color-surface);
    box-shadow: 0 0 0 1px rgba(33, 83, 204, 0.22);
}

.legalBtnGhost:hover {
    color: var(--color-accent-hover);
    background: var(--color-accent-soft);
}

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

.pageAbout .aboutHero {
    padding: clamp(36px, 6vw, 72px) 0 0;
}

.pageAbout .aboutHeroGrid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.pageAbout .aboutHeroCopy {
    display: grid;
    justify-items: start;
    gap: 16px;
}

.pageAbout .aboutHeroCopy h1 {
    margin: 0;
    padding: 0;
    max-width: 12ch;
    color: var(--color-text);
    font-size: clamp(36px, 5.4vw, 56px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.pageAbout .aboutHeroCopy .legalLede {
    max-width: 42ch;
    text-align: left;
}

.pageAbout .aboutHeroArt {
    display: grid;
    place-items: center;
}

/* the hero picture: page behind, card lifted out (inline SVG in about.html) */
.aboutArt {
    display: block;
    width: min(100%, 420px);
    height: auto;
    overflow: visible;
}

.aboutArt .artPaper { fill: var(--color-surface); }
.aboutArt .artInk { fill: rgba(51, 51, 61, 0.16); }
.aboutArt .artInkSoft { fill: rgba(51, 51, 61, 0.08); }
.aboutArt .artBand { fill: var(--color-accent); }
.aboutArt .artOnBand { fill: rgba(255, 255, 255, 0.7); }
.aboutArt .artPhoto { fill: var(--color-accent-soft-strong); }

.aboutArt .artSlot {
    fill: var(--color-accent-soft);
    stroke: var(--color-accent);
    stroke-width: 1.5;
    stroke-dasharray: 4 4;
    opacity: 0.55;
}

.aboutArt .artCut {
    stroke: rgba(51, 51, 61, 0.18);
    stroke-width: 1.5;
    stroke-dasharray: 3 5;
}

.aboutArt .artMark {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.aboutArt .artTag {
    fill: var(--color-accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.aboutBand {
    padding: 56px 0 0;
}

.pageAbout .aboutBand h2 {
    margin: 0 0 24px;
    padding: 0;
    color: var(--color-text);
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
}

.aboutProse {
    width: 100%;
    max-width: 80ch;
    margin: 0 auto;
}

.aboutProse h2 {
    text-align: center;
    margin-bottom: 20px;
}

.aboutProse p,
.aboutLead {
    margin: 0 0 1em;
    padding: 0;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    text-wrap: pretty;
}

.aboutLead {
    width: 100%;
    max-width: 62ch;
    margin: 0 auto 20px;
    text-align: center;
}

.aboutProse p:last-child,
.aboutLead:last-child {
    margin-bottom: 0;
}

.aboutProse a,
.aboutLead a {
    color: var(--color-link);
    letter-spacing: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.aboutFacts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: clamp(28px, 4vw, 44px) 0 0;
    padding: 18px 0 0;
    list-style: none;
    text-align: center;
    border-top: 1px solid var(--color-border-light);
}

.aboutFacts li {
    padding: 0 20px;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
    line-height: 1.4;
    text-align: center;
}

.aboutFacts li + li {
    border-left: 1px solid var(--color-border-light);
}

.aboutFacts strong {
    display: block;
    margin-bottom: 2px;
    color: var(--color-text);
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.aboutTrack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: about-step;
}

.aboutTrack li {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 20px 18px 18px;
    border-radius: 16px;
    background: var(--color-surface);
    box-shadow:
        0 0 0 1px rgba(51, 51, 61, 0.06),
        0 1px 2px -1px rgba(51, 51, 61, 0.06);
    counter-increment: about-step;
}

.aboutTrack li::before {
    content: counter(about-step);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-text-inverse);
    font-size: 13px;
    font-weight: 600;
}

.aboutTrack h3 {
    margin: 0;
    color: var(--color-text);
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.aboutTrack p {
    margin: 0;
    padding: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
    line-height: 1.55;
}

/* each supported card is a link to its crop page */
.supportMarks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.supportMarks li {
    min-width: 0;
}

.supportMarks a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    min-height: 64px;
    box-sizing: border-box;
    padding: 10px 16px 10px 12px;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text);
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.15s ease, color 0.15s ease;
}

.supportMarks a::after {
    content: "\2192";
    margin-left: auto;
    padding-left: 4px;
    color: var(--color-text-muted);
    transition: transform 0.15s ease, color 0.15s ease;
}

.supportMarks a:hover {
    color: var(--color-accent);
    background: var(--color-surface);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}

.supportMarks a:hover::after {
    color: var(--color-accent);
    transform: translateX(3px);
}

.supportMarks a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.supportMarks .supportMark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 10px;
    background: transparent;
    color: var(--color-accent);
    font-size: 18px;
    font-weight: 600;
}

.supportMarks .supportMark img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.supportMarks .supportMark::after {
    content: attr(data-letter);
}

.supportMarks .supportMark:has(img[src]:not([src=""]))::after {
    display: none;
}

/* no picture: the letter sits on a soft tile instead */
.supportMarks .supportMark:not(:has(img[src]:not([src=""]))) {
    background: var(--color-accent-soft);
}

.supportMarks .supportMark img:not([src]),
.supportMarks .supportMark img[src=""] {
    display: none;
}

.supportName {
    min-width: 0;
    font-size: var(--fs-base);
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: break-word;
}

.aboutTips {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 68ch;
    margin: 0 auto;
    padding: 20px 24px 20px 2em;
    list-style: disc;
    border-radius: 12px;
    background: var(--color-instructions-bg);
    color: var(--color-instructions-text);
    font-size: var(--fs-md);
    line-height: 1.55;
    text-align: left;
}

.aboutTips li {
    padding-left: 4px;
}

.aboutTips li::marker {
    color: rgba(242, 251, 255, 0.75);
}

.pageAbout #faq {
    margin-top: 64px;
    padding-block: 56px 64px;
}

.pageAbout #faq header h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* the closing call, at the end of the questions */
.pageAbout #faq .legalCta {
    width: 100%;
    max-width: 65ch;
    box-sizing: border-box;
    margin-top: 40px;
    background: var(--color-bg);
    box-shadow: none;
}

.pageAbout .faqItem {
    padding: 16px 0;
    max-height: none;
}

.pageAbout .faqItem .faqQ button {
    padding: 0;
    overflow-wrap: break-word;
}

/* ---- closing CTA ---- */

.legalCta {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: 22px 24px;
    border-radius: 20px;
    background: var(--color-surface);
    text-align: left;
    box-shadow:
        0 0 0 1px rgba(51, 51, 61, 0.06),
        0 8px 24px -12px var(--shadow-color);
}

.legalCta > div {
    flex: 1 1 auto;
    min-width: 0;
}

.legalCta .legalBtn {
    flex: 0 0 auto;
    width: auto;
}

.legalCta h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 400;
}

.legalCta p {
    margin: 0;
    padding: 0;
    max-width: 46ch;
    color: var(--color-text-muted);
    font-size: var(--fs-body);
}

/* ---- privacy layout ---- */

.pagePrivacy .legalHero {
    margin-bottom: 28px;
}

.legalLayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding-bottom: 36px;
}

.legalToc {
    padding: 16px 14px 14px;
    border-radius: 16px;
    background: var(--color-surface);
    text-align: left;
    box-shadow:
        0 0 0 1px rgba(51, 51, 61, 0.06),
        0 1px 2px -1px rgba(51, 51, 61, 0.06);
}

.legalTocLabel {
    margin: 0 0 10px;
    padding: 0 4px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legalToc ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.legalToc a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 13px;
    letter-spacing: 0;
    line-height: 1.35;
    text-decoration: none;
}

.legalToc a:hover,
.legalToc a.isActive {
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.legalDoc {
    min-width: 0;
    max-width: 68ch;
    text-align: left;
}

.legalDoc section {
    margin: 0 0 32px;
    padding: 0;
    text-align: left;
}

.legalDoc h2 {
    margin: 0 0 10px;
    scroll-margin-top: 20px;
    color: var(--color-text);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.legalDoc h3 {
    margin: 16px 0 6px;
    color: var(--color-text);
    font-size: var(--fs-md);
    font-weight: 600;
}

.legalDoc p {
    margin: 0 0 12px;
    padding: 0;
    color: var(--color-text-muted);
    font-size: var(--fs-base);
    line-height: 1.7;
    text-wrap: pretty;
}

.legalDoc a {
    color: var(--color-link);
    letter-spacing: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legalDoc a:hover {
    color: var(--color-link-hover);
}

.legalDoc ul,
.legalDoc ol {
    display: grid;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0 0 0 1.15em;
    color: var(--color-text-muted);
    font-size: var(--fs-base);
    line-height: 1.6;
    list-style: disc;
}

.legalDoc ol {
    list-style: decimal;
}

.legalDoc li {
    padding-left: 4px;
}

.legalDoc li::marker {
    color: var(--color-accent);
}

.legalDoc li a {
    letter-spacing: 0;
}

.legalNote,
.legalWarn {
    display: grid;
    gap: 6px;
    margin: 4px 0 16px;
    padding: var(--gap-3) var(--gap-4);
    border-radius: var(--radius-sm);
    background-color: var(--color-instructions-bg);
    color: var(--color-instructions-text);
    text-align: left;
}

.legalNote strong,
.legalWarn strong {
    color: var(--color-instructions-text);
    font-size: var(--fs-base);
    font-weight: 600;
}

.legalNote p,
.legalWarn p {
    margin: 0;
    padding: 0;
    color: var(--color-instructions-text);
    font-size: var(--fs-body);
    line-height: 1.55;
}

.legalNote a,
.legalWarn a {
    color: var(--color-callout-link);
}

.legalNote a:hover,
.legalWarn a:hover {
    color: var(--color-callout-link-hover);
}

.legalFine {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.55;
}

@media (min-width: 900px) {
    .legalLayout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 40px;
    }

    .legalToc {
        position: sticky;
        top: 24px;
        padding: 18px 14px 16px;
    }

    .legalToc ol {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .legalToc a {
        padding: 8px 10px;
        background: transparent;
    }

    .legalToc a.isActive {
        background: var(--color-accent-soft);
    }
}

@media (max-width: 839px) {
    .pageAbout .aboutHeroGrid,
    .aboutTrack {
        grid-template-columns: 1fr;
    }

    .aboutTrack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pageAbout .aboutHeroCopy,
    .pageAbout .aboutHeroArt {
        min-width: 0;
        width: 100%;
    }

    .aboutFacts {
        margin-top: 28px;
        padding-top: 16px;
    }

    .aboutFacts li {
        padding: 0 8px;
        font-size: var(--fs-sm);
    }

    .aboutFacts strong {
        font-size: var(--fs-base);
    }

    .pageAbout .aboutHeroCopy h1 {
        max-width: none;
        font-size: clamp(30px, 9vw, 40px);
    }

    .aboutArt {
        width: min(100%, 340px);
    }

    .legalCta {
        flex-wrap: wrap;
    }

    .legalCta .legalBtn {
        width: 100%;
    }

    .legalHero h1 {
        font-size: clamp(28px, 7vw, 40px);
    }

    .pageAbout #faq {
        margin-top: 48px;
        padding: 44px 24px 48px;
    }

    .pageAbout .faqItem {
        width: 100%;
        max-width: 65ch;
    }
}

@media (max-width: 560px) {
    .pageAbout .legalActions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .legalCta {
        padding: 20px;
    }

    .legalBtn,
    .legalBtnGhost {
        width: 100%;
    }

    .legalToc ol {
        grid-template-columns: 1fr;
    }

    .pageAbout .aboutHeroArt {
        display: none;
    }

    .aboutTrack {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* the number beside the step, not above it */
    .aboutTrack li {
        grid-template-columns: 32px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 4px;
        padding: 16px;
    }

    .aboutTrack li::before {
        grid-row: span 2;
        margin: 0;
    }

    .supportMarks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .supportMarks a {
        gap: 8px;
        padding: 10px 10px;
    }

    .supportMarks a::after {
        display: none;
    }

    .supportMarks .supportMark {
        width: 34px;
        height: 34px;
    }

    .supportMarks .supportMark img {
        width: 32px;
        height: 32px;
    }

    .supportName {
        font-size: var(--fs-sm);
    }
}

@media (prefers-reduced-motion: reduce) {
    .legalBtn,
    .legalBtnGhost,
    .supportMarks a,
    .supportMarks a::after {
        transition: none;
    }

    .legalBtn:active,
    .legalBtnGhost:active {
        transform: none;
    }
}

/* the not-found page is short: keep its footer at the bottom of the window */
.pageNotFound {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.pageNotFound > main { flex: 1 0 auto; }
.notFoundArt {
    display: block;
    width: min(240px, 60vw);
    height: auto;
    margin: 0 auto var(--space-3, 12px);
}
