/* ============================================
   uTorrent – Fresh design system
   Primary: deep navy / teal accent / warm neutrals
   ============================================ */
:root {
    --primary: #0c4a6e;
    --primary-hover: #075985;
    --accent: #0d9488;
    --accent-light: #2dd4bf;
    --surface: #f8fafc;
    --surface-alt: #f1f5f9;
    --text: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --max-width: 1140px;
    --header-height: 72px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
}

h1, h2, h3 {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 5rem 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: background 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    border: none;
}

.btn:hover {
    background: #0f766e;
    transform: translateY(-1px);
    color: var(--white);
    text-decoration: none;
}

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

/* Header – dark bar, pill nav items */
header {
    background: linear-gradient(180deg, var(--primary) 0%, #0a3d5c 100%);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.logo img {
    height: 42px;
    filter: brightness(0) invert(1);
}

.nav-actions,
nav .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links {
    list-style: none;
    flex-wrap: wrap;
}

.nav-links li {
    margin: 0;
}

.nav-btn,
.nav-links a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 999px;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-btn:hover,
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    text-decoration: none;
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.download-action {
    background: var(--accent-light);
    color: var(--primary) !important;
    font-weight: 700;
    padding: 12px 24px;
    border: none;
    box-shadow: var(--shadow);
}

.download-action:hover {
    background: var(--white);
    color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Language dropdown */
.lang-dropdown {
    position: relative;
}

.lang-btn {
    padding: 10px 16px;
}

.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    z-index: 1100;
    border: 1px solid var(--border);
}

.lang-menu.active {
    display: block;
}

.lang-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
}

.lang-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background 0.15s;
    border-radius: 0;
}

.lang-menu a:hover {
    background: var(--surface-alt);
    color: var(--primary);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.bar {
    width: 24px;
    height: 2.5px;
    background: var(--white);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .nav-actions,
    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 100%;
        max-width: 320px;
        min-height: calc(100vh - var(--header-height));
        background: var(--primary);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 0.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        box-shadow: -8px 0 24px rgba(0,0,0,0.15);
    }

    .nav-actions.active,
    .nav-links.active {
        transform: translateX(0);
    }

    .nav-btn,
    .nav-links a {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 1.0625rem;
        border-radius: var(--radius);
    }

    .lang-dropdown {
        width: 100%;
    }

    .lang-btn {
        width: 100%;
        justify-content: space-between;
    }

    .lang-menu {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid rgba(255,255,255,0.2);
        background: rgba(0,0,0,0.1);
    }

    .lang-menu a {
        color: rgba(255,255,255,0.95);
    }

    .lang-menu a:hover {
        background: rgba(255,255,255,0.1);
        color: var(--white);
    }

    .menu-toggle {
        display: flex;
    }
}

/* Hero – full-bleed gradient, split layout, large type */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0a3d5c 50%, #0c4a6e 100%);
    padding: 4rem 0 5rem;
    color: var(--white);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    max-width: 560px;
}

