/* =============================================
   CSS RESET & BASE STYLES
   ============================================= */

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

:root {
    /* Light Mode Color Palette */
    --color-page-bg: #F1F2F2;
    --color-bg: #FEFEFE;
    --color-text-primary: #161618;
    --color-text-secondary: #717182;
    --color-text-tertiary: #9CA3AF;
    --color-accent: #161618;
    --color-border: #E3E4E4;
    --color-overlay: rgba(0, 0, 0, 0.5);
    --color-hover-bg: #E8E9EA;
    --color-accent-interactive: #C8392B; /* Brand CTA red */

    /* Brand Tokens (mode-independent) */
    --color-brand-primary: #C8392B;
    --color-brand-accent: #F59E0B;
    --color-brand-green: #4A7C59;
    
    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Spacing */
    --spacing-xs: 0.5rem;      /* 8px */
    --spacing-sm: 1rem;        /* 16px */
    --spacing-md: 1.5rem;      /* 24px */
    --spacing-lg: 2rem;        /* 32px */
    --spacing-xl: 3rem;        /* 48px */
    --spacing-2xl: 4rem;       /* 64px */
    --spacing-3xl: 6rem;       /* 96px */
    
    /* Semantic Spacing - for template clarity */
    --spacing-section: 4rem;        /* 64px - vertical spacing between major sections */
    --spacing-content-inset: 4rem;  /* 64px - horizontal padding for main content areas */
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 88px;
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    
    /* Shadows */
    --shadow-icon: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

/* Dark Mode Color Palette */
[data-theme="dark"] {
    --color-page-bg: #161618;
    --color-bg: #1E1E21;
    --color-text-primary: #DDE4EB;
    --color-text-secondary: #A4A9AE;
    --color-text-tertiary: #9CA3AF;
    --color-accent: #DDE4EB;
    --color-border: #2A2A2E;
    --color-overlay: rgba(0, 0, 0, 0.7);
    --color-hover-bg: #252528;
    --color-accent-interactive: #C8392B; /* Brand CTA red */
}

body {
    font-family: var(--font-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: #E6E6E6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

[data-theme="dark"] body {
    background-color: #000000;
}

/* Desktop: html and body both show the frame color on overscroll */
html {
    background-color: #E6E6E6;
}

html[data-theme="dark"] {
    background-color: #000000;
}

/* =============================================
   REDUCED MOTION
   Disable animations for users who prefer reduced motion
   ============================================= */

@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;
    }
}

/* Content container with border */
.content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    background-color: var(--color-page-bg);
    border-left: 1px solid #DDE4EB;
    border-right: 1px solid #DDE4EB;
    min-height: 100vh;
}

[data-theme="dark"] .content-wrapper {
    border-left-color: #303030;
    border-right-color: #303030;
}

/* Only crop image overflow when viewport is smaller than max-width */
@media (max-width: 1199px) {
    .content-wrapper {
        overflow-x: hidden;
    }

    /* Mobile/tablet: body and html match page-bg so safe-area insets
       (status bar, home indicator) fill with the correct colour.
       --color-page-bg already resolves to the right value per theme. */
    body,
    html,
    [data-theme="dark"] body,
    html[data-theme="dark"] {
        background-color: var(--color-page-bg);
    }
}

/* =============================================
   ACCESSIBILITY
   Skip link for keyboard navigation
   ============================================= */

.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: 8px 16px;
    background: var(--color-accent);
    color: var(--color-bg);
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

/* =============================================
   NAVIGATION BAR
   Centered floating pill design with shadow
   ============================================= */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: calc(var(--spacing-md) + env(safe-area-inset-top)) var(--spacing-md) 0;
    background-color: transparent;
    z-index: 100;
}

.nav-wrapper {
    max-width: 876px;
    margin: 0 auto;
}

/* Floating Pill Container */
.nav-pill {
    background-color: rgba(254, 254, 254, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 9999px;
    padding: 0 1.5rem;
    height: 60px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    transition: box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.nav-pill.is-scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.11), 0 2px 8px rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.10);
}

/* Dark mode */
[data-theme="dark"] .nav-pill {
    background-color: rgba(30, 30, 33, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .nav-pill.is-scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.11);
}

/* Nav Logo */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-img {
    max-height: 18px;
    width: auto;
    display: block;
}

