/* General Variables & Reset */
/* Tokens mirror lib/core/theme/app_palette.dart (dark is the default there too). */
:root {
    --primary: #FF6B2C;
    --secondary: #FF9A6B;
    --accent: #FF6B2C;
    --bg-dark: #0E0F11;
    --bg-surface: #17191C;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-main: #ECEEF0;
    --text-muted: #A8AEB6;
    --text-mute-2: #6E757E;
    --glass-border: #26292E;
    --accent-rgb: 255, 107, 44;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Instrument Sans', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Display face — Archivo, per DESIGN.md */
.brand-name,
.hero-title,
.section-title,
.download-title,
.feature-title,
.policy-title {
    font-family: 'Archivo', system-ui, sans-serif;
}

/* Figures — JetBrains Mono, per DESIGN.md */
.mono,
.spec-value,
.set-table,
.counter-num,
.ring-text h4 {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

/* Header & Nav */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(14, 15, 17, 0.72);
    border-bottom: 1px solid var(--glass-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-wrapper svg {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Language Selector Dropdown */
.lang-selector {
    position: relative;
    display: inline-block;
}

.lang-flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.dropdown-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.15);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(23, 25, 28, 0.97);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    list-style: none;
    min-width: 150px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.dropdown-menu.open {
    display: flex;
}

.dropdown-menu li {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: left;
}

.dropdown-menu li:hover {
    background: var(--primary);
    color: #10110F;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: #14100D;
}

.btn-primary:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent);
    background-color: rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    min-height: 80dvh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.badge-accent {
    display: inline-flex;
    align-self: flex-start;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 45%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pas-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 16px;
    line-height: 1.6;
}

.pas-problem {
    color: #F3F5F7;
    font-weight: 500;
}

.pas-agitate {
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
    padding-left: 16px;
}

.pas-solve {
    color: #E6E9EC;
    font-weight: 500;
    background: rgba(var(--accent-rgb), 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed rgba(var(--accent-rgb), 0.25);
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

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

/* Phone Mockup */
.phone-mockup {
    width: 280px;
    height: 560px;
    border: 12px solid #26292E;
    border-radius: 40px;
    background-color: #08090A;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--accent-rgb), 0.2);
    position: relative;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    background: radial-gradient(circle at top, rgba(var(--accent-rgb), 0.14), transparent);
    overflow-y: auto;
}

.phone-screen::-webkit-scrollbar {
    display: none;
}

.phone-app-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Spec Section (verified facts, not marketing claims) */
.spec-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.012);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.spec-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.spec-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.08);
}

.spec-value {
    font-size: 34px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}

.card-tag {
    color: var(--text-mute-2);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.spec-note {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
}

/* Features Section */
.features {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 64px auto;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Download Section */
.download-section {
    padding: 100px 0;
}

.download-box {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.02) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 32px;
    padding: 64px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.download-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.download-text {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 520px;
    line-height: 1.6;
}

.store-buttons {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 28px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
}

.store-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.store-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.store-btn.disabled:hover {
    transform: none;
    border-color: var(--glass-border);
    box-shadow: none;
}

.store-icon {
    flex-shrink: 0;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-btn-text span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.store-btn-text strong {
    font-size: 16px;
    font-weight: 600;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    background-color: rgba(23, 25, 28, 0.5);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-main);
}

/* RTL Layout Adjustments (Arabic) */
html[dir="rtl"] .dropdown-menu {
    left: 0;
    right: auto;
}

html[dir="rtl"] .dropdown-menu li {
    text-align: right;
}

html[dir="rtl"] .pas-agitate {
    border-left: none;
    border-right: 3px solid var(--primary);
    padding-left: 0;
    padding-right: 16px;
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .badge-accent {
        align-self: center;
    }
    .hero-ctas {
        justify-content: center;
    }
    .spec-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
        gap: 16px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .hero-title {
        font-size: 34px;
    }
    .download-box {
        padding: 40px 24px;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .spec-grid {
        grid-template-columns: 1fr;
    }
}

/* Mockup Components */
.mock-card {
    background: rgba(23, 25, 28, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    width: 100%;
}

.mock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-mute-2);
    margin-bottom: 12px;
}

.mock-exercise-name {
    font-family: 'Archivo', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    margin-bottom: 10px;
}

/* Session log table — the app's real SET / REPS / KG layout */
.set-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.set-table th {
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-mute-2);
    text-align: right;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--glass-border);
}

.set-table th:first-child,
.set-table td:first-child {
    text-align: left;
}

.set-table td {
    text-align: right;
    padding: 7px 0;
    color: var(--text-main);
    border-bottom: 1px solid rgba(38, 41, 46, 0.6);
}

.set-table tr:last-child td {
    border-bottom: none;
}

.timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.timer-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.timer-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-mute-2);
}

.counter-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
}

.counter-btn {
    background: var(--accent);
    color: #14100D;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-family: 'Instrument Sans', system-ui, sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.circular-display {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 120px;
}

.ring-svg {
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
}

.ring-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ring-text h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.ring-text p {
    font-size: 9px;
    letter-spacing: 0.10em;
    color: var(--text-mute-2);
}

.bar-chart {
    display: flex;
    justify-content: space-between;
    height: 70px;
    align-items: flex-end;
    gap: 5px;
    margin-bottom: 18px;
}

.chart-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px 4px 0 0;
    position: relative;
}

.chart-bar.active {
    background: var(--accent);
}

.bar-label {
    font-size: 9px;
    color: var(--text-mute-2);
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    text-align: center;
}
