@import url("/media/st-core.css");

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-ui);
    color: var(--st-ink);
    background-image:
        radial-gradient(circle at 9% 8%, rgba(111, 91, 115, 0.12), transparent 32%),
        radial-gradient(circle at 90% 88%, rgba(66, 86, 74, 0.14), transparent 36%),
        repeating-linear-gradient(100deg,
            rgba(255, 255, 255, 0.52) 0,
            rgba(255, 255, 255, 0.52) 1px,
            rgba(247, 244, 239, 0.62) 1px,
            rgba(247, 244, 239, 0.62) 11px),
        linear-gradient(165deg, #f3efe9 0%, var(--st-white) 55%, #ece4db 100%);
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 2.5vw, 2rem);
    width: min(100% - 2rem, 72rem);
    margin: 0 auto;
    padding: clamp(1.1rem, 3.5vw, 2.4rem) 0 clamp(1rem, 2.5vw, 2rem);
}

/* Strip the large default section padding from st-core for structural wrapper
   sections; card sections keep their own padding via their own class. */
.site-shell > section:not(.st-surface-card),
.site-shell > header:not(.st-surface-card),
.site-shell > aside:not(.st-surface-card),
.site-shell>footer {
    padding-block: 0;
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.8rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.site-nav a {
    border-radius: var(--radius-pill);
    border: 1px solid color-mix(in srgb, var(--st-line-strong) 70%, white);
    background: color-mix(in srgb, white 82%, var(--st-parchment));
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: color-mix(in srgb, var(--st-ink) 88%, white);
    padding: 0.45rem 0.9rem;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.site-nav a:hover {
    border-color: color-mix(in srgb, var(--st-plum) 45%, var(--st-line-strong));
    background: color-mix(in srgb, white 73%, var(--st-plum));
}

.site-nav a:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--st-plum) 70%, white);
    outline-offset: 2px;
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: clamp(1rem, 3vw, 2.4rem);
    align-items: center;
    padding: clamp(1.2rem, 2.5vw, 2rem);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -18% auto auto -8%;
    width: min(48vw, 22rem);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(111, 91, 115, 0.16), transparent 67%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

h1 {
    margin: 0.5rem 0 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    max-width: 15ch;
    text-wrap: balance;
}

h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.015em;
    font-size: clamp(1.85rem, 4vw, 3rem);
    text-wrap: balance;
}

.lead {
    margin: 1rem 0 0;
    font-size: clamp(1rem, 0.9rem + 0.38vw, 1.14rem);
    line-height: 1.7;
    color: color-mix(in srgb, var(--st-ink) 84%, white);
    max-width: 52ch;
}

.hero-actions {
    margin-top: 1.6rem;
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.hero-actions .st-pill-link,
.card-actions .st-pill-link {
    margin-top: 0;
}

.st-pill-link.primary {
    background: var(--st-field);
    border-color: color-mix(in srgb, var(--st-field) 72%, black);
    color: var(--st-white);
}

.st-pill-link.primary:hover {
    background: color-mix(in srgb, var(--st-field) 86%, black);
}

.hero-mark {
    display: grid;
    place-items: center;
    padding: 0.8rem;
}

.hero-mark img {
    width: min(100%, 420px);
    height: auto;
    filter: drop-shadow(0 24px 30px rgba(18, 22, 20, 0.12));
    animation: rise-in 700ms ease both;
}

.launch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 2vw, 1.25rem);
}

.launch-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - clamp(0.425rem, 1vw, 0.625rem));
}

.launch-card {
    padding: clamp(1rem, 2vw, 1.4rem);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.launch-card p {
    margin: 0;
    max-width: 56ch;
    line-height: 1.64;
    color: color-mix(in srgb, var(--st-ink) 84%, white);
}

.text-link {
    margin-top: 0.25rem;
    width: fit-content;
    color: var(--st-field);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--st-field) 36%, transparent);
    padding-bottom: 0.1rem;
    transition: color 150ms ease, border-color 150ms ease;
}