/* Nav Actions (right side of pill) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

/* Coming Soon Button */
.btn-coming-soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-brand-primary);
    color: #ffffff;
    border-radius: 9999px;
    padding: 0 1.125rem;
    height: 32px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out;
    box-shadow: 0 9px 34px rgba(200, 57, 43, 0.3), 0 2px 9px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.btn-coming-soon:hover {
    background-color: #a82e22;
    box-shadow: 0 6px 20px rgba(200, 57, 43, 0.35), 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Icon shown only in circle mode (mobile nav) */
.btn-coming-soon-icon {
    display: none;
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    padding: 0;
    background-color: var(--color-page-bg);
    border: none;
    border-radius: 9999px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background-color: var(--color-hover-bg);
}

[data-theme="dark"] .theme-toggle {
    background-color: var(--color-page-bg);
}

.theme-icon {
    width: 18px;
    height: 18px;
}

/* Hide/show sun and moon icons based on theme */
.theme-icon-sun {
    display: block;
}

.theme-icon-moon {
    display: none;
}

[data-theme="dark"] .theme-icon-sun {
    display: none;
}

[data-theme="dark"] .theme-icon-moon {
    display: block;
}

/* Responsive nav */
@media (max-width: 600px) {
    .nav {
        padding: calc(0.75rem + env(safe-area-inset-top)) 2rem 0;
    }

    .nav-pill {
        padding: 0 1rem;
        height: 48px;
    }

    /* Collapse CTA to a red circle with plus icon */
    .nav .btn-coming-soon {
        width: 32px;
        height: 32px;
        padding: 0;
    }

    .nav .btn-coming-soon .btn-coming-soon-label {
        display: none;
    }

    .nav .btn-coming-soon .btn-coming-soon-icon {
        display: block;
    }
}

/* =============================================
   MAIN CONTENT AREA
   Provides spacing for fixed navigation
   ============================================= */

.main-content {
    padding-top: var(--nav-height);
    padding-left: clamp(1.5rem, 6.5vw, 4rem);
    padding-right: clamp(1.5rem, 6.5vw, 4rem);
    min-height: calc(100vh - var(--nav-height));
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero {
    padding-top: 48px;
    padding-bottom: 128px;
    padding-left: 3rem;
    padding-right: 3rem;
    display: flex;
    align-items: center;
    overflow: visible;
}

/* Left 50%: Text Content */
.hero-content {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
}

.app-store-badge--light,
.app-store-badge--dark {
    display: block;
    height: 32px;
    width: auto;
}

.app-store-badge--dark { display: none; }
[data-theme="dark"] .app-store-badge--light { display: none; }
[data-theme="dark"] .app-store-badge--dark { display: block; }

.hero-title {
    font-size: clamp(2.5rem, 4.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    color: var(--color-text-primary);
    letter-spacing: -0.03em;
    text-transform: lowercase;
    margin: 0;
}

.hero-description {
    font-size: clamp(1rem, 1.8vw, 1.3125rem);
    line-height: 1.5;
    color: var(--color-text-secondary);
    letter-spacing: -0.005em;
    text-transform: lowercase;
    margin: 0;
}

/* Right 50%: Phone Images */
.hero-phones {
    flex: 0 0 50%;
    position: relative;
    height: clamp(300px, 42vw, 480px);
    align-self: flex-end;
    overflow: visible;
}

.hero-phone {
    position: absolute;
    bottom: 0;
    height: clamp(260px, 36vw, 420px);
    width: auto;
}

/* Dark phone — back-left, rotated left, centered in container */
.hero-phone-back {
    left: calc(50% - clamp(80px, 11vw, 120px));
    transform: rotate(-6deg);
    transform-origin: bottom center;
    z-index: 1;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.2)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.12));
}

/* Light phone — front-right, rotated right, centered in container */
.hero-phone-front {
    left: calc(50% - 10px);
    transform: rotate(8deg);
    transform-origin: bottom center;
    z-index: 2;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.14)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.08));
}

