/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

:root {
    /* Dark Color Palette */
    --color-primary: #FFFFFF; /* primaryDark */
    --color-on-primary: #2F3131;
    --color-primary-container: #060707;
    --color-on-primary-container: #999999;
    --color-secondary: #C8C6C5;
    --color-on-secondary: #303030;
    --color-secondary-container: #3D3D3D;
    --color-on-secondary-container: #D2D0D0;
    --color-tertiary: #CAC5C8;
    --color-on-tertiary: #313032;
    --color-tertiary-container: #070608;
    --color-on-tertiary-container: #9C989B;
    --color-error: #FFB4AB;
    --color-on-error: #690005;
    --color-background: #141313;
    --color-on-background: #E5E2E1;
    --color-surface: #141313;
    --color-on-surface: #E5E2E1;
    --color-surface-variant: #434747;
    --color-on-surface-variant: #C4C7C7;
    --color-outline: #8E9191;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.23);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.32);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.38);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s cubic-bezier(0.55, 0.06, 0.68, 0.19);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Premium gradient, taken from the mobile app (premiumGradientStart -> premiumGradientEnd in Gradient.kt) */
    --premium-0: #0077B6;
    --premium-100: #00BFA5;
    --premium-gradient: linear-gradient(90deg, var(--premium-0) 0%, var(--premium-100) 100%);
    /* Lighter tints of the same two colours, for gradient text on the dark background */
    --premium-text-gradient: linear-gradient(90deg, #4FC3F7 0%, #5EEAD4 100%);

    /* Fixed header height; anchors scroll to just below it */
    --header-h: 4.25rem;

    --phone-w: 280px;
}

html {
    scroll-behavior: smooth;
    /* Native anchor scrolling stops below the fixed header */
    scroll-padding-top: var(--header-h);
    background-color: #141313;
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--color-on-background);
    background: linear-gradient(to bottom, #141313 0%, #1a1a1a 100%);
    line-height: 1.6;
    overflow-x: hidden; /* fallback for browsers without `clip` */
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

main {
    flex: 1;
}

/* Sections carry generous top padding; land a little inside it so the heading sits right under the header */
#features,
#download {
    scroll-margin-top: -2rem;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* === NAVIGATION === */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background var(--transition-base), box-shadow var(--transition-base);
    background: rgba(20, 19, 19, 0.75);
    box-shadow: var(--shadow-sm);
}

/* The blur lives on a pseudo-element: backdrop-filter on the header itself would turn it into the
   containing block for the fixed mobile menu and clip the menu to the header's height. */
.nav-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(20, 19, 19, 0);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.nav-header.scrolled {
    background: rgba(20, 19, 19, 0.92);
    box-shadow: var(--shadow-md);
}

.nav-header.scrolled::before {
    opacity: 1;
}

.nav-container {
    max-width: 1200px;
    height: var(--header-h);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo-icon {
    height: 1.8rem;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-on-background);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-outline);
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-secondary);
}

.nav-links a:hover::after {
    width: 100%;
    background: var(--color-secondary);
}

/* Current section (scroll-spy) / current page */
.nav-links a.active,
.nav-links a[aria-current] {
    color: var(--color-primary);
}

.nav-links a.active::after,
.nav-links a[aria-current]::after {
    width: 100%;
    background: var(--color-primary);
}

/* === LANGUAGE PICKER === */
.nav-lang {
    display: flex;
    align-items: center;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-on-background);
    background-color: var(--color-surface-variant);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C4C7C7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    border: 1px solid var(--color-outline);
    border-radius: 8px;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    cursor: pointer;
    color-scheme: dark;
    transition: border-color var(--transition-fast);
}

.lang-select:hover,
.lang-select:focus-visible {
    border-color: var(--color-primary);
    outline: none;
}

/* === MOBILE TOGGLE === */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Dims the page behind the open mobile menu; tapping it closes the menu */
.nav-backdrop {
    display: none;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    position: relative;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Hamburger active state */
.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* === HERO SECTION === */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-h) + var(--spacing-md)) var(--spacing-md) var(--spacing-xl);
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 0%, #1f1e1e 40%, transparent 100%), var(--color-background);
}

/* Animated background particles */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.025);
    animation: float 20s infinite ease-in-out;
}

.particle-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.particle-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 80%;
    animation-delay: 3s;
    animation-duration: 30s;
}

.particle-3 {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.particle-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 70%;
    animation-delay: 9s;
    animation-duration: 35s;
}

.particle-5 {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 50%;
    animation-delay: 12s;
    animation-duration: 28s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -50px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -100px) scale(0.9);
        opacity: 0.3;
    }
    75% {
        transform: translate(40px, -70px) scale(1.05);
        opacity: 0.4;
    }
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.hero-content {
    color: var(--color-primary);
    animation: fadeInUp 1s ease-out;
}

.hero-title-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-logo {
    height: 4.5rem;
    width: auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--color-primary) 60%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--color-on-primary-container);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-subtext {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--color-on-primary-container);
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 1s ease-out 0.4s both;
}

.phone-mockup {
    position: relative;
    width: var(--phone-w);
    height: auto;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--color-surface-variant);
    animation: floatPhone 6s ease-in-out infinite;
    transition: transform var(--transition-base);
}

.phone-mockup:hover {
    transform: scale(1.05) rotateY(5deg);
}

.phone-mockup img {
    width: 100%;
    height: auto;
    /* Reserve the space before the (lazy) image loads so anchors don't land off target */
    aspect-ratio: 574 / 1280;
    object-fit: cover;
    display: block;
    border-radius: 30px;
}

@keyframes floatPhone {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    background: var(--color-surface-variant);
    color: var(--color-primary);
    border: 1px solid var(--color-outline);
}

.btn-primary {
    background: var(--color-primary-container);
    color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-secondary-container);
    color: var(--color-secondary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.btn-cta {
    background: var(--color-surface-variant);
    color: var(--color-primary);
    animation: pulse 2s ease-in-out infinite;
}

.btn-cta:hover {
    background: var(--color-secondary-container);
    color: var(--color-secondary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl);
    animation: none;
}

/* Coming Soon / Disabled button styling */
.btn-coming-soon {
    opacity: 0.5;
    color: var(--color-outline);
    background: var(--color-primary-container) !important;
    border: 1px solid var(--color-outline) !important;
}

.btn-coming-soon:hover {
    transform: none !important;
    box-shadow: var(--shadow-md) !important;
    animation: none !important;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 15px 50px rgba(255, 255, 255, 0.15);
    }
}

.btn {
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline-offset: 4px;
}

.btn .ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-effect 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.btn small {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}

.btn strong {
    font-size: 1rem;
    font-weight: 700;
}

/* === FEATURES SECTION === */
.features-section {
    padding: var(--spacing-xl) var(--spacing-md);
}

/* Features and Download read as one section: a single background spans both */
.showcase {
    background: linear-gradient(to bottom, #141313 0%, #201F1F 50%, #141313 100%);
}

.feature-block {
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-content {
    padding: var(--spacing-md);
    color: var(--color-on-background);
}

.feature-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

/* Key words inside headings */
.gradient-text {
    background: var(--premium-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Keeps the gradient continuous when the phrase wraps onto a second line */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.feature-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-on-primary-container);
}

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

.feature-image .phone-mockup {
    animation: none;
    background: var(--color-surface-variant);
}

.feature-image .phone-mockup:hover {
    transform: scale(1.03) rotate(2deg);
}

/* Alternate layout for left/right features */
.feature-right .feature-image {
    order: -1;
}

/* === SCROLL ANIMATIONS === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-left .feature-content {
    transform: translateX(-40px);
}

.feature-left .feature-content.visible {
    transform: translateX(0);
}

.feature-left .feature-image {
    transform: translateX(40px);
}

.feature-left .feature-image.visible {
    transform: translateX(0);
}

.feature-right .feature-content {
    transform: translateX(40px);
}

.feature-right .feature-content.visible {
    transform: translateX(0);
}

.feature-right .feature-image {
    transform: translateX(-40px);
}

.feature-right .feature-image.visible {
    transform: translateX(0);
}

/* === CTA SECTION === */
.cta-section {
    position: relative;
    padding: var(--spacing-xl) var(--spacing-md);
    overflow: hidden;
    text-align: center;
    /* Tall enough that "Download" can scroll its heading to the top instead of stopping at the page end */
    min-height: min(80vh, 40rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-section .cta-container {
    width: 100%;
}

.cta-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* === FOOTER === */
.footer {
    background: #0a0a0a;
    color: var(--color-on-surface-variant);
    padding: var(--spacing-md) var(--spacing-md);
    border-top: 1px solid var(--color-surface-variant);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-on-surface-variant);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

.footer-copyright {
    opacity: 0.7;
    font-size: 0.9rem;
    color: var(--color-outline);
}

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--color-primary);
    background: rgba(61, 61, 61, 0.92);
    border: 1px solid var(--color-outline);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* === PAGE CONTENT (Privacy, Contact, etc.) === */
.page-content {
    max-width: 800px;
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-md);
    color: var(--color-on-background);
}

.page-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(90deg, var(--color-primary) 60%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    overflow-wrap: break-word;
    hyphens: auto;
}

.page-content h2 {
    font-size: 1.5rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

.page-content p {
    margin-bottom: var(--spacing-sm);
    opacity: 0.9;
}

.page-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    color: var(--color-on-background);
}

.page-content ul {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-md);
    list-style-type: disc;
}

.page-content li {
    margin-bottom: var(--spacing-xs);
    opacity: 0.9;
}

.page-content strong {
    color: var(--color-primary);
    font-weight: 600;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-size: 0.95rem;
}

.page-content th,
.page-content td {
    padding: var(--spacing-sm);
    border: 1px solid var(--color-surface-variant);
    text-align: left;
}

.page-content th {
    background-color: var(--color-surface-variant);
    color: var(--color-primary);
    font-weight: 600;
}

.page-content td {
    background-color: rgba(67, 71, 71, 0.3);
}

.back-home {
    display: block;
    width: fit-content;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    text-align: left;
    color: var(--color-on-primary-container);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.back-home:hover {
    color: var(--color-primary);
}

/* Contact Specific */
.contact-center {
    text-align: center;
}

.contact-info {
    background: var(--color-surface-variant);
    padding: var(--spacing-lg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    margin-top: var(--spacing-md);
}

.contact-email {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-block;
    margin-top: var(--spacing-sm);
    transition: color var(--transition-fast);
}

.contact-email:hover {
    color: var(--color-secondary);
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--color-on-primary-container);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 968px) {
    .nav-links {
        gap: var(--spacing-sm);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: var(--spacing-lg);
    }

    .hero-title-group {
        justify-content: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

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

    .hero-image {
        margin-top: var(--spacing-md);
    }

    .feature-block {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }

    .feature-right .feature-image {
        order: 0;
    }

    .feature-title {
        font-size: 2rem;
    }

    .feature-description {
        font-size: 1.1rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    /* Single column: reveal by fading up only. Sideways offsets would push the page wider than the screen. */
    .feature-block .animate-on-scroll {
        transform: translateY(32px);
    }

    .feature-block .animate-on-scroll.visible {
        transform: none;
    }
}

@media (max-width: 640px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .nav-container {
        padding: 0 var(--spacing-sm) 0 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    /* Dropdown sheet under the header: the logo and toggle stay visible and tappable */
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: var(--spacing-xs) 1.25rem calc(var(--spacing-sm) + env(safe-area-inset-bottom));
        background: rgba(20, 19, 19, 0.98);
        border-top: 1px solid var(--color-surface-variant);
        border-radius: 0 0 20px 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
        z-index: 1000;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: var(--header-h) 0 0 0;
        z-index: 999;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s;
    }

    .nav-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links li:not(.nav-lang) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    /* Whole row is the tap target */
    .nav-links li a {
        display: flex;
        align-items: center;
        min-height: 52px;
        font-size: 1.15rem;
        font-weight: 600;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a.active,
    .nav-links a[aria-current] {
        color: var(--color-primary);
        box-shadow: inset 3px 0 0 var(--premium-100);
        padding-left: 0.75rem;
    }

    .nav-lang {
        padding-top: var(--spacing-sm);
    }

    .lang-select {
        width: 100%;
        min-height: 48px;
        font-size: 1rem; /* 16px+ stops iOS Safari zooming in on focus */
    }

    /* Feature blocks: keep text and screenshot within the narrow viewport */
    .features-section,
    .cta-section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .feature-content {
        padding: var(--spacing-xs) 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-logo {
        height: 3rem;
    }

    .hero-tagline {
        font-size: 1.3rem;
    }

    .hero-subtext {
        font-size: 1rem;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .feature-title {
        font-size: 1.75rem;
    }

    .feature-description {
        font-size: 1rem;
    }

    :root {
        --phone-w: 240px;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--spacing-xs);
        align-items: center;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .feature-block {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-left, .feature-right {
        display: flex;
        flex-direction: column;
    }

    .feature-left .feature-content,
    .feature-right .feature-content {
        order: 1;
    }

    .feature-left .feature-image,
    .feature-right .feature-image {
        order: 2;
    }

    .page-content {
        margin-top: 5.5rem;
    }

    .page-content h1 {
        font-size: 1.9rem;
    }

    .contact-email {
        font-size: clamp(0.75rem, 3.6vw, 1.1rem); /* scales so the whole address fits on one line */
        /* Only breaks if it truly can't fit, instead of always splitting mid-address */
        overflow-wrap: anywhere;
    }

    .contact-info {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .footer-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none !important;
    }
}

/* === GRADIENT GLOW BEHIND SCREENSHOTS === */
/* The phone frame clips its own shadow, so the glow sits on the wrapper behind it. */
.hero-image,
.feature-image {
    position: relative;
    isolation: isolate;
}

.hero-image::before,
.feature-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    width: var(--phone-w);
    aspect-ratio: 574 / 1280;
    transform: translate(-50%, -50%) scale(1.03);
    border-radius: 40px;
    background: linear-gradient(160deg, var(--premium-0) 0%, var(--premium-100) 100%);
    filter: blur(50px);
    opacity: 0.16;
    pointer-events: none;
}

/* === PREMIUM ACCENTS === */
/* Store button hover: the same light blue-to-teal glow as behind the screenshots (blue left, teal right) */
.btn-googleplay:hover,
.btn-googleplay:focus-visible {
    box-shadow: -10px 8px 30px rgba(0, 119, 182, 0.28), 10px 8px 30px rgba(0, 191, 165, 0.28);
}

.nav-links a.active::after,
.nav-links a[aria-current]::after,
.nav-links a:hover::after {
    background: var(--premium-gradient);
}

.back-to-top {
    background: var(--premium-gradient);
    border-color: transparent;
}