.text-link:hover {
    color: var(--st-ink);
    border-color: currentColor;
}

.card-actions {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.site-footer {
    margin-top: auto;
    padding: 0.95rem 0.1rem 0;
    border-top: 1px solid var(--st-line);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: color-mix(in srgb, var(--st-field) 85%, white);
    letter-spacing: 0.03em;
}

.media-page .site-shell,
.private-page .site-shell {
    gap: 1rem;
}

.page-header {
    margin-top: 0.2rem;
    padding: clamp(1rem, 2.4vw, 1.4rem);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.8rem;
}

.page-header h1 {
    font-size: clamp(2.2rem, 5vw, 3.7rem);
    max-width: 16ch;
}

.section-heading {
    margin-top: 1.6rem;
    margin-bottom: 0.65rem;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
}

.media-grid,
.podcast-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 1.9vw, 1.1rem);
}

.media-card,
.podcast-card,
.show-hero,
.private-card,
.note-card {
    padding: clamp(1rem, 2.2vw, 1.45rem);
}

.media-card h2,
.podcast-card h2,
.show-hero h2,
.private-card h2 {
    margin-top: 0.35rem;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.media-card p,
.podcast-card p,
.show-hero p,
.private-card p,
.note-card p {
    margin: 0.7rem 0 0;
    max-width: 64ch;
    color: color-mix(in srgb, var(--st-ink) 84%, white);
}

.sides-artwork {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(0.85rem, 2vw, 1.25rem);
    align-items: start;
}

.sides-artwork img {
    display: block;
    width: 100%;
    height: auto;
    max-height: clamp(300px, 55vh, 560px);
    object-fit: contain;
    border-radius: var(--radius-md);
}

.meta-row {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--st-line) 85%, white);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    padding: 0.28rem 0.62rem;
    color: color-mix(in srgb, var(--st-field) 84%, white);
    background: color-mix(in srgb, white 86%, var(--st-parchment));
}

.site-shell ul {
    list-style: none;
    padding: 0;
    margin: 0.85rem 0 0;
}

.site-shell li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--st-line);
    line-height: 1.6;
    max-width: 68ch;
}

.site-shell li:first-child {
    padding-top: 0;
}

.site-shell li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.note-card {
    margin-top: 0.85rem;
    border: 1px dashed color-mix(in srgb, var(--st-line-strong) 75%, white);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--st-white) 65%, var(--st-parchment));
}

.book-extract {
    margin: 0.9rem 0 0;
    padding: clamp(0.95rem, 1.9vw, 1.2rem);
    border-left: 4px solid color-mix(in srgb, var(--st-plum) 58%, var(--st-line-strong));
    border-radius: var(--radius-sm);
    background:
        linear-gradient(160deg,
            color-mix(in srgb, white 86%, var(--st-parchment)),
            color-mix(in srgb, white 92%, var(--st-plum)));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 10px 22px rgba(18, 22, 20, 0.06);
}

.book-extract p {
    margin: 0;
    max-width: 72ch;
    line-height: 1.72;
}

.book-extract p + p {
    margin-top: 0.8rem;
}

.breadcrumbs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    color: color-mix(in srgb, var(--st-field) 84%, white);
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--st-field) 28%, transparent);
}

.breadcrumbs a:hover {
    color: var(--st-ink);
    border-bottom-color: currentColor;
}

.private-ribbon {
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--st-plum) 35%, var(--st-line));
    background: linear-gradient(90deg,
            color-mix(in srgb, var(--st-plum) 20%, white),
            color-mix(in srgb, var(--st-field) 14%, white));
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--st-ink) 88%, white);
}

.script-shell {
    margin-top: 0.85rem;
    border: 1px solid var(--st-line);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, white 83%, var(--st-parchment));
    overflow: hidden;
}

