:root {
    --bg: #000;
    --bg-soft: #111;
    --text: #fff;
    --muted: #d2d2d2;
    --panel: #2d2d2d;
    --panel-hover: #414141;
    --brand: #e50914;
    --brand-hover: #b80610;
    --border: rgba(255, 255, 255, 0.45);
    --focus: #77b7ff;
    --radius: 0.4rem;
    --max-width: 72rem;
}

html[data-theme="light"] {
    --bg: #f5f7fb;
    --bg-soft: #ffffff;
    --text: #171717;
    --muted: #4d5562;
    --panel: #e8ebf1;
    --panel-hover: #dce1ea;
    --border: rgba(23, 23, 23, 0.22);
    --focus: #145ce6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
    text-rendering: optimizeLegibility;
}

.skip-link,
a,
button,
input {
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.skip-link {
    position: absolute;
    top: -2.5rem;
    left: 0.75rem;
    background: #fff;
    color: #000;
    padding: 0.5rem 0.75rem;
    border-radius: 0.2rem;
    z-index: 999;
}

.skip-link:focus-visible {
    top: 0.75rem;
}

.main {
    position: relative;
    min-height: 70vh;
    background-image: url("Assets/Images/bg.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    isolation: isolate;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.78));
    z-index: -1;
}

html[data-theme="light"] .overlay {
    background: linear-gradient(180deg, rgba(245, 247, 251, 0.58), rgba(245, 247, 251, 0.76));
}

.top-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.top-nav.is-scrolled {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

html[data-theme="light"] .top-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.brand img {
    display: block;
    width: clamp(6rem, 14vw, 8.25rem);
}

.brand {
    text-decoration: none;
}

.brand-text {
    display: inline-block;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--brand);
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
}

.hero {
    max-width: 48rem;
    min-height: calc(70vh - 5rem);
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
    font-weight: 900;
}

.hero-subtitle {
    margin: 0;
    font-size: clamp(1.05rem, 2.4vw, 1.45rem);
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.hero-form {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.hero-form input {
    min-height: 3rem;
    width: min(27rem, 100%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: rgba(23, 23, 23, 0.68);
    color: var(--text);
    font-size: 1rem;
    padding: 0.75rem 0.85rem;
}

.hero-form input::placeholder {
    color: #b6b6b6;
}

.hero-form input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-color: var(--focus);
}

.feedback {
    min-height: 1.2rem;
    font-size: 0.9rem;
    margin: 0;
}

.feedback.success {
    color: #8fd7a8;
}

.feedback.error {
    color: #ffc3c3;
}

.btn {
    border: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: var(--radius);
    min-height: 2.5rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-red,
.btn-red-sm {
    border-color: transparent;
    background-color: var(--brand);
}

.btn-red-outline {
    border-color: var(--brand);
    background-color: transparent;
    color: var(--text);
}

.btn-red {
    font-size: 1rem;
    min-width: 9rem;
}

.btn-red:hover,
.btn-red-sm:hover,
.btn-red-outline:hover {
    background-color: var(--brand-hover);
}

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

.separation {
    height: 0.45rem;
    background-color: #232323;
}

html[data-theme="light"] .separation {
    background-color: #d9dfe8;
}

.feature-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 460ms ease, transform 460ms ease;
}

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

.feature {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: center;
    padding: 2.5rem 0;
}

.feature h2 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.8rem, 3.8vw, 3rem);
    line-height: 1.1;
}

.feature p {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    color: var(--muted);
}

.feature-reverse .media-wrap {
    order: 0;
}

.media-wrap {
    position: relative;
    display: grid;
    place-items: center;
}

.media-wrap img {
    width: min(100%, 34.6rem);
    display: block;
    z-index: 2;
}

.media-wrap video {
    position: absolute;
    top: 21%;
    right: 12%;
    width: 74%;
    z-index: 1;
}

.media-static video {
    display: none;
}

.faq {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1rem 3rem;
}

.faq h2 {
    margin: 0 0 1.5rem;
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.faq-list {
    display: grid;
    gap: 0.6rem;
}

.faq-item {
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-trigger {
    width: 100%;
    text-align: left;
    border: 0;
    background: var(--panel);
    color: var(--text);
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-trigger:hover {
    background: var(--panel-hover);
}

.faq-icon {
    font-size: 1.7rem;
    line-height: 1;
}

.faq-panel {
    max-height: 0;
    overflow: hidden;
    background: #1f1f1f;
    transition: max-height 250ms ease;
}

.faq-panel p {
    margin: 0;
    padding: 1rem 1.2rem 1.3rem;
    color: var(--muted);
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.question {
    margin: 0 0 1.5rem;
}

.question a {
    color: var(--text);
}

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

.footer-item {
    display: grid;
    gap: 0.8rem;
}

.footer-item a {
    color: #cccccc;
    text-decoration-thickness: 0.08rem;
    text-underline-offset: 0.15rem;
    font-size: 0.88rem;
}

.footer-item a:hover {
    color: #fff;
}

html[data-theme="light"] .footer-item a:hover {
    color: #111;
}

.copyright {
    margin: 1.6rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

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

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    max-width: 18rem;
    background: rgba(21, 21, 21, 0.95);
    color: #fff;
    border: 1px solid #3b3b3b;
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    opacity: 0;
    transform: translateY(0.65rem);
    pointer-events: none;
}

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

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 4.4rem;
    z-index: 990;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.78);
    color: var(--text);
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

html[data-theme="light"] .back-to-top {
    background: rgba(255, 255, 255, 0.92);
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    display: grid;
    place-items: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 200ms ease;
}

.modal-backdrop:not(.is-open):not(.is-closing) {
    pointer-events: none;
}

.auth-modal {
    width: min(100%, 30rem);
    background: #141414;
    border: 1px solid #303030;
    border-radius: 0.75rem;
    padding: 1.1rem;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
}

.modal-backdrop.is-open {
    opacity: 1;
}

.modal-backdrop.is-open .auth-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-backdrop.is-closing {
    opacity: 0;
}

.modal-backdrop.is-closing .auth-modal {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
}

.modal-close {
    border: 0;
    background: transparent;
    color: #ddd;
    font-size: 1.55rem;
    line-height: 1;
    margin-left: auto;
    display: block;
    cursor: pointer;
}

.modal-close:hover {
    color: #fff;
}

.auth-modal h2 {
    margin: 0.2rem 0 0.3rem;
}

.auth-prompt {
    margin: 0 0 0.8rem;
    color: #bbbbbb;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.auth-tab {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: var(--radius);
    min-height: 2.4rem;
    cursor: pointer;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.12);
}

.auth-tab.is-active {
    border-color: var(--brand);
    background: rgba(229, 9, 20, 0.18);
}

.auth-form {
    display: grid;
    gap: 0.55rem;
}

.auth-form label {
    font-size: 0.88rem;
    color: #d8d8d8;
}

.auth-form input {
    min-height: 2.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #1b1b1b;
    color: var(--text);
    padding: 0.6rem 0.75rem;
}

.auth-form input:focus-visible {
    border-color: var(--focus);
}

.auth-submit {
    margin-top: 0.35rem;
}

.auth-links {
    margin: 0.85rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.auth-links a {
    color: #d7d7d7;
    font-size: 0.85rem;
    text-decoration-thickness: 0.08rem;
    text-underline-offset: 0.15rem;
}

.auth-links a:hover {
    color: #fff;
}

.btn[disabled],
.auth-tab[disabled],
.modal-close[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 61.25rem) {
    .feature {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-reverse .media-wrap {
        order: -1;
    }

    .hero-form {
        flex-direction: column;
        align-items: center;
    }

    .hero-form .btn-red,
    .hero-form input {
        width: min(27rem, 100%);
    }

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

    .nav-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 36rem) {
    .top-nav {
        min-height: 4.6rem;
    }

    .btn {
        min-height: 2.3rem;
        padding: 0.45rem 0.75rem;
        font-size: 0.9rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