/* Stack before phones get squeezed */
@media (max-width: 820px) {
    .hero {
        padding-top: 48px;
        padding-bottom: 128px;
        padding-left: 0;
        padding-right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .hero-content {
        flex: none;
        width: 100%;
    }

    .hero-phones {
        flex: none;
        width: 100%;
        height: 420px;
        overflow: visible;
    }

    .hero-phone {
        height: 370px;
    }

    /* Center the phone pair within the full-width container */
    .hero-phone-back {
        left: calc(50% - 145px);
        right: auto;
    }

    .hero-phone-front {
        left: calc(50% - 20px);
        right: auto;
    }
}

@media (max-width: 480px) {
    .hero-phones {
        height: 340px;
    }

    .hero-phone {
        height: 300px;
    }

    .hero-phone-back {
        left: calc(50% - 120px);
    }

    .hero-phone-front {
        left: calc(50% - 38px);
    }
}




/* =============================================
   FEATURE SECTIONS
   Reusable 50/50 card layout: chip + title + description left, phone right.
   Swap sides: add .feature-section--reverse
   Change bg:  style="--feature-bg: #hex;"
   Change text: style="--feature-text: #hex; --feature-subtext: #hex;"
   ============================================= */

.feature-section {
    display: flex;
    align-items: stretch;
    background: var(--feature-bg, var(--color-brand-primary));
    border-radius: 20px;
    margin-bottom: 3rem;
}

.feature-section--reverse {
    flex-direction: row-reverse;
}

/* Inverted section: dark card on light mode, light card on dark mode */
.feature-section--inverted {
    --feature-bg: #161618;
    --feature-text: #DDE4EB;
    --feature-subtext: #A4A9AE;
    --feature-chip-bg: rgba(245, 158, 11, 0.06);
    --feature-chip-text: #F59E0B;
}

[data-theme="dark"] .feature-section--inverted {
    --feature-bg: #F1F2F2;
    --feature-text: #161618;
    --feature-subtext: #717182;
}

/* Text column */
.feature-content {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 4rem 3rem;
}

/* Label chip */
.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--feature-chip-bg, #161618);
    border-radius: 9999px;
    padding: 0.3125rem 0.5rem;
}

.feature-chip-icon {
    width: 12px;
    height: 12px;
    display: block;
}

.feature-chip span {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--feature-chip-text, #FEFEFE);
    line-height: 1;
    white-space: nowrap;
}

.feature-title {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.12;
    color: var(--feature-text, #FEFEFE);
    letter-spacing: -0.02em;
    text-transform: lowercase;
    margin: 0;
}

.feature-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--feature-subtext, #FEFEFE);
    letter-spacing: -0.005em;
    text-transform: lowercase;
    margin: 0;
}

/* Phone image column */
.feature-visual {
    flex: 0 0 50%;
    position: relative;
    min-height: clamp(280px, 36vw, 440px);
    overflow: hidden;
}

.feature-phone-img {
    position: absolute;
    top: 54px;
    left: 50%;
    transform: translateX(-50%);
    height: clamp(320px, 50vw, 560px);
    width: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

/* Dual-phone variant: two phones side by side with vertical offset */
.feature-visual--dual {
    overflow: visible;
    min-height: clamp(360px, 44vw, 520px);
}

.feature-visual--dual .feature-phone-img--back {
    height: clamp(220px, 26vw, 360px);
    left: calc(50% - clamp(118px, calc(12vw + 16px), 182px));
    top: clamp(90px, calc(9vw + 20px), 100px);
    transform: none;
    z-index: 1;
}

.feature-visual--dual .feature-phone-img--front {
    height: clamp(220px, 26vw, 360px);
    left: calc(50% + 16px);
    top: clamp(50px, calc(9vw - 20px), 60px);
    transform: none;
    z-index: 2;
}

/* Centered variant: phone sits fully visible with padding top/bottom */
.feature-visual--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 0;
    min-height: unset;
    overflow: visible;
}

.feature-visual--centered .feature-phone-img {
    position: static;
    transform: none;
    height: auto;
    width: clamp(112px, 15vw, 196px);
}

/* Notate phone: swap between dark/light versions based on theme */
.notate-phone--light { display: none; }
.notate-phone--dark  { display: block; }
[data-theme="dark"] .notate-phone--light { display: block; }
[data-theme="dark"] .notate-phone--dark  { display: none; }

/* =============================================
   ROADMAP SECTION
   ============================================= */

.roadmap-section {
    background: var(--color-bg);
    border-radius: 20px;
    margin-bottom: 3rem;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.roadmap-header {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    padding: 3.5rem 3rem;
}

.roadmap-title {
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.12;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    text-transform: lowercase;
    margin: 0;
}

.roadmap-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    letter-spacing: -0.005em;
    text-transform: lowercase;
    margin: 0;
}

.roadmap-list {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.roadmap-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.125rem 2.5rem;
}

.roadmap-item + .roadmap-item {
    border-top: 1px solid var(--color-border);
}