.script-shell header {
    border-bottom: 1px solid var(--st-line);
    padding: 0.75rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.script-shell h3 {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 0.96rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.script-shell p {
    margin: 0;
    color: color-mix(in srgb, var(--st-field) 82%, white);
    font-size: 0.84rem;
}

pre {
    overflow-x: auto;
    min-width: 0;
    margin: 0;
    padding: 0.95rem;
    font-size: 0.83rem;
    line-height: 1.52;
    color: color-mix(in srgb, var(--st-ink) 88%, black);
    background: color-mix(in srgb, white 84%, var(--st-parchment));
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 3vw, 2.5rem);
    background:
        radial-gradient(circle at 12% 8%, rgba(111, 91, 115, 0.16), transparent 38%),
        radial-gradient(circle at 88% 88%, rgba(66, 86, 74, 0.2), transparent 42%),
        linear-gradient(162deg, #f4f0ea 0%, var(--st-white) 54%, #eee7de 100%);
}

.error-container {
    width: min(100%, 42rem);
}

.error-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 2.6vw, 2.25rem);
    border: 1px solid color-mix(in srgb, var(--st-line) 74%, white);
    border-radius: clamp(1.1rem, 2vw, 1.6rem);
    backdrop-filter: blur(5px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 16px 42px rgba(18, 22, 20, 0.12);
    animation: rise-in 500ms cubic-bezier(0.18, 0.79, 0.22, 1) both;
}

.error-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -32% auto;
    width: min(56vw, 16rem);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(111, 91, 115, 0.18), transparent 64%);
    pointer-events: none;
}

.error-card .kicker {
    color: color-mix(in srgb, var(--st-field) 78%, black);
    letter-spacing: 0.2em;
}

.error-card h1 {
    margin: 0.7rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(3.3rem, 11vw, 6.2rem);
    line-height: 0.85;
    letter-spacing: -0.03em;
    color: color-mix(in srgb, var(--st-ink) 78%, var(--st-plum));
    text-shadow: 0 10px 22px rgba(18, 22, 20, 0.1);
}

.error-card .message {
    margin-top: 1rem;
    font-size: clamp(1rem, 0.92rem + 0.35vw, 1.15rem);
    line-height: 1.68;
    max-width: 34ch;
    color: color-mix(in srgb, var(--st-ink) 84%, white);
}

.error-actions {
    margin-top: 1.35rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 0.95rem;
}

.error-actions .st-pill-link {
    margin-top: 0;
    padding-inline: 1.25rem;
    border-color: color-mix(in srgb, var(--st-line-strong) 80%, var(--st-plum));
    background: color-mix(in srgb, white 80%, var(--st-plum));
}

.error-secondary-link {
    font-size: 0.94rem;
    color: color-mix(in srgb, var(--st-field) 70%, black);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--st-field) 36%, transparent);
    padding-bottom: 0.12rem;
    transition: color 160ms ease, border-color 160ms ease;
}

.error-secondary-link:hover {
    color: var(--st-ink);
    border-color: currentColor;
}

.error-secondary-link:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--st-plum) 70%, white);
    outline-offset: 3px;
    border-radius: 3px;
}

@media (max-width: 560px) {
    .error-card {
        padding: 1.2rem;
    }

    .error-card .message {
        max-width: 100%;
    }

    .error-actions {
        align-items: stretch;
    }

    .error-actions .st-pill-link {
        justify-content: center;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .error-card,
    .hero-mark img {
        animation: none;
    }
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-mark {
        order: -1;
        padding-bottom: 0;
    }

    .hero-mark img {
        width: min(80vw, 360px);
    }

    .launch-grid,
    .media-grid,
    .podcast-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .launch-card:last-child:nth-child(odd) {
        grid-column: unset;
        justify-self: unset;
        width: unset;
    }

    .page-header {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-header {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-nav {
        justify-content: flex-start;
    }

    pre {
        font-size: 0.74rem;
    }
}

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 1.25rem, 72rem);
    }

    h1 {
        font-size: clamp(2.2rem, 10.5vw, 3.3rem);
    }

    .hero,
    .page-header,
    .launch-card,
    .media-card,
    .podcast-card,
    .show-hero,
    .private-card,
    .note-card {
        padding: 1rem;
    }
}