:root {
    color-scheme: light;
    --bg: #f2eadf;
    --bg-strong: #eadbcb;
    --surface: rgba(255, 251, 246, 0.76);
    --surface-strong: rgba(255, 248, 239, 0.92);
    --ink: #193635;
    --ink-soft: #4c625f;
    --line: rgba(25, 54, 53, 0.12);
    --accent: #0f3f3f;
    --accent-bright: #1f7a73;
    --accent-soft: #dff2ec;
    --highlight: #ffbe55;
    --highlight-soft: rgba(255, 190, 85, 0.18);
    --shadow: 0 24px 80px rgba(22, 52, 52, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --content-width: 1160px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 190, 85, 0.34), transparent 30%),
        radial-gradient(circle at 85% 12%, rgba(31, 122, 115, 0.18), transparent 28%),
        linear-gradient(180deg, #f6efe6 0%, #f2eadf 48%, #ece3d8 100%);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.ambient {
    position: fixed;
    inset: auto;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    filter: blur(36px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
    animation: drift 14s ease-in-out infinite alternate;
}

.ambient-left {
    top: 8rem;
    left: -8rem;
    background: rgba(255, 190, 85, 0.28);
}

.ambient-right {
    right: -10rem;
    top: 18rem;
    background: rgba(31, 122, 115, 0.16);
    animation-duration: 18s;
}

.site-header,
.section-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), var(--content-width));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--accent), #134f4f);
    color: #fff6e8;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(15, 63, 63, 0.25);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 0.98rem;
}

.brand-copy span {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.nav-cta,
.button,
.repository-group a,
.feature-card a,
.deploy-card a,
.route-grid a,
.footer-links a {
    transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.repository-group a:hover,
.feature-card a:hover,
.deploy-card a:hover,
.route-grid a:hover,
.footer-links a:hover {
    color: var(--accent-bright);
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.9rem;
    padding: 0.8rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
}

.nav-cta {
    background: var(--accent);
    color: #fff8ee;
}

.nav-cta:hover,
.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #fff8ee;
    box-shadow: 0 18px 38px rgba(15, 63, 63, 0.18);
}

.button-secondary {
    background: rgba(255, 248, 239, 0.88);
    border-color: rgba(15, 63, 63, 0.12);
}

.button-ghost {
    border-color: rgba(15, 63, 63, 0.16);
    background: transparent;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 1.5rem;
    align-items: stretch;
    padding: 4rem 0 1.8rem;
}

.hero-copy,
.hero-panel,
.issue-section,
.feature-card,
.repository-group,
.deploy-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel {
    padding: clamp(1.6rem, 2vw, 2.3rem);
    border-radius: var(--radius-xl);
}

.hero-copy {
    display: flex;
    flex-direction: column;
}

.eyebrow {
    margin: 0 0 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-bright);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: "Fraunces", serif;
    line-height: 1.02;
}

h1 {
    max-width: 14ch;
    font-size: clamp(2.8rem, 6vw, 4.9rem);
}

h1 span {
    display: block;
}

h2 {
    max-width: 15ch;
    font-size: clamp(2.1rem, 4vw, 3.3rem);
}

h3 {
    font-size: 1.6rem;
}

.lead,
.section-heading p,
.issue-section p,
.deploy-card p,
.feature-card p,
.repository-group span,
.signal-copy,
.hero-note,
.site-footer p {
    color: var(--ink-soft);
}

.lead {
    max-width: 58ch;
    margin: 1.2rem 0 0;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.7rem;
}

.hero-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
    background:
        linear-gradient(180deg, rgba(17, 64, 63, 0.95) 0%, rgba(16, 54, 55, 0.92) 100%),
        radial-gradient(circle at top right, rgba(255, 190, 85, 0.18), transparent 30%);
    color: #fef5e8;
}

