/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #5c9ead;
    --bg-secondary: #4e8a98;
    --bg-dark: #3a7a8a;
    --bg-card: #f0f0f0;
    --text-primary: #326273;
    --text-secondary: #4a7a8a;
    --text-muted: #6a9aa8;
    --text-light: #ffffff;
    --accent: #e39774;
    --accent-hover: #d4845f;
    --accent-light: rgba(227, 151, 116, 0.2);
    --border: #d0d0d0;
    --border-light: #e0e0e0;
    --success: #4abe8a;
    --danger: #e07070;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(50, 98, 115, 0.15);
    --shadow-md: 0 4px 6px -1px rgba(50, 98, 115, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(50, 98, 115, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Theme-aware variables */
    --bg-body-start: #4e8a98;
    --bg-body-mid: #5c9ead;
    --bg-body-end: #6aabb8;
    --navbar-bg: rgba(62, 122, 138, 0.85);
    --navbar-text: rgba(255, 255, 255, 0.75);
    --navbar-text-hover: #ffffff;
    --navbar-border: rgba(255, 255, 255, 0.1);
    --card-bg-solid: #ffffff;
    --card-bg-alt: #f8f9fa;
    --input-bg: #eeeeee;
    --input-bg-white: #ffffff;
    --dropdown-bg: #1a2a35;
    --dropdown-item-text: #d0dde0;
    --dropdown-item-hover: rgba(92, 158, 173, 0.3);
    --dropdown-item-selected: rgba(92, 158, 173, 0.4);
    --heading-color: #ffffff;
    --on-bg-text: rgba(255, 255, 255, 0.85);
    --on-bg-text-muted: rgba(255, 255, 255, 0.6);
    --focus-ring: rgba(227, 151, 116, 0.15);
    --overlay-bg: rgba(0, 0, 0, 0.6);
    --hover-bg: rgba(0, 0, 0, 0.04);
    --gradient-text: linear-gradient(135deg, var(--heading-color) 0%, var(--accent) 100%);
    --desktop-ui-scale: 0.9;
}

html { scroll-behavior: smooth; }

/* Match the intended desktop density without asking users to change browser zoom. */
@media (min-width: 1100px) {
    html {
        font-size: calc(100% * var(--desktop-ui-scale));
    }
}

@supports (zoom: 1) {
    @media (min-width: 1100px) {
        html {
            font-size: 100%;
            zoom: var(--desktop-ui-scale);
        }
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, var(--bg-body-start) 0%, var(--bg-body-mid) 50%, var(--bg-body-end) 100%);
    background-attachment: fixed;
    color: var(--heading-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--navbar-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading-color);
    text-decoration: none;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--navbar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--navbar-text-hover);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: var(--navbar-text-hover);
    background: rgba(255, 255, 255, 0.15);
}

.nav-btn {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.login-btn {
    background: var(--accent);
    color: white;
}

.login-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Navbar — logged-in user widget */
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); }
.nav-avatar-default { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; background: var(--accent); color: #fff; font-size: 0.8rem; font-weight: 600; line-height: 1; border-radius: 50%; }
.nav-upgrade-btn { background: var(--accent); color: white; font-size: 0.8rem; padding: 6px 14px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; transition: all 0.2s; }
.nav-upgrade-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* Avatar trigger */
.nav-avatar-trigger { background: none; border: none; cursor: pointer; padding: 2px; border-radius: 50%; transition: box-shadow 0.15s; }
.nav-avatar-trigger:hover { box-shadow: 0 0 0 3px rgba(255,255,255,0.2); }
.nav-avatar-trigger img.nav-avatar { display: block; }

/* Profile dropdown */
.nav-profile-dropdown { position: relative; }
.nav-dropdown-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; width: 260px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden; }
.nav-profile-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-header { display: flex; align-items: center; gap: 12px; padding: 16px; }
.nav-dropdown-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.nav-dropdown-avatar-default { width: 40px; height: 40px; min-width: 40px; background: var(--accent); color: #fff; font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.nav-dropdown-info { min-width: 0; }
.nav-dropdown-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-dropdown-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.nav-dropdown-divider { height: 1px; background: var(--border-light); margin: 0; }
.nav-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); text-decoration: none; cursor: pointer; transition: background 0.12s, color 0.12s; border: none; background: none; width: 100%; font-family: inherit; }
.nav-dropdown-item:hover { background: rgba(92, 158, 173, 0.08); color: var(--text-primary); }
.nav-dropdown-item svg { flex-shrink: 0; opacity: 0.5; }
.nav-dropdown-item:hover svg { opacity: 0.8; }
.nav-dropdown-signout { color: var(--danger); }
.nav-dropdown-signout:hover { background: rgba(224, 112, 112, 0.08); color: var(--danger); }
.nav-dropdown-signout svg { opacity: 0.7; }

