/* Fonts - Melange (Granola typography) */
@font-face {
    font-family: melange;
    src: url('/assets/fonts/melange-300.woff2') format('woff2');
    font-display: swap;
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: melange;
    src: url('/assets/fonts/melange-400.woff2') format('woff2');
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: melange;
    src: url('/assets/fonts/melange-500.woff2') format('woff2');
    font-display: swap;
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: melange;
    src: url('/assets/fonts/melange-600.woff2') format('woff2');
    font-display: swap;
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'melange Fallback';
    src: local('Arial');
    ascent-override: 97.42%;
    descent-override: 32.31%;
    line-gap-override: 0.00%;
    size-adjust: 101.21%;
}

:root {
    /* Colors inspired by clean SaaS (Granola-esque) */
    --color-background: #ffffff;
    --color-surface: #f9f9fb;
    --color-surface-hover: #f1f1f4;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-border: #eaeaea;
    
    /* Theme brand colors */
    --color-brand: #4a7ff7;
    --color-brand-hover: #3b6fd8;
    --color-brand-light: rgba(74, 127, 247, 0.08);

    /* Using a subtle accent, clean slate/blue */
    --color-accent: #0f172a;
    --color-accent-hover: #334155;
    --color-accent-text: #ffffff;

    --font-melange: melange, 'melange Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-family-sans: var(--font-melange);
    
    --container-width: 1280px;
    --container-padding: 2rem;
    
    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 24px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

body, h1, h2, h3, h4, p, ul, ol, figure {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-sans);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 4.5rem;
}

@media (min-width: 768px) {
    body {
        padding-top: 5.75rem;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-family-sans);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-bottom: 1rem;
}

h4 {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

.lead {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    color: var(--color-text-muted);
    max-width: 60ch;
}

.page-header .lead {
    margin-inline: auto;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-inline: 2rem;
    }
}

@media (min-width: 1400px) {
    .container {
        padding-inline: 2.5rem;
    }
}

.section {
    padding-block: clamp(4rem, 8vw, 8rem);
}

/* Cards */
.card {
    padding: 2.5rem;
    background: #ffffff;
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.14), 0px 0px 2px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, transform 0s;
    transform: none !important;
}

.card:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.14), 0px 0px 2px rgba(0, 0, 0, 0.12);
    transform: none !important;
}

/* Buttons */
.btn {
    font-family: var(--font-family-sans);
    font-size: 1rem;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--color-background);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-surface);
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Header & Navbar - Granola.ai inspired floating pill */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
    transition: top 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-melange);
}

@media (min-width: 768px) {
    .site-header {
        top: 0.75rem;
    }
}

.header-container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1rem;
    position: relative;
}

@media (min-width: 768px) {
    .header-container {
        padding-inline: 2rem;
    }
}

@media (min-width: 1400px) {
    .header-container {
        padding-inline: 2.5rem;
    }
}

.navbar-pill {
    pointer-events: auto;
    position: relative;
    width: 100%;
    height: 3.5rem;
    display: flex;
    align-items: center;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .navbar-pill {
        height: 3.625rem;
        border-radius: 9999px;
        background-color: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid transparent;
        box-shadow: none;
        padding-left: 1.125rem;
        padding-right: 0.625rem;
    }

    .navbar-pill[data-scrolled="true"] {
        background-color: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-color: rgba(0, 0, 0, 0.08);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -4px rgba(0, 0, 0, 0.08);
    }
}

.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 0.25rem;
    gap: 0.75rem;
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    flex: 1;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    font-family: var(--font-melange);
    user-select: none;
}

.logo-icon {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
    position: relative;
    top: -1px;
}

.logo:hover .logo-icon {
    transform: scale(1.06);
}

.logo-text {
    font-family: var(--font-melange);
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1;
    letter-spacing: -0.015em;
    color: #1a1a1a;
    white-space: nowrap;
    transform: translateY(1px);
}

/* Desktop Nav Links */
.nav-links {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    font-family: var(--font-melange);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s ease;
    user-select: none;
}

.nav-link:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-accent);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 0.5rem;
}

.nav-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 1.125rem;
    border-radius: 9999px;
    font-family: var(--font-melange);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    color: var(--color-text);
    background-color: var(--color-surface-hover);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    white-space: nowrap;
}

.nav-download-btn .os-icon {
    flex-shrink: 0;
    color: currentColor;
}

.nav-download-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-accent-text);
    border-color: var(--color-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: var(--color-surface-hover);
}

.mobile-menu-toggle .icon-close {
    display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Mobile Navigation Drawer */
.mobile-nav {
    pointer-events: auto;
    display: block;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.25s ease;
    z-index: 99;
    font-family: var(--font-melange);
}

.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.mobile-nav-content {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-large);
    padding: 1.25rem;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-medium);
    font-family: var(--font-melange);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.15s ease;
}

.mobile-nav-link:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-accent);
}

.mobile-nav-cta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 9999px;
    font-family: var(--font-melange);
    background-color: var(--color-accent);
    color: var(--color-accent-text);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.mobile-download-btn:hover {
    background-color: var(--color-accent-hover);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding-block: 4rem 2rem;
    background-color: var(--color-surface);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo-footer {
    display: inline-flex;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-heading {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* CTA Section */
.cta-section {
    background-color: var(--color-surface);
    text-align: center;
    padding-block: 6rem;
    margin-top: 4rem;
    border-top: 1px solid var(--color-border);
}

main:has(> .cta-section:last-child) + .site-footer {
    border-top: none;
}

.cta-container {
    max-width: 600px;
}

.cta-heading {
    margin-bottom: 1rem;
}

.cta-text {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Pages Layouts */
.page-header {
    text-align: center;
    padding-block: 4rem;
    max-width: 800px;
    margin-inline: auto;
}

.page-content {
    padding-bottom: 4rem;
}

/* Utility */
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.w-full { width: 100%; }

/* Responsive */
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}
