:root {
    --bg-color: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-blue: #0A84FF;
    --accent-purple: #BF5AF2;
    --accent-green: #30D158;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ─── Typography ──────────────────────────────────────────────────── */
h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* ─── Navigation ──────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: transparent;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.nav-link-icon {
    display: flex;
    align-items: center;
}

/* ─── Hero Section ────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 2rem 4rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-blue);
    background: rgba(10, 132, 255, 0.1);
    border: 1px solid rgba(10, 132, 255, 0.2);
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 3rem;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

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

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: rgba(255,255,255,0.2);
}

/* ─── Hero Interactive Demo ───────────────────────────────────────── */
.hero-visual {
    width: 100%;
    max-width: 720px;
    min-height: 380px;
    position: relative;
    perspective: 1200px;
}

.demo-scene {
    position: relative;
    transform: rotateX(8deg) rotateY(-2deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.demo-scene:hover {
    transform: rotateX(2deg) rotateY(0deg);
}

.hero-visual:hover .fake-cursor {
    opacity: 0 !important;
    transition: opacity 0.2s;
}

/* Menu bar strip */
.demo-menubar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 38px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 10px 10px 0 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    user-select: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.menubar-left, .menubar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menubar-apple {
    font-size: 17px;
    opacity: 0.9;
}

.menubar-app {
    font-weight: 600;
}

.menubar-item {
    opacity: 0.7;
}

.menubar-icon {
    opacity: 0.7;
    display: flex;
    align-items: center;
}

.menubar-time {
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.menubar-mail-icon {
    opacity: 1;
    color: var(--accent-blue);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

.menubar-mail-icon:hover {
    transform: scale(1.2);
}

.menubar-mail-icon.active {
    color: var(--accent-green);
}

/* Dropdown */
.demo-dropdown {
    position: absolute;
    right: 12px;
    top: 38px;
    width: 280px;
    background: rgba(38, 38, 40, 0.92);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 0.5px rgba(255,255,255,0.05);
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 10;
}

.demo-dropdown.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.dropdown-header {
    padding: 8px 14px 4px;
}

.dropdown-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 6px;
    margin: 2px 5px;
}

.dropdown-item:hover {
    background: rgba(10, 132, 255, 0.25);
}

.dropdown-item.clicked {
    background: rgba(48, 209, 88, 0.2);
}

.item-email {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 400;
}

.item-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag-primary {
    background: rgba(10, 132, 255, 0.2);
    color: var(--accent-blue);
}

.tag-work {
    background: rgba(255, 159, 10, 0.2);
    color: #FF9F0A;
}

.tag-alias {
    background: rgba(191, 90, 242, 0.2);
    color: var(--accent-purple);
}

.dropdown-footer {
    padding: 7px 14px;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    cursor: default;
}

/* Copied toast */
.demo-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(48, 209, 88, 0.3);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-green);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 8px 32px rgba(48, 209, 88, 0.15);
}

.demo-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Fake cursor */
.fake-cursor {
    position: absolute;
    width: 20px;
    height: 28px;
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s, top 0.5s cubic-bezier(0.45, 0, 0.15, 1), left 0.5s cubic-bezier(0.45, 0, 0.15, 1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.fake-cursor.visible {
    opacity: 1;
}

/* ─── Features Section ────────────────────────────────────────────── */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-blue {
    background: rgba(10, 132, 255, 0.1);
    color: var(--accent-blue);
}

.icon-green {
    background: rgba(48, 209, 88, 0.1);
    color: var(--accent-green);
}

.icon-purple {
    background: rgba(191, 90, 242, 0.1);
    color: var(--accent-purple);
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Demo Caption */
.demo-caption {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

.demo-caption svg {
    color: var(--text-secondary);
}

/* ─── Open Source Banner ──────────────────────────────────────────── */
.open-source-banner {
    max-width: 1000px;
    margin: 4rem auto 8rem;
    text-align: center;
    padding: 4rem 2rem;
}

.os-content h2 {
    margin-bottom: 1rem;
}

.os-content p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ─── Footer ──────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-logo {
    font-weight: 600;
    color: var(--text-primary);
}

/* ─── Animations ──────────────────────────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpAnim 0.8s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in {
    opacity: 0;
    animation: fadeInAnim 1s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.4s; }

@keyframes fadeUpAnim {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInAnim {
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .cta-group { flex-direction: column; }
    .footer-content { flex-direction: column; gap: 1rem; }
    .demo-menubar { font-size: 10px; gap: 8px; padding: 0 8px; }
    .menubar-item { display: none; }
    .demo-dropdown { width: 240px; right: 4px; }
}