/* Hero */
.hero {
    padding: 150px 0 100px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--on-bg-text);
    margin-bottom: 28px;
    font-weight: 500;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: var(--heading-color);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--on-bg-text);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-note {
    max-width: 760px;
    margin: 24px auto 0;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--on-bg-text);
    font-size: 0.92rem;
    line-height: 1.55;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(227, 151, 116, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 151, 116, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--heading-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Features */
.features {
    padding: 100px 0;
}

.features h2,
.how-it-works h2,
.waitlist-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 60px;
    font-weight: 700;
    color: var(--heading-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.step { padding: 24px; }

.step-number {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(227, 151, 116, 0.3);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--heading-color);
}

.step p {
    color: var(--on-bg-text-muted);
}

/* Builder Section */
.builder-section {
    padding: 100px 0;
    text-align: center;
}

.builder-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--heading-color);
}

.section-subtitle {
    color: var(--on-bg-text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.builder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    text-align: left;
}

.builder-feature {
    padding: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, background 0.2s;
}

.builder-feature:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.12);
}

.builder-icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.builder-feature h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.builder-feature p {
    color: var(--on-bg-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.builder-cta {
    margin-top: 40px;
}

/* Waitlist Section */
.waitlist-section {
    padding: 100px 0;
    text-align: center;
}

.waitlist-section p {
    color: var(--on-bg-text);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.waitlist-form {
    display: flex;
    gap: 12px;
    max-width: 450px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.waitlist-form input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.waitlist-form input[type="email"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.waitlist-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.waitlist-form button {
    padding: 14px 28px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.waitlist-form button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(227, 151, 116, 0.3);
}

.waitlist-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--navbar-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--on-bg-text-muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 1px;
    transition: color 0.15s, border-color 0.15s;
}

.footer-links a:hover {
    color: var(--navbar-text-hover);
    border-color: rgba(255, 255, 255, 0.75);
}

.footer-social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social-link {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-bg-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
}

.footer-social-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.34);
    color: var(--navbar-text-hover);
}

.footer-social-link svg {
    width: 18px;
    height: 18px;
}

.footer-note {
    font-size: 0.8rem;
    color: var(--on-bg-text-muted);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 200;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
    background: rgba(74, 190, 138, 0.15);
    color: var(--success);
}

.toast.error {
    border-color: #e07070;
    background: rgba(224, 112, 112, 0.15);
    color: #e07070;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 130px 0 80px; }
    .hero h1 { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }

    .hero-actions { flex-direction: column; align-items: center; }
    .btn-lg { width: 100%; max-width: 300px; text-align: center; }

    .features, .how-it-works, .waitlist-section { padding: 60px 0; }
    .features h2, .how-it-works h2, .waitlist-section h2 { font-size: 1.8rem; margin-bottom: 40px; }

    .waitlist-form { flex-direction: column; }
    .waitlist-form input[type="email"], .waitlist-form button { width: 100%; }

    .nav-links { gap: 4px; }
    .nav-link { padding: 8px 10px; font-size: 0.8rem; }
    .nav-btn { padding: 8px 14px; font-size: 0.8rem; }
}
