* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    overflow-x: hidden;
    background: var(--bg-primary);
}

/* ── Navigation ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.navbar-brand::after {
    content: "♞";
    color: var(--color-primary);
    margin-left: 0.4rem;
}

.navbar-right {
    display: flex;
    gap: 1rem;
}

/* ── Hero ── */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #0a0a0f;
}

/* Animated chess board background */
.hero-board {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    opacity: 0.13;
    pointer-events: none;
}

.hero-board-cell {
    transition: opacity 1.2s ease, filter 1.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-board-cell.light {
    background: #f0d9b5;
}

.hero-board-cell.dark {
    background: #b58863;
}

.hero-board-cell.pulse {
    opacity: 0.35;
    filter: brightness(1.4);
}

.hero-board-cell img.board-piece {
    width: 70%;
    height: 70%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    filter: brightness(0) invert(1);
}

.hero-board-cell img.board-piece.visible {
    opacity: 0.55;
}

/* Glowing orb */
.hero-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.18) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: orbPulse 6s ease-in-out infinite;
}

@keyframes orbPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.7;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.35);
    color: var(--color-primary-light);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 1.25rem;
}

.hero-content h1 .accent {
    color: var(--color-primary);
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.btn-hero-primary {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 45px rgba(249, 115, 22, 0.6);
}

.btn-hero-ghost {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    backdrop-filter: blur(6px);
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Feature pills row */
.feature-pills {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    transition: background 0.2s, border-color 0.2s;
}

.feature-pill:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(249, 115, 22, 0.4);
}

.feature-pill .pill-icon {
    font-size: 1.1rem;
}

/* Scroll indicator */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.scroll-hint:hover {
    color: rgba(255, 255, 255, 0.7);
}

.scroll-hint:hover .scroll-arrow {
    border-color: rgba(255, 255, 255, 0.7);
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
    animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: rotate(45deg) translateY(5px);
        opacity: 0.9;
    }
}

/* ── Why Schaaks section ── */
.why-section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.section-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 3.5rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 0;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid rgba(128, 128, 128, 0.12);
    padding: 2rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    opacity: 0;
    transition: opacity 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ── CTA banner ── */
.cta-section {
    padding: 5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0a00 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    position: relative;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    position: relative;
}

/* ── Footer strip ── */
.footer-strip {
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(128, 128, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-strip a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-strip a:hover {
    color: var(--color-primary);
}

.footer-strip-sep {
    opacity: 0.3;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.login-container {
    width: 100%;
    max-width: 450px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    position: relative;
    padding: var(--space-md);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-tertiary);
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chess-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    display: flex;
}

.chess-pattern div {
    flex: 1;
    height: 100%;
}

.chess-pattern div:nth-child(odd) {
    background-color: var(--color-primary);
}

.chess-pattern div:nth-child(even) {
    background-color: var(--color-gray-900);
}

.forms-container {
    position: relative;
    width: 100%;
    padding: var(--space-2xl);
    overflow: hidden;
}

.toggle-container {
    display: flex;
    margin-bottom: var(--space-2xl);
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    position: relative;
    margin-top: var(--space-lg);
}

.toggle-btn {
    flex: 1;
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    font-weight: var(--font-semibold);
    z-index: 1;
    transition: color var(--transition-base);
    color: var(--text-secondary);
}

.toggle-btn.active {
    color: var(--color-white);
}

.toggle-indicator {
    position: absolute;
    height: 100%;
    width: 50%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    top: 0;
    left: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.signup-form {
    display: none;
    opacity: 0;
    transform: translateX(50px);
}

.login-form {
    opacity: 1;
    transform: translateX(0);
}

form {
    transition: opacity var(--transition-base), transform var(--transition-slow);
}

.logo {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.logo h1 {
    font-size: var(--text-3xl);
    color: var(--text-primary);
    margin-bottom: 0;
}

.logo h1::after {
    content: "♞";
    color: var(--color-primary);
    margin-left: var(--space-xs);
}

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-tertiary);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.forgot-password {
    margin-top: var(--space-lg);
    text-align: center;
    margin-bottom: var(--space-sm);
}

/* Verification Modal Styles */
.verification-content {
    text-align: center;
}

.verification-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 2rem 0;
}

.code-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.code-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.resend-link {
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .content-section {
        padding: 3rem 1rem;
    }
}