/* Sign City tokens — from the design handoff. Binding values. */
:root {
    --signal-red: #FF0000;
    --signal-red-ink: #E60000;
    --sign-black: #000000;
    --ink: #111111;
    --plate: #F2F2F2;
    --night: #1E1E1E;
    --star: #FFD400;
    --star-outline: #8A7000;
    --muted: #666666;
    --disabled-ink: #9A9A9A;
    --disabled-plate: #E4E4E4;
    --hairline: #EEEEEE;

    --font-round: "Varela Round", system-ui, -apple-system, sans-serif;
    --font-display: "Varela", "Varela Round", system-ui, sans-serif;

    --gap-section: 96px;
    --band: 3.5vh;
    --header-h: calc(var(--band) + 72px);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light; }

body {
    margin: 0;
    background: var(--plate);
    color: var(--ink);
    font-family: var(--font-round);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: var(--gap-section) 0 0; }

/* Type scale */
.display {
    font-family: var(--font-display);
    font-size: clamp(44px, 8vw, 86px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin: 0;
}
.section-heading {
    font-family: var(--font-display);
    font-size: 38px;
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0 0 28px;
}
.lead { font-size: 19px; line-height: 1.6; max-width: 54ch; color: #333333; margin: 18px 0 0; }
.caption { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* Header: the wordmark is a link home; nothing else. */
.site-header { height: var(--header-h); padding: 0; display: flex; align-items: center; }
.site-header__row { display: flex; align-items: center; width: 100%; }
.wordmark {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
}

/* Red bands pin the first viewport of the home only — not sticky. */
body.home .site-header::before,
body.home .hero::after {
    content: "";
    display: block;
    position: absolute;
    left: 0; right: 0;
    height: var(--band);
    background: var(--signal-red);
}
body.home { position: relative; }
/* On the home the cover is the name: the header is only the red band. */
body.home .site-header { height: var(--band); }
body.home .site-header::before { top: 0; }
body.home .hero {
    position: relative;
    padding-bottom: calc(var(--band) + var(--gap-section));
    min-height: calc(100vh - var(--band));
    min-height: calc(100svh - var(--band));
    display: grid;
    align-content: center;
}
body.home .hero::after { bottom: 0; }

/* Footer */
.site-footer {
    background: var(--night);
    color: var(--plate);
    padding: 44px 0;
    margin-top: var(--gap-section);
    font-size: 15px;
}
.site-footer__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px 36px;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer__links a { color: var(--plate); text-decoration: none; }
.site-footer__links a[aria-current="true"] { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__legal { margin: 0; flex-basis: 100%; }
.site-footer__legal a { color: var(--plate); }

/* Long-form pages */
.prose { max-width: 66ch; }
.prose h1 { font-family: var(--font-display); font-size: 38px; letter-spacing: -0.01em; margin: 0 0 28px; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; }

/* One breakpoint. */
@media (max-width: 768px) {
    :root { --gap-section: 64px; }
    .section-heading { font-size: 30px; }
}

/* The certificate card — shared by /c/{id} and the home. The card sits on a
   Night Grey stage, as the handoff puts score cards on dark ground. */
.cert-stage { background: var(--night); padding: 44px 0; margin-top: 0; }
body.home .cert-stage { margin-top: var(--gap-section); }
.cert-stage__row { display: flex; justify-content: center; }

.cert {
    --accent: var(--signal-red);
    width: 100%; max-width: 24rem;
    background: #f4f4f4; border: 6px solid var(--accent); border-radius: 12px;
    padding: 1rem;
    font-family: system-ui, -apple-system, sans-serif;
    color: #fff;
    line-height: normal;
}
.cert--elite { --accent: #e3ad0a; }
.cert__title {
    background: var(--accent); color: #fff; margin: 0 0 1rem;
    padding: .6rem 1rem; border-radius: 6px;
    font-size: 1.6rem; letter-spacing: .04em; text-align: center; font-weight: 700;
}
.cert__body { background: #000; border-radius: 8px; padding: 1.5rem 1rem; }
.cert__name { color: #e3ad0a; font-size: 1.5rem; font-weight: 700; margin: 0 0 1.25rem; text-align: center; word-break: break-word; }
.cert__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.5rem; font-weight: 700; padding: .35rem 0; }
.cert__row--continued { justify-content: flex-end; padding-top: 0; }
.cert__stars { margin: 1.25rem 0 0; color: #ffc800; font-size: 1.75rem; letter-spacing: .2em; text-align: center; }
.cert__elite { color: #e3ad0a; font-size: .9rem; margin: 1rem 0 0; text-align: center; }
.cert__tips { color: #e3ad0a; font-size: .9rem; margin: .35rem 0 0; text-align: center; }
.cert__meta { color: #999; font-size: .8rem; margin-top: 1.25rem; text-align: center; }
.cert__verified { color: #4ade80; font-size: .8rem; margin-top: .5rem; text-align: center; }

/* Hero */
.hero__row { display: grid; justify-items: center; }
.hero__cover { width: 100%; max-width: 560px; }
.hero__tagline { margin-top: 28px; text-align: center; }

/* Off-screen but read by assistive tech. */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Premise cards: white, 4px ink border, 16px radius. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: #FFFFFF; border: 4px solid var(--ink); border-radius: 16px; padding: 22px; margin: 0; }
.card__title { font-size: 20px; margin: 0 0 8px; }
.card__body { font-size: 15px; line-height: 1.65; color: #333333; margin: 0; }

/* Chapters: the sign art on a plate; chapter 2 dashed = coming soon. */
.chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chapter { margin: 0; }
.chapter__plate { background: var(--plate); border: 4px solid var(--ink); border-radius: 16px; padding: 14px; }
.chapter--soon .chapter__plate { border: 3px dashed #999999; }
.chapter__caption { font-size: 15px; color: #444444; margin-top: 14px; display: grid; gap: 4px; }
.chapter--soon .chapter__caption { color: var(--muted); }

/* Certificate feature: the card on night ground, copy beside it. */
.cert-feature { display: grid; grid-template-columns: minmax(0, 24rem) 1fr; gap: 44px; align-items: center; }
.cert-feature .section-heading, .lead--on-dark { color: var(--plate); }

/* Stores */
.stores { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.hero__stores { justify-content: center; margin-top: 28px; }
.store-badge { display: inline-grid; gap: 8px; justify-items: center; min-height: 44px; }
.store-badge img { height: 44px; width: auto; }
/* Needs the tag-qualified selector: ".store-badge__img--play" alone (one
   class) loses the cascade to ".store-badge img" (class + type) and never
   applies. */
.store-badge img.store-badge__img--play { height: 50px; }
.store-badge--disabled img { filter: grayscale(1) contrast(0.4) brightness(1.4); }
.store-badge--disabled { color: var(--disabled-ink); }

@media (max-width: 768px) {
    .chapters { grid-template-columns: 1fr; }
    .cert-feature { grid-template-columns: 1fr; }
}

/* Share button, negative variant (footer). Plate black, ink off-white, red ring. */
.share {
    background: var(--sign-black);
    border: 5px solid var(--plate);
    border-radius: 20px;
    padding: 6px;
    cursor: pointer;
    color: var(--plate);
    transition: transform 90ms ease-out, background-color 90ms ease-out;
}
.share__ring, .share__slash { stroke: var(--signal-red); }
.share__glyph { stroke: currentColor; }
.share__slash { stroke-dasharray: 90; stroke-dashoffset: 0; transition: opacity 160ms ease-out, stroke-dashoffset 160ms ease-out; }
.share--shared .share__slash { opacity: 0; stroke-dashoffset: 90; }
.share:active { background: var(--signal-red); color: #FFFFFF; transform: scale(0.96); }
.share:active .share__ring, .share:active .share__slash { stroke: #FFFFFF; }
.share:focus-visible { outline: none; box-shadow: 0 0 0 5px var(--signal-red); }
@media (hover: hover) {
    .share:hover { box-shadow: 0 0 0 5px var(--signal-red); }
}
@media (prefers-reduced-motion: reduce) {
    .share, .share__slash { transition: none; }
    .share:active { transform: none; }
}

a:focus-visible { outline: none; box-shadow: 0 0 0 5px var(--signal-red); border-radius: 4px; }
