:root {
    --bg: #f8f5f1;
    --bg-strong: #f3efe9;
    --card: #ffffff;
    --primary: #f28c28;
    --primary-dark: #db7a12;
    --secondary: #1a8ba1;
    --secondary-soft: #dff4f7;
    --text: #1d1d1d;
    --muted: #5c5c5c;
    --line: #e8dfd5;
    --success: #2d7d46;
    --shadow: 0 18px 35px rgba(22, 26, 28, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

img {
    max-width: 100%;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 800;
}

.brand-logo {
    height: 68px;
    object-fit: contain;
    display: block;
}

.fallback-mark {
    display: none;
}

.menu {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.96rem;
    color: var(--muted);
}

.menu a {
    transition: color 0.2s ease;
}

.menu a:hover {
    color: var(--primary-dark);
}

.hero {
    padding: 80px 0 40px;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0.9));
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 32px;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
}

h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border-color: var(--line);
}

.hero-card,
.feature-card,
.panel,
.auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, #fffaf1, #f3fbfd);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 14px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--secondary);
}

.stat-card span {
    color: var(--muted);
    font-size: 0.89rem;
}

.features {
    padding: 48px 0 120px;
}

.section-title {
    margin-bottom: 24px;
}

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

.feature-card {
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px rgba(22, 26, 28, 0.08);
}

.feature-card.warm {
    background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.feature-card p {
    margin: 0;
}

.hero-illustration {
    background: radial-gradient(circle at top, #fff2db 0%, #ffffff 35%, #f8fbff 100%);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
}

.pulse-card {
    background: linear-gradient(135deg, #fff5e6, #ffffff);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px 18px;
}

.mini-tag {
    display: inline-block;
    background: var(--secondary-soft);
    color: var(--secondary);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mood-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mood-row span {
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.callout {
    padding: 18px 0 80px;
}

.callout-box {
    background: linear-gradient(135deg, #fff4e5, #edf9fb);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 34px 28px;
    box-shadow: var(--shadow);
}

.callout-box h2 {
    margin: 0 0 12px;
}

.auth-body {
    background: linear-gradient(180deg, #fff8f2, #f3fbfd);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(520px, 100%);
    padding: 30px 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
    font-weight: 800;
    color: var(--text);
}

.auth-brand .brand-logo {
    height: 78px;
}

.auth-subtitle {
    margin-top: 0;
    margin-bottom: 22px;
}

.provider-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.provider-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid var(--line);
    background: white;
    transition: transform 0.2s ease;
}

.provider-btn:hover {
    transform: translateY(-1px);
}

.provider-btn.google {
    background: #fff;
}

.provider-btn.microsoft {
    background: #eef9ff;
}

.provider-btn.apple {
    background: #f8f8f8;
}

.muted-text {
    font-size: 0.9rem;
    color: var(--muted);
}

.alert-box {
    background: #fff1f1;
    border: 1px solid #f3c4c4;
    color: #8b2e2e;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-weight: 600;
}

.success-box {
    background: #edf9f1;
    border-color: #bfe0c8;
    color: var(--success);
}

.auth-split {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.local-toggle-wrap {
    margin-top: 10px;
}

.local-btn {
    width: 100%;
    font: inherit;
    color: var(--text);
    cursor: pointer;
}

.local-login-panel {
    display: none;
    margin-top: 16px;
}

.local-login-panel.open {
    display: block;
}

.stack-form {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.stack-form label {
    display: grid;
    gap: 6px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}

.stack-form input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: white;
}

.full-width {
    width: 100%;
}

.inline-link-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 8px;
}

.link-button {
    border: none;
    background: transparent;
    color: var(--secondary);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 40;
}

.modal-backdrop.hidden {
    display: none;
}

.modal-card {
    width: min(500px, 100%);
    background: white;
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 24px;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.close-button {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--muted);
}

.back-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--secondary);
    font-weight: 700;
}

.page-shell {
    padding: 40px 0 80px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.panel {
    padding: 22px;
}

.panel-header {
    margin-bottom: 16px;
}

.list {
    margin: 0;
    padding-left: 20px;
    color: var(--text);
}

.list li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.list.muted li {
    color: var(--muted);
}

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

.large {
    min-height: 136px;
}

@media (max-width: 900px) {
    .hero-grid,
    .content-grid,
    .feature-grid,
    .compact {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-direction: column;
        justify-content: center;
        padding: 16px 0;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
    }

    .cta-row {
        flex-direction: column;
    }
}