.roadmap-item-number {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-brand-accent);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    min-width: 1.5rem;
    font-variant-numeric: tabular-nums;
}

.roadmap-item-text {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
    line-height: 1.4;
    text-transform: lowercase;
}

/* Recolor the chip icon to match its chip text color */

.roadmap-header .feature-chip {
    color: var(--color-brand-accent);
}

.feature-section--inline-tokens .feature-chip {
    color: var(--color-brand-primary);
}

@media (max-width: 820px) {
    .roadmap-section {
        flex-direction: column;
        border-radius: 0;
        margin-left: calc(-1 * clamp(1.5rem, 6.5vw, 4rem));
        margin-right: calc(-1 * clamp(1.5rem, 6.5vw, 4rem));
        overflow: visible;
    }

    .roadmap-header {
        flex: none;
        padding: 2.5rem clamp(1.5rem, 6.5vw, 4rem) 1.5rem;
    }

    .roadmap-list {
        border-left: none;
        border-top: 1px solid var(--color-border);
    }

    .roadmap-item {
        padding: 1rem clamp(1.5rem, 6.5vw, 4rem);
    }
}

/* =============================================
   PRIVACY PAGE
   ============================================= */

.privacy-page {
    max-width: 560px;
    padding-top: 4rem;
    padding-bottom: 5rem;
    padding-left: 3rem;
    padding-right: 0;
}

.privacy-page .hero-title {
    margin-bottom: 2rem;
}

/* Responsive: stack image below text */
@media (max-width: 820px) {
    .feature-section,
    .feature-section--reverse {
        flex-direction: column;
        border-radius: 0;
        margin-left: calc(-1 * clamp(1.5rem, 6.5vw, 4rem));
        margin-right: calc(-1 * clamp(1.5rem, 6.5vw, 4rem));
    }

    .feature-content {
        flex: none;
        padding: 2.5rem clamp(1.5rem, 6.5vw, 4rem) 1.5rem;
    }

    .feature-visual {
        flex: none;
        min-height: 100vw;
    }

    .feature-phone-img {
        height: auto;
        width: 66vw;
    }

    .feature-visual--dual {
        min-height: 96vw;
    }

    .feature-visual--dual .feature-phone-img--back,
    .feature-visual--dual .feature-phone-img--front {
        width: calc(40vw - 12px);
        height: auto;
    }

    .feature-visual--dual .feature-phone-img--back {
        left: calc(50% - 40vw);
        top: 60px;
    }

    .feature-visual--dual .feature-phone-img--front {
        left: calc(50% + 12px);
        top: 40px;
    }

    .feature-visual--centered {
        min-height: unset;
        padding: 48px 0 96px;
    }

    .feature-visual--centered .feature-phone-img {
        width: 60vw;
    }

    .privacy-page {
        padding-left: 0;
    }
}

.privacy-date {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--color-text-secondary);
    margin: 0.5rem 0 2.5rem;
}

.privacy-section {
    margin-bottom: 2rem;
}

.privacy-section h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
    text-transform: none;
}

.privacy-section p,
.privacy-section ul {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
    margin: 0 0 0.75rem;
}

.privacy-section ul {
    list-style: none;
    padding: 0;
}

.privacy-section ul li::before {
    content: "– ";
}

.privacy-home-btn {
    margin-top: 3rem;
}

/* =============================================
   FOOTER
   Simple footer with navigation and copyright
   ============================================= */

.footer {
    border-top: 1px solid var(--color-border);
    padding: var(--spacing-xl) var(--spacing-md) calc(var(--spacing-xl) + env(safe-area-inset-bottom));
    margin-top: var(--spacing-2xl);
}

/* Tablet and up - increase horizontal padding */
@media (min-width: 768px) {
    .footer {
        padding: var(--spacing-xl) 4rem;
    }
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
}

.footer-nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.footer-nav a:hover {
    color: var(--color-accent-interactive);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: center;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* =============================================
   RESPONSIVE DESIGN
   Tablet and desktop breakpoints
   ============================================= */

/* Tablet and above (768px+) */
@media (min-width: 768px) {
    :root {
        --spacing-2xl: 6rem;
    }

    .hero-title {
        font-size: 2.75rem;
        line-height: 1.1;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.65;
    }

    /* Footer adjustments */
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-nav {
        justify-content: flex-start;
    }

    .footer-bottom {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

/* Large desktop (1024px+) */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1.05;
    }
}
