:root {
    --color-bg: #ffffff;
    --color-surface: #f8fafc;
    --color-surface-2: #eef2ff;
    --color-ink: #0f172a;
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-border: #e2e8f0;
    --color-accent: #2563eb;
    --color-accent-2: #1d4ed8;
    --color-accent-glow: rgba(37, 99, 235, 0.34);
    --color-tag: #ecfeff;
    --color-tag-text: #0c4a6e;
    --color-overlay: rgba(2, 6, 23, 0.6);
    --color-white: #ffffff;
    --color-footer-bg: #0f172a;
    --color-footer-text: #cbd5e1;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 999px;

    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-heading: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

:root.theme-dark, .theme-dark {
    --color-bg: #020617;
    --color-surface: #1e293b;
    --color-surface-2: #334155;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #475569;
    --color-footer-bg: #0f172a;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: background-color 200ms, color 200ms;
}

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

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-heading);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 200ms;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus-visible {
    top: 0;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow 200ms;
}

.site-nav.is-scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-dark .site-nav {
    background-color: var(--color-surface);
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    gap: var(--space-8);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.brand-divider {
    width: 1px;
    height: 2rem;
    background-color: var(--color-border);
}

.tagline {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.theme-switcher {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 200ms;
}

.theme-switcher:hover,
.theme-switcher:focus-visible {
    color: var(--color-accent);
}

.logo-left {
    height: 2.5rem;
    width: auto;
}

.logo-right {
    height: 2rem;
    width: auto;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: var(--space-16) 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, var(--color-accent-glow) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.hero-eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-title span {
    color: var(--color-accent);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-accent-2);
    box-shadow: 0 8px 16px var(--color-accent-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover {
    background-color: var(--color-surface-2);
}

.theme-switcher {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 200ms;
}

.theme-switcher:hover,
.theme-switcher:focus-visible {
    color: var(--color-accent);
}

.hero-caption {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.hero-media-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.hero-media {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.hero-media > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms;
}

.hero-media:hover > img {
    transform: scale(1.05);
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-overlay);
    opacity: 0;
    transition: opacity 300ms;
}

.play-ring {
    width: 4rem;
    height: 4rem;
    border: 3px solid var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.hero-media:hover .play-ring {
    animation: pulse 1.5s infinite;
}

.play-ring svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-white);
    margin-left: 4px;
}

.video-length {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.hero-anim {
    animation: heroFadeUp 600ms ease-out forwards;
}

.hero-step-1 {
    animation-delay: 100ms;
}

.hero-step-2 {
    animation-delay: 200ms;
}

.hero-step-3 {
    animation-delay: 300ms;
}

.hero-step-4 {
    animation-delay: 400ms;
}

.hero-step-5 {
    animation-delay: 500ms;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-head {
    margin-bottom: var(--space-12);
}

.section-sub {
    font-size: 0.875rem;
    color: var(--color-accent);
    text-transform: uppercase;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-8);
    list-style: none;
    margin: 0;
    padding: 0;
}

.card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 300ms ease;
}

.card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-4px);
}

.thumb {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms;
}

.thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-overlay);
    opacity: 0;
    transition: opacity 300ms;
}

.thumb-play-badge {
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-play svg {
    width: 1rem;
    height: 1rem;
    color: var(--color-white);
    margin-left: 2px;
}

.card:hover .thumb img {
    transform: scale(1.05);
}

.card:hover .thumb-play {
    opacity: 1;
}

.meta-line {
    display: flex;
    gap: var(--space-2);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    transition: color 200ms;
}

.card:hover .card-title {
    color: var(--color-accent);
}

.card-sub {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.duration-chip {
    display: inline-block;
    background: var(--color-tag);
    color: var(--color-tag-text);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-12);
    flex-wrap: wrap;
    gap: var(--space-8);
}

.social {
    display: flex;
    gap: var(--space-4);
}

.social a {
    color: var(--color-footer-text);
    transition: color 200ms;
}

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

.social svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-white);
    margin-bottom: var(--space-4);
}

.footer-col p,
.footer-col a,
.footer-col address {
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-col a:hover {
    color: var(--color-accent);
}

.footer-col p + p,
.footer-col p + address,
.footer-col a + a,
.footer-col a + p {
    margin-top: var(--space-2);
}

address {
    font-style: normal;
    line-height: 1.8;
    font-size: 0.875rem;
}

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

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms;
}

.modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--color-overlay);
    cursor: pointer;
}

.modal-dialog-wrap {
    position: relative;
    z-index: 10;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-dialog {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    text-align: center;
    transform: scale(0.9);
    transition: transform 300ms;
}

.modal.is-open .modal-dialog {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background-color 200ms;
}

.modal-close:hover {
    background-color: var(--color-surface);
}

.modal-logo {
    height: 3rem;
    width: auto;
}

.modal-pill {
    display: inline-block;
    background: var(--color-surface-2);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.modal-text {
    font-size: 1rem;
    color: var(--color-text-muted);
}

@media (max-width: 700px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .nav-row {
        flex-direction: column;
        gap: var(--space-4);
    }

    .brand-wrap {
        width: 100%;
    }

    .tagline {
        display: none;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 479px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: var(--space-16) 0;
    }

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

    .cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .container {
        padding: 0 var(--space-8);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
}