.hero-text h1 {
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.hero-text p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

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

.hero-image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Breadcrumbs – minimal bar */
.breadcrumbs-container {
    padding: 1rem 0;
    background: var(--primary);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    gap: 0.25rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    content: "›";
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-item a:hover {
    color: var(--white);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--white);
    font-weight: 600;
}

/* Features – bento-style grid, alternating alignment */
.features-intro {
    text-align: center;
    margin-bottom: 3.5rem;
}

.features-intro .container p,
.features-intro p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

.features-list .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-image img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.feature-text h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-text p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Download section – card style */
.download-section {
    background: var(--surface);
    padding: 5rem 0;
    text-align: center;
}

.download-section h1,
.download-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

.subheadline {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.download-box {
    margin: 2.5rem 0;
    padding: 2.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: inline-block;
    box-shadow: var(--shadow);
}

.btn-large {
    font-size: 1.125rem;
    padding: 18px 36px;
}

.note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.download-info {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Languages – pill grid */
.languages-section {
    background: var(--white);
    padding: 5rem 0;
}

.languages-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.languages-intro h2 {
    margin-bottom: 0.75rem;
}

.languages-intro p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.language-item {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.2s ease;
    background: var(--surface);
}

.language-item:hover {
    border-color: var(--accent);
    background: rgba(13, 148, 136, 0.06);
}

.lang-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.lang-text {
    font-size: 0.8125rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

/* How to Use – numbered cards, left border accent */
.how-to-section,
.speed-up-section {
    background: var(--surface-alt);
    padding: 5rem 0;
}

.how-to-intro,
.speed-up-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.how-to-intro h2,
.speed-up-intro h2 {
    margin-bottom: 0.75rem;
}

.how-to-intro p,
.speed-up-intro p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

.how-to-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}

.step-box:hover {
    box-shadow: var(--shadow-lg);
}

.step-image img {
    height: 52px;
    margin-bottom: 1rem;
}

.step-content h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.speed-up-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.speed-up-list li {
    background: var(--white);
    padding: 1.75rem;
    border-radius: var(--radius);
    border-top: 4px solid var(--accent);
    box-shadow: var(--shadow);
}

.speed-up-list li h3 {
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}

.speed-up-list li p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Technical section */
.technical-section {
    padding: 5rem 0;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.technical-section h2 {
    margin-bottom: 0.5rem;
}

.technical-section > .container > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.code-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.code-block h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.code-block p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.code-block pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
    font-size: 0.875rem;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* FAQ – accordion cards */
.faq-section {
    background: var(--surface);
    padding: 5rem 0;
}

.faq-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.faq-intro h2 {
    margin-bottom: 0.75rem;
}

.faq-intro p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    background: var(--white);
    transition: background 0.15s;
}

.faq-item summary:hover {
    background: var(--surface-alt);
}

.faq-content {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.faq-content p,
.faq-content ul {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-content ul {
    margin-top: 0.75rem;
    padding-left: 1.25rem;
}

.faq-content li {
    margin-bottom: 0.35rem;
    list-style: disc;
}

/* Reviews – marquee */
.reviews-section {
    background: var(--surface-alt);
    padding: 5rem 0;
    overflow: hidden;
}

.reviews-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.reviews-intro h2 {
    margin-bottom: 0.75rem;
}

.reviews-intro p {
    color: var(--text-muted);
}

.reviews-marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-content {
    display: flex;
    width: max-content;
    gap: 1.5rem;
    animation: scroll 45s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.review-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 340px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.review-author {
    font-weight: 600;
    color: var(--primary);
}

.review-date {
    color: var(--text-muted);
}

.review-text {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.6;
}

/* About / Author */
.about-section {
    background: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.about-section h2 {
    margin-bottom: 1.5rem;
}

.author-bio {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: left;
}

.author-info h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.author-title {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.author-bio p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Support (shared) */
.support-content {
    padding: 5rem 0;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.support-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.support-card ul li {
    margin-bottom: 0.5rem;
}

.contact-section {
    text-align: center;
    margin-top: 3rem;
}

/* Footer – dark slate */
footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-logo {
    height: 32px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-content p {
    font-size: 0.9375rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--accent-light);
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.last-updated {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0.5rem 0 0;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-image {
        justify-content: center;
    }

    section {
        padding: 3.5rem 0;
    }
}

/* RTL (Arabic) */
html[dir="rtl"] {
    --direction: rtl;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "‹";
}

html[dir="rtl"] .step-box {
    border-left: none;
    border-right: 4px solid var(--accent);
}

html[dir="rtl"] .speed-up-list li {
    border-top: 4px solid var(--accent);
}

html[dir="rtl"] .copy-btn {
    right: auto;
    left: 12px;
}

@media (max-width: 768px) {
    html[dir="rtl"] .nav-actions,
    html[dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    html[dir="rtl"] .nav-actions.active,
    html[dir="rtl"] .nav-links.active {
        transform: translateX(0);
    }

    html[dir="rtl"] .lang-menu a {
        padding-right: 1.5rem;
        padding-left: 1rem;
    }
}

html[dir="rtl"] .author-bio {
    text-align: right;
}

html[dir="rtl"] .reviews-marquee {
    mask-image: linear-gradient(to left, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to left, transparent, black 8%, black 92%, transparent);
}

html[dir="rtl"] .marquee-content {
    animation: scroll-rtl 45s linear infinite;
}

@keyframes scroll-rtl {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
