:root {
    --bg: #05070b;
    --bg-alt: #10131c;
    --card: #151926;
    --accent: #ff4136;
    --accent-soft: rgba(255, 65, 54, 0.16);
    --accent-strong: rgba(255, 65, 54, 0.7);
    --text: #f6f7fb;
    --muted: #a3adc4;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
    --shadow-poster: 0 24px 70px rgba(0, 0, 0, 0.8);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #151a2a 0, #05070b 55%, #020308 100%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

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

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}

header.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 10px;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #ffe29f 0, #ff6633 40%, #c20047 100%);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
}

.brand-text h1 {
    font-size: 0.98rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
}

.brand-text p {
    margin: 0;
    font-size: 0.68rem;
    color: var(--muted);
    white-space: nowrap;
}

.header-pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(163, 173, 196, 0.38);
    font-size: 0.65rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-pill span.dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #2ecc71;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.26);
}

@media (max-width: 640px) {
    .header-pill {
        display: none;
    }
}

main {
    display: grid;
    gap: 18px;
}

.hero {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.25fr);
}

.hero-copy {
    padding: 16px 16px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(21, 25, 38, 0.96), rgba(10, 12, 20, 0.96));
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
    color: var(--muted);
}

.hero-title {
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0 0 8px;
}

.hero-subtitle {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0 0 14px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--muted);
}

.hero-meta span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-actions a {
    text-decoration: none;
    font-size: 0.82rem;
}

.btn-primary {
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff4136, #ff851b);
    color: #050507;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 16px 35px rgba(255, 65, 54, 0.45);
}

.btn-primary span.icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.btn-ghost {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--muted);
    text-decoration: none;
}

.hero-poster-shell {
    position: relative;
}

.hero-poster-card {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 10px;
    background: radial-gradient(circle at top, #2c2f46 0, #05070b 50%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-poster);
    overflow: hidden;
    transform-origin: center center;
    animation: poster-pop 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both, poster-glow 2.6s ease-in-out 0.9s infinite alternate;
}

.hero-poster-card::before {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: inherit;
    background: radial-gradient(circle at top, rgba(255, 65, 54, 0.3), transparent 55%);
    opacity: 0.4;
    mix-blend-mode: screen;
    pointer-events: none;
}

.poster-link {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
    transform-origin: center center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.poster-link img {
    display: block;
    width: 100%;
    height: auto;
}

.poster-link:hover,
.poster-link:focus-visible {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 133, 27, 0.75);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
}

.poster-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    color: #fefefe;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.poster-badge span.dot-live {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ff4136;
    box-shadow: 0 0 0 4px rgba(255, 65, 54, 0.42);
}

.poster-caption {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--muted);
}

.sections-grid {
    display: grid;
    gap: 16px;
}

.section-card {
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(14, 18, 30, 0.98), rgba(5, 7, 13, 0.98));
    border: 1px solid var(--border-subtle);
    padding: 14px 14px 16px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin: 0;
}

.section-header p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

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

.nav-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: var(--radius-md);
    background: radial-gradient(circle at top left, rgba(255, 133, 27, 0.16), transparent 55%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    color: var(--text);
    font-size: 0.8rem;
    min-height: 72px;
}

.nav-tile span.label {
    font-weight: 600;
}

.nav-tile span.note {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 6px;
}

.nav-tile:nth-child(odd) {
    background: radial-gradient(circle at top right, rgba(119, 221, 255, 0.16), transparent 55%);
}

.nav-tile:active {
    transform: translateY(1px);
}

.docs-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.doc-card {
    border-radius: var(--radius-md);
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.04), rgba(12, 14, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 11px 11px;
}

.doc-card h3 {
    font-size: 0.9rem;
    margin: 0 0 4px;
}

.doc-meta {
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.doc-excerpt {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 7px;
}

.doc-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
}

.doc-actions a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
}

.doc-tagline {
    font-size: 0.7rem;
    color: var(--muted);
}

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

.gallery-item a {
    display: block;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #000;
}

.gallery-item img {
    width: 100%;
    display: block;
    height: auto;
}

.gallery-label {
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--muted);
}

footer {
    margin-top: 10px;
    padding: 10px 2px 2px;
    font-size: 0.7rem;
    color: var(--muted);
    text-align: center;
}

.footer-note {
    opacity: 0.7;
}

/* Generic content styling for inner pages */

.page-content {
    margin-top: 12px;
}

.prose {
    font-size: 0.9rem;
    color: var(--muted);
}

.prose h1,
.prose h2,
.prose h3 {
    color: var(--text);
}

.prose h1 {
    font-size: 1.4rem;
}

.prose h2 {
    font-size: 1.1rem;
}

.prose h3 {
    font-size: 1rem;
}

.prose p {
    margin: 0 0 0.75rem;
}

.prose ul,
.prose ol {
    padding-left: 1.25rem;
    margin: 0 0 0.75rem;
}

.prose li + li {
    margin-top: 0.25rem;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.82rem;
}

.prose th,
.prose td {
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 6px 8px;
}

.prose th {
    background: rgba(255, 255, 255, 0.06);
}

.prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.82em;
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 4px;
    border-radius: 4px;
}

.prose a {
    color: var(--accent);
}

.back-row {
    margin-top: 12px;
}

.back-row a {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
}

@keyframes poster-pop {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.94) rotate(-0.8deg);
    }
    45% {
        opacity: 1;
        transform: translateY(-6px) scale(1.03) rotate(0.3deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes poster-glow {
    0% {
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9), 0 0 0 0 rgba(255, 65, 54, 0.0);
    }
    50% {
        box-shadow: 0 24px 80px rgba(0, 0, 0, 1), 0 0 25px 0 rgba(255, 133, 27, 0.42);
    }
    100% {
        box-shadow: 0 16px 58px rgba(0, 0, 0, 0.96), 0 0 0 0 rgba(255, 65, 54, 0);
    }
}

@media (min-width: 720px) {
    .page {
        padding: 20px 24px 32px;
    }

    header.site-header {
        margin-bottom: 20px;
    }

    .hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
        align-items: stretch;
    }

    .hero-copy {
        padding: 18px 18px 20px;
    }

    .hero-title {
        font-size: 1.65rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .sections-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    }

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

@media (min-width: 960px) {
    header.site-header {
        padding-inline: 18px;
    }

    .hero-copy {
        padding: 20px 22px 22px;
    }
}
