:root {
    --bg: #fdf7ef;
    --bg-soft: #f6e9d8;
    --surface: #fffaf2;
    --surface-strong: #f9efe0;
    --text: #3f2410;
    --muted: #7a5a3d;
    --primary: #b97828;
    --primary-strong: #8a5518;
    --accent: #dca753;
    --line: #e7d1b3;
    --shadow: 0 20px 40px #5433131f;
}

:root.dark {
    --bg: #1a1109;
    --bg-soft: #22160d;
    --surface: #2c1c10;
    --surface-strong: #352215;
    --text: #f7e9d6;
    --muted: #d2baa0;
    --primary: #d89c49;
    --primary-strong: #b7772b;
    --accent: #efc06a;
    --line: #5c3f28;
    --shadow: 0 20px 40px #00000057;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Cairo", sans-serif;
    background:
        radial-gradient(920px 520px at 80% -10%, #b9782838, transparent 60%),
        radial-gradient(620px 420px at 10% 95%, #6a40182e, transparent 60%),
        var(--bg);
    color: var(--text);
    line-height: 1.75;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100vw - 2rem));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -50px;
    right: 16px;
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    z-index: 50;
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    backdrop-filter: blur(8px);
}

.nav-row {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-block: 0.75rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    flex: 0 0 auto;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    box-shadow: 0 8px 20px #5a361447;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: clamp(1.2rem, 2.6vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 700;
}

.nav-link:hover {
    border-color: var(--line);
    color: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    min-height: 48px;
    padding: 12px 20px;
    font-weight: 800;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 10px 24px #794a1c57;
}

.btn-secondary {
    border-color: var(--line);
    background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
    color: var(--text);
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
}

.hero {
    padding: clamp(3.5rem, 6vw, 5rem) 0 clamp(3rem, 5vw, 4rem);
}

.hero-inner {
    text-align: center;
}

.hero-logo {
    width: clamp(140px, 24vw, 210px);
    margin: 0 auto 18px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    box-shadow: 0 20px 36px rgba(89, 53, 21, 0.25);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.hero h1 {
    margin: 24px 0 14px;
    font-size: clamp(2rem, 6vw, 3.8rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero p {
    margin: 0 auto;
    width: min(720px, 100%);
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.17rem);
}

.hero-cta {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stats {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.stat-item {
    background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.stat-item dt {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 700;
}

.stat-item dd {
    margin: 6px 0 0;
    font-weight: 800;
    font-size: 0.98rem;
}

.section {
    padding: clamp(3rem, 5vw, 4.5rem) 0;
}

.section-head {
    text-align: center;
    margin-bottom: 30px;
}

.section-kicker {
    margin: 0;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.section-head h2 {
    margin: 10px 0;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.3;
}

.section-head p {
    margin: 0 auto;
    width: min(720px, 100%);
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.feature-card {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px 18px;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.step {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.step-index {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    color: #fff;
    font-weight: 800;
    display: grid;
    place-items: center;
}

.cta-strip {
    margin: 24px auto 80px;
    width: min(1120px, calc(100vw - 2rem));
    border-radius: 30px;
    border: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
    background:
        radial-gradient(620px 220px at 20% 10%, rgba(255, 255, 255, 0.14), transparent 55%),
        linear-gradient(135deg, #8f561e, #4a2d17);
    color: #fff8ed;
    padding: 38px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.cta-strip p {
    color: #f2dcc0;
    margin: 10px auto 0;
    width: min(620px, 100%);
}

.cta-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cta-actions .btn-secondary {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .nav-row {
        align-items: stretch;
    }

    .brand {
        flex: 1 1 100%;
    }

    .nav-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-actions .nav-link,
    .nav-actions .btn {
        flex: 1 1 160px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero p,
    .section-head p,
    .cta-strip p {
        width: min(680px, 100%);
    }
}

@media (max-width: 768px) {
    .site-header {
        position: static;
    }

    .nav-row {
        gap: 12px;
    }

    .brand {
        justify-content: center;
        text-align: center;
    }

    .nav-actions {
        display: grid;
        grid-template-columns: 44px 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .nav-actions .theme-toggle {
        width: 100%;
    }

    .nav-actions .nav-link,
    .nav-actions .btn {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-logo {
        width: 124px;
        margin-bottom: 12px;
    }

    .hero h1 {
        margin-top: 16px;
        font-size: clamp(1.9rem, 7vw, 3rem);
    }

    .hero p {
        font-size: 0.98rem;
        line-height: 1.85;
    }

    .hero-cta,
    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn,
    .cta-actions .btn {
        width: 100%;
    }

    .stats,
    .feature-grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .section-head {
        margin-bottom: 22px;
    }

    .section-head p {
        font-size: 0.98rem;
        line-height: 1.85;
    }

    .feature-card,
    .step,
    .stat-item {
        border-radius: 18px;
        padding: 16px 14px;
    }

    .cta-strip {
        width: min(1120px, calc(100vw - 1rem));
        margin: 18px auto 44px;
        padding: 24px 14px;
        border-radius: 22px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(1120px, calc(100vw - 1.25rem));
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .hero-logo {
        width: 112px;
        border-radius: 18px;
    }

    .hero {
        padding-top: 36px;
    }

    .hero-cta,
    .cta-actions,
    .nav-actions {
        width: 100%;
    }

    .hero-cta .btn,
    .cta-actions .btn,
    .nav-actions .nav-link,
    .nav-actions .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .nav-actions {
        grid-template-columns: 44px 1fr;
    }

    .nav-actions .btn-primary {
        grid-column: 1 / -1;
    }

    .nav-link,
    .btn {
        padding-inline: 16px;
    }

    .hero-logo {
        margin-bottom: 14px;
    }

    .badge {
        max-width: 100%;
        justify-content: center;
    }

    .hero h1 {
        margin-top: 14px;
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero p {
        font-size: 0.95rem;
    }

    .stat-item,
    .feature-card,
    .step {
        padding: 16px 14px;
    }

    .cta-strip {
        border-radius: 24px;
        padding: 22px 14px;
        margin-bottom: 44px;
    }

    .badge {
        padding: 7px 12px;
        font-size: 0.74rem;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(1120px, calc(100vw - 0.9rem));
    }

    .brand-title {
        font-size: 1.02rem;
    }

    .brand-sub {
        font-size: 0.7rem;
    }

    .nav-row {
        min-height: auto;
        padding-block: 0.6rem;
    }

    .nav-actions {
        grid-template-columns: 38px 1fr;
    }

    .theme-toggle {
        height: 38px;
        border-radius: 11px;
        font-size: 0.95rem;
    }

    .hero {
        padding-top: 28px;
    }

    .hero-logo {
        width: 104px;
        border-radius: 16px;
    }

    .skip-link {
        right: 12px;
        left: 12px;
        text-align: center;
    }

    .section-head h2 {
        font-size: 1.45rem;
    }

    .hero h1 {
        font-size: 1.95rem;
    }

    .nav-link,
    .btn {
        min-height: 44px;
        padding-top: 11px;
        padding-bottom: 11px;
        border-radius: 14px;
    }
}