.signal-card,
.route-grid article,
.hero-note {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.signal-card,
.hero-note {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
}

.signal-label {
    margin: 0;
    color: #ffd88a;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
}

.signal-copy {
    margin: 0.55rem 0 0;
    color: rgba(254, 245, 232, 0.78);
}

.route-grid {
    display: grid;
    gap: 0.9rem;
}

.route-grid article {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
}

.route-grid p {
    margin: 0;
    color: rgba(254, 245, 232, 0.64);
    font-size: 0.88rem;
}

.route-grid a {
    display: inline-block;
    margin-top: 0.25rem;
    color: #fff8e7;
    font-size: 1.1rem;
    word-break: break-word;
}

.hero-note {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(254, 245, 232, 0.82);
}

.pulse {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    flex: none;
    background: #ffd88a;
    box-shadow: 0 0 0 0 rgba(255, 216, 138, 0.5);
    animation: pulse 1.9s infinite;
}

.section-shell {
    padding: 2rem 0;
}

.page-sections-shell {
    padding-top: 2.6rem;
}

.page-sections-tabs {
    display: grid;
    gap: 1rem;
}

.page-section-tablist {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
}

.page-section-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.35rem;
    padding: 0.95rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    color: var(--ink);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.page-section-tab:hover {
    transform: translateY(-1px);
}

.page-section-tab.is-active {
    background: var(--accent);
    border-color: transparent;
    color: #fff8ee;
}

.page-section-tab-featured {
    border-color: rgba(186, 73, 57, 0.24);
    background: linear-gradient(180deg, rgba(255, 238, 234, 0.98) 0%, rgba(255, 247, 243, 0.94) 100%);
    color: #9b3d31;
    box-shadow: 0 20px 40px rgba(186, 73, 57, 0.14);
}

.page-section-tab-featured.is-active {
    background: linear-gradient(180deg, #c85643 0%, #aa4334 100%);
    border-color: transparent;
    color: #fffaf4;
    box-shadow: 0 22px 42px rgba(186, 73, 57, 0.24);
}

.page-section-tab:focus-visible {
    outline: 3px solid rgba(31, 122, 115, 0.28);
    outline-offset: 2px;
}

.page-section-panel[hidden] {
    display: none;
}

.page-section-panel .hero {
    padding: 0.35rem 0 0;
}

.page-section-panels > .chapter-shell {
    margin-top: 0;
}

.chapter-shell {
    position: relative;
    margin-top: 1.3rem;
    padding: 2.2rem clamp(1.2rem, 2vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chapter-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.platform-shell {
    background: linear-gradient(180deg, rgba(223, 242, 236, 0.82) 0%, rgba(255, 251, 246, 0.74) 100%);
}

.first-steps-shell {
    background: linear-gradient(180deg, rgba(231, 237, 255, 0.86) 0%, rgba(249, 244, 238, 0.82) 100%);
}

.repository-section {
    background: linear-gradient(180deg, rgba(255, 245, 224, 0.82) 0%, rgba(255, 250, 244, 0.78) 100%);
}

.deploy-section {
    background: linear-gradient(180deg, rgba(233, 241, 250, 0.82) 0%, rgba(255, 251, 246, 0.76) 100%);
}

.policy-section {
    background: linear-gradient(180deg, rgba(255, 241, 232, 0.88) 0%, rgba(255, 250, 244, 0.82) 100%);
}

.issue-shell {
    background: linear-gradient(180deg, rgba(223, 242, 236, 0.88) 0%, rgba(249, 244, 238, 0.84) 100%);
    color: var(--ink);
    margin-bottom: 2.8rem;
}

.chapter-index {
    display: none;
}

.section-heading {
    display: grid;
    gap: 0.9rem;
    max-width: 48rem;
    margin-bottom: 1.4rem;
}

.section-heading p {
    margin: 0;
}

.feature-grid,
.repository-grid,
.deploy-grid,
.screenshot-grid {
    display: grid;
    gap: 1rem;
}

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

.feature-card,
.repository-group,
.deploy-card {
    padding: 1.4rem;
    border-radius: var(--radius-lg);
}

.feature-card p,
.deploy-card p {
    margin: 0.85rem 0 1rem;
}

.feature-card a,
.deploy-card a {
    color: var(--accent);
    font-weight: 600;
}

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

.repository-group ul {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.repository-group li + li {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.repository-group a {
    display: inline-flex;
    font-weight: 700;
    color: var(--accent);
}

.repository-group span {
    display: block;
    margin-top: 0.2rem;
}

.deploy-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.policy-card {
    padding: 1.4rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.policy-card p {
    margin: 0.85rem 0 1rem;
    color: var(--ink-soft);
}

.policy-card a {
    color: var(--accent);
    font-weight: 600;
}

.policy-card a:hover {
    color: var(--accent-bright);
}

.first-steps-tabs {
    display: grid;
    gap: 1rem;
}

.first-step-tab,
.first-step-panel,
.screenshot-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.first-step-tablist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.first-step-tab {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 1rem 1.05rem;
    border-radius: var(--radius-lg);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.first-step-tab:hover {
    transform: translateY(-1px);
}

.first-step-tab.is-active {
    border-color: rgba(15, 63, 63, 0.18);
    background: linear-gradient(180deg, rgba(223, 242, 236, 0.9) 0%, rgba(255, 251, 246, 0.92) 100%);
}

.first-step-tab:focus-visible {
    outline: 3px solid rgba(31, 122, 115, 0.28);
    outline-offset: 2px;
}

.step-index {
    display: inline-grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    flex: none;
    border-radius: 999px;
    background: rgba(15, 63, 63, 0.08);
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.first-step-tab.is-active .step-index {
    background: var(--accent);
    color: #fff8ee;
}

.first-step-tab-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.first-step-tab-copy strong,
.screenshot-card strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    line-height: 1.25;
}

.first-step-tab-copy span {
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.first-step-panels {
    min-height: 0;
}

.first-step-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.76fr) minmax(320px, 1fr);
    gap: 1rem;
    align-items: start;
    border-radius: var(--radius-lg);
    padding: 1.35rem;
}

.first-step-panel-copy-only {
    grid-template-columns: minmax(0, 1fr);
}

.first-step-panel[hidden] {
    display: none;
}

.first-step-panel-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.first-step-panel-copy h3 {
    margin: 0;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.first-step-panel-copy p,
.screenshot-card figcaption {
    margin: 0.8rem 0 0;
    color: var(--ink-soft);
}

.first-step-panel-copy p a {
    color: var(--accent);
    font-weight: 600;
}

.first-step-panel-copy p a:hover {
    color: var(--accent-bright);
}

.first-step-detail {
    max-width: 52ch;
}

.first-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.first-step-figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    align-self: start;
}

.screenshot-card {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.screenshot-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    padding: 0.75rem;
    border: 0;
    background: linear-gradient(180deg, #0d1424 0%, #121a2d 100%);
    cursor: zoom-in;
}

.screenshot-button:focus-visible {
    outline: 3px solid rgba(31, 122, 115, 0.28);
    outline-offset: -3px;
}

.screenshot-card img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 38rem;
    margin-inline: auto;
}

.screenshot-card figcaption {
    padding: 1rem 1rem 1.1rem;
}

.screenshot-card strong {
    display: block;
    color: var(--ink);
}

.zoom-hint {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 63, 63, 0.78);
    color: #fff8ee;
    font-size: 0.8rem;
    font-weight: 600;
}

.lightbox-dialog {
    position: relative;
    width: min(92vw, 72rem);
    max-width: 72rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: rgba(9, 13, 22, 0.96);
    color: #fff8ee;
}

.lightbox-dialog::backdrop {
    background: rgba(7, 12, 24, 0.76);
    backdrop-filter: blur(4px);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    min-height: 2.5rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff8ee;
    font-weight: 600;
    cursor: pointer;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.lightbox-figure {
    margin: 0;
    padding: 3.9rem 1rem 1.2rem;
    display: grid;
    gap: 0.9rem;
}

.lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    margin-inline: auto;
}

.lightbox-caption {
    max-width: 64ch;
    margin: 0 auto;
    color: rgba(255, 248, 238, 0.82);
    text-align: center;
}

.issue-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.4rem;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow: var(--shadow);
}

.issue-copy {
    max-width: 40rem;
}

.issue-shell .eyebrow {
    color: var(--accent-bright);
}

.issue-shell .button-primary {
    background: var(--highlight);
    color: var(--accent);
    box-shadow: none;
}

.issue-shell .button-secondary {
    background: rgba(255, 248, 239, 0.92);
    border-color: rgba(15, 63, 63, 0.12);
    color: var(--ink);
}

.issue-actions {
    display: grid;
    gap: 0.8rem;
    width: min(100%, 14.5rem);
}

.issue-actions .button {
    width: 100%;
}

.page-section-panels .reveal,
.first-step-panels .reveal {
    animation: none;
    opacity: 1;
    transform: none;
}

.reveal {
    animation: rise 700ms ease both;
}

.reveal:nth-child(2) {
    animation-delay: 80ms;
}

.reveal:nth-child(3) {
    animation-delay: 140ms;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(2rem, -1rem, 0) scale(1.08);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 216, 138, 0.55);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(255, 216, 138, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 216, 138, 0);
    }
}

@media (max-width: 1040px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .hero,
    .feature-grid,
    .policy-grid,
    .repository-grid,
    .deploy-grid,
    .first-step-panel {
        grid-template-columns: 1fr;
    }

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

    .issue-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .issue-actions {
        width: min(100%, 16rem);
    }

    .screenshot-card img {
        max-height: 32rem;
    }
}

@media (max-width: 720px) {
    body {
        background:
            radial-gradient(circle at top left, rgba(255, 190, 85, 0.26), transparent 24%),
            linear-gradient(180deg, #f6efe6 0%, #efe4d7 100%);
    }

    .site-header {
        padding-top: 1rem;
    }

    .hero {
        padding-top: 2rem;
    }

    .button,
    .nav-cta {
        width: 100%;
    }

    .page-section-tablist {
        grid-template-columns: 1fr;
    }

    .first-step-tablist {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .issue-actions,
    .first-step-actions {
        width: 100%;
    }

    .screenshot-button {
        padding: 0.5rem;
    }

    .zoom-hint {
        right: 0.65rem;
        bottom: 0.65rem;
        font-size: 0.74rem;
    }

    .lightbox-figure {
        padding: 3.4rem 0.65rem 0.9rem;
    }

    .chapter-shell {
        padding: 1.6rem 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    .ambient,
    .pulse {
        animation: none !important;
        transition: none !important;
    }
}