/* ========================================
   DriveLogger Website Styles
   ======================================== */

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

:root {
    --bg: #f6f7f4;
    --bg-soft: #ecefe7;
    --surface: #ffffff;
    --surface-alt: #f7f8f5;
    --line: #d7ddd0;
    --ink: #172018;
    --ink-soft: #4f5c50;
    --brand: #be2d23;
    --brand-strong: #8f1f17;
    --brand-soft: #ffe6dd;
    --accent: #1f6a52;
    --shadow-sm: 0 8px 24px rgba(22, 31, 23, 0.08);
    --shadow-md: 0 20px 44px rgba(22, 31, 23, 0.12);
    --shadow-lg: 0 30px 90px rgba(17, 23, 18, 0.18);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --gradient-brand: linear-gradient(135deg, #cb3f31 0%, #921f18 55%, #6f140f 100%);
    --gradient-hero: radial-gradient(circle at 15% 20%, #ffe9dd 0%, rgba(255, 233, 221, 0) 52%),
        radial-gradient(circle at 82% 18%, #dceee4 0%, rgba(220, 238, 228, 0) 48%),
        linear-gradient(160deg, #f9faf6 0%, #edf1e8 45%, #f4f5f1 100%);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background: linear-gradient(180deg, #f8f9f6 0%, #f4f6f2 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    line-height: 1.15;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.hidden {
    display: none !important;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 78px;
    background: rgba(246, 248, 243, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(23, 32, 24, 0.08);
    z-index: 100;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.navbar.scrolled {
    border-bottom-color: rgba(23, 32, 24, 0.14);
    box-shadow: 0 6px 24px rgba(23, 32, 24, 0.1);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    box-shadow: 0 8px 20px rgba(148, 31, 23, 0.22);
}

.brand-name {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    position: relative;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 100%;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.nav-menu a:hover {
    color: var(--brand-strong);
}

.nav-menu a:hover::after {
    transform: scaleX(1);
}

.lang-toggle {
    border: 1px solid rgba(23, 32, 24, 0.22);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: var(--ink);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: 150px 0 112px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    z-index: 0;
    pointer-events: none;
}

.hero::before {
    width: 360px;
    height: 360px;
    right: -100px;
    top: -120px;
    background: radial-gradient(circle, rgba(190, 45, 35, 0.2) 0%, rgba(190, 45, 35, 0) 70%);
}

.hero::after {
    width: 320px;
    height: 320px;
    left: -100px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(31, 106, 82, 0.15) 0%, rgba(31, 106, 82, 0) 72%);
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 58px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(31, 106, 82, 0.25);
    background: rgba(255, 255, 255, 0.7);
    color: #1c5d47;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 8px 14px;
    margin-bottom: 22px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
}

.hero-content h1 {
    font-size: clamp(2.3rem, 5.4vw, 4.1rem);
    font-weight: 700;
    letter-spacing: -1.6px;
    color: #141d16;
    margin-bottom: 20px;
    max-width: 580px;
}

.hero-description {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: #455345;
    margin-bottom: 34px;
    max-width: 560px;
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: all 0.24s ease;
    border: 1px solid transparent;
}

.btn-primary {
    color: #fff;
    background: var(--gradient-brand);
    box-shadow: 0 18px 36px rgba(143, 31, 23, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 42px rgba(143, 31, 23, 0.36);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(23, 32, 24, 0.17);
    color: var(--ink);
}

.btn-outline:hover {
    border-color: var(--ink);
    background: #fff;
    transform: translateY(-2px);
}

.hero-phones {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.phone {
    position: relative;
    will-change: transform;
    transition: transform 0.16s ease-out;
}

.phone::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(234, 240, 232, 0.5));
    border: 1px solid rgba(23, 32, 24, 0.08);
    z-index: -1;
}

.phone img {
    display: block;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.phone-ios {
    z-index: 2;
}

.phone-ios img {
    width: min(350px, 44vw);
}

.phone-android {
    z-index: 1;
    margin-left: -34px;
    margin-bottom: -16px;
}

.phone-android img {
    width: min(275px, 35vw);
}

/* ========================================
   Shared Section Heading
   ======================================== */
.section-header {
    max-width: 680px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-header h2 {
    font-size: clamp(1.95rem, 4vw, 2.85rem);
    letter-spacing: -1px;
    color: #131b15;
    margin-bottom: 14px;
}

.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.08rem);
    color: #4a584b;
    line-height: 1.7;
}

/* ========================================
   Features
   ======================================== */
.features {
    padding: 105px 0;
    background: linear-gradient(180deg, #f4f6f2 0%, #f9faf7 60%, #f3f6ef 100%);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(23, 32, 24, 0.2) 50%, transparent 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    background: linear-gradient(160deg, #ffffff 0%, #f8faf6 100%);
    border: 1px solid rgba(23, 32, 24, 0.08);
    border-radius: var(--radius-md);
    padding: 34px 28px;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(28px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(190, 45, 35, 0.28);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #ca3f31 0%, #8f1f17 100%);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.feature-card p {
    font-size: 0.96rem;
    color: #4c5a4e;
    line-height: 1.68;
}

/* ========================================
   Screenshots
   ======================================== */
.screenshots {
    padding: 105px 0;
    background: #161e18;
    color: #f0f3eb;
    position: relative;
    overflow: hidden;
}

.screenshots::before {
    content: '';
    position: absolute;
    inset: -120px auto auto -140px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(190, 45, 35, 0.22) 0%, rgba(190, 45, 35, 0) 70%);
}

.screenshots::after {
    content: '';
    position: absolute;
    inset: auto -110px -160px auto;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(31, 106, 82, 0.2) 0%, rgba(31, 106, 82, 0) 72%);
}

.screenshots .container {
    position: relative;
    z-index: 1;
}

.screenshots .section-header h2 {
    color: #fff;
}

.screenshots .section-subtitle {
    color: rgba(240, 243, 235, 0.78);
}

.platform-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 42px;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid rgba(240, 243, 235, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(240, 243, 235, 0.85);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-tab:hover {
    border-color: rgba(255, 255, 255, 0.56);
    color: #fff;
}

.platform-tab.active {
    background: #f4f8f1;
    border-color: #f4f8f1;
    color: #121a14;
}

.screenshot-gallery {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.screenshot-gallery::-webkit-scrollbar {
    display: none;
}

.gallery-track {
    display: flex;
    gap: 20px;
    padding: 0 max(24px, calc((100vw - 1140px) / 2));
    width: max-content;
}

.gallery-slide {
    flex-shrink: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbf6 0%, #e7eee4 100%);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    scroll-snap-align: center;
}

.gallery-slide:hover {
    transform: translateY(-7px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
}

.gallery-slide img {
    display: block;
    height: 520px;
    width: auto;
    border-radius: 14px;
    object-fit: contain;
}

/* ========================================
   Download
   ======================================== */
.download {
    padding: 105px 0;
    background: linear-gradient(180deg, #f4f6f2 0%, #eff3eb 100%);
}

.download-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 58px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    background: var(--gradient-brand);
    box-shadow: 0 30px 80px rgba(143, 31, 23, 0.3);
}

.download-card::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 999px;
    right: -100px;
    top: -130px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.27) 0%, rgba(255, 255, 255, 0) 70%);
}

.download-card::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    left: -70px;
    bottom: -95px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 74%);
}

.download-content,
.store-buttons {
    position: relative;
    z-index: 1;
}

.download-content h2 {
    color: #fff;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    letter-spacing: -0.7px;
    margin-bottom: 10px;
}

.download-content p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.03rem;
    max-width: 500px;
}

.store-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.store-btn {
    display: block;
    opacity: 0.94;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.store-btn:hover {
    transform: translateY(-3px);
    opacity: 1;
}

.store-btn svg {
    display: block;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.25));
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: #0f1611;
    color: #f0f3eb;
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 46px;
    border-bottom: 1px solid rgba(240, 243, 235, 0.15);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-logo-img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.footer-logo span {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Sora', 'Segoe UI', sans-serif;
}

.footer-tagline {
    max-width: 280px;
    font-size: 14px;
    color: rgba(240, 243, 235, 0.62);
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links-group h4 {
    margin-bottom: 4px;
    color: rgba(240, 243, 235, 0.48);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.footer-links-group a {
    color: rgba(240, 243, 235, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links-group a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding: 22px 0;
    font-size: 13px;
    color: rgba(240, 243, 235, 0.46);
}

.footer-bottom p + p {
    margin-top: 8px;
}

.footer-privacy-link {
    color: rgba(240, 243, 235, 0.82);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-privacy-link:hover {
    color: #fff;
}

/* ========================================
   Privacy Page
   ======================================== */
.privacy-page {
    background: linear-gradient(180deg, #f8f9f6 0%, #f0f3ec 100%);
}

.privacy-main {
    padding: 56px 0 72px;
}

.privacy-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.privacy-top {
    margin-bottom: 18px;
}

.privacy-back-link {
    color: var(--brand-strong);
    font-weight: 700;
    text-decoration: none;
}

.privacy-back-link:hover {
    text-decoration: underline;
}

.privacy-card {
    background: #fff;
    border: 1px solid rgba(23, 32, 24, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 32px;
}

.privacy-card + .privacy-card {
    margin-top: 24px;
}

.privacy-card h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 12px;
    color: #151f16;
}

.privacy-card h2 {
    font-size: 1.22rem;
    margin: 22px 0 10px;
    color: #1d2a1f;
}

.privacy-card p {
    color: #3f4e41;
    line-height: 1.7;
}

.privacy-card ul {
    margin: 14px 0 0;
    padding-left: 20px;
    color: #2e3a30;
}

.privacy-card li + li {
    margin-top: 10px;
}

.privacy-card code {
    background: #eef2ea;
    border: 1px solid #dce4d7;
    border-radius: 6px;
    padding: 2px 6px;
    font-family: 'Source Code Pro', Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
}

.privacy-card a {
    color: var(--brand-strong);
}

.privacy-updated {
    margin-top: 16px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes riseFade {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-content {
    animation: riseFade 0.65s ease both;
}

.hero-phones {
    animation: floatIn 0.85s ease 0.08s both;
}

.feature-card.visible {
    animation: riseFade 0.5s ease forwards;
}

.feature-card:nth-child(1).visible { animation-delay: 0.02s; }
.feature-card:nth-child(2).visible { animation-delay: 0.07s; }
.feature-card:nth-child(3).visible { animation-delay: 0.12s; }
.feature-card:nth-child(4).visible { animation-delay: 0.17s; }
.feature-card:nth-child(5).visible { animation-delay: 0.22s; }
.feature-card:nth-child(6).visible { animation-delay: 0.27s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero {
        padding-top: 134px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 44px;
        text-align: center;
    }

    .hero-content h1,
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

    .phone-ios img {
        width: min(330px, 62vw);
    }

    .phone-android img {
        width: min(245px, 48vw);
    }

    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 52px 32px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .navbar {
        height: 70px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        padding: 22px;
        gap: 18px;
        flex-direction: column;
        align-items: flex-start;
        background: rgba(246, 248, 243, 0.98);
        border-bottom: 1px solid rgba(23, 32, 24, 0.12);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 116px 0 78px;
    }

    .hero-phones {
        gap: 10px;
    }

    .phone-ios img {
        width: min(255px, 64vw);
    }

    .phone-android {
        margin-left: -20px;
    }

    .phone-android img {
        width: min(190px, 44vw);
    }

    .section-header {
        margin-bottom: 42px;
    }

    .features,
    .screenshots,
    .download {
        padding: 82px 0;
    }

    .gallery-track {
        padding: 0 20px;
    }

    .gallery-slide img {
        height: 450px;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-container {
        padding: 0 16px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-content h1 {
        letter-spacing: -1.1px;
    }

    .hero-description {
        font-size: 0.98rem;
    }

    .btn {
        width: 100%;
    }

    .hero-buttons {
        gap: 10px;
    }

    .phone-ios img {
        width: min(220px, 65vw);
    }

    .phone-android img {
        width: min(160px, 42vw);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 28px 22px;
    }

    .platform-tabs {
        flex-direction: column;
        align-items: center;
    }

    .platform-tab {
        width: min(240px, 100%);
        justify-content: center;
    }

    .gallery-slide img {
        height: 390px;
    }

    .download-card {
        padding: 42px 20px;
        border-radius: 22px;
    }

    .store-btn svg {
        width: 148px;
        height: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .footer-logo,
    .footer-links-group {
        justify-content: center;
        align-items: center;
    }

    .footer-tagline {
        margin: 0 auto;
    }

    .privacy-main {
        padding: 28px 0 48px;
    }

    .privacy-wrapper {
        padding: 0 16px;
    }

    .privacy-card {
        padding: 24px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
