/* Landing page — mobile-first, trust-driven (My Health Buddy) */

:root {
    --landing-green: #0f6b5b;
    --landing-green-dark: #0a5246;
    --landing-teal: #0d9488;
    --landing-surface: #f8faf9;
    --landing-problem-tint: #fff5f5;
    --landing-radius: 14px;
}

.landing-section {
    padding: 2.5rem 1rem;
}

@media (min-width: 768px) {
    .landing-section {
        padding: 3.5rem 1.5rem;
    }
}

.landing-inner {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* —— Hero —— */
.landing-hero {
    background: linear-gradient(165deg, #ecfdf9 0%, #f0fdfa 45%, #ffffff 100%);
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

.landing-hero-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.landing-hero-brand img {
    width: 48px;
    height: 48px;
}

.landing-hero-brand-text {
    line-height: 1.1;
}

.landing-hero-brand-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--landing-green);
}

.landing-hero-brand-sub {
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
}

.landing-hero-headline {
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.landing-hero-sub {
    font-size: 1.05rem;
    color: #475569;
    max-width: 36rem;
    margin-top: 1rem;
}

.landing-hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (min-width: 576px) {
    .landing-hero-ctas {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

.landing-btn-primary {
    min-height: 50px;
    padding: 0.65rem 1.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    background: var(--landing-green) !important;
    border-color: var(--landing-green) !important;
    color: #fff !important;
}

.landing-btn-primary:hover {
    background: var(--landing-green-dark) !important;
    border-color: var(--landing-green-dark) !important;
    color: #fff !important;
}

.landing-btn-outline {
    min-height: 50px;
    padding: 0.65rem 1.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    border-width: 2px;
    color: var(--landing-green);
    border-color: var(--landing-green);
}

.landing-btn-outline:hover {
    background: rgba(15, 107, 91, 0.08);
    color: var(--landing-green-dark);
}

.landing-hero-trust {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: #64748b;
}

.landing-hero-trust span {
    display: block;
}

@media (min-width: 576px) {
    .landing-hero-trust span {
        display: inline;
    }
    .landing-hero-trust span + span::before {
        content: " · ";
    }
}

/* Phone mockup placeholder */
.landing-mockup {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-mockup-frame {
    width: min(280px, 88vw);
    aspect-ratio: 9 / 18;
    border-radius: 28px;
    background: linear-gradient(145deg, #e0f2f1, #b2dfdb);
    box-shadow: 0 24px 48px rgba(15, 107, 91, 0.18), inset 0 0 0 3px rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.landing-mockup-frame::after {
    content: "";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36%;
    height: 4px;
    background: rgba(15, 107, 91, 0.25);
    border-radius: 4px;
}

.landing-mockup-inner {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: radial-gradient(circle at 35% 25%, rgba(20, 120, 108, 0.28) 0%, rgba(11, 74, 67, 0.9) 60%, rgba(9, 55, 50, 1) 100%);
    isolation: isolate;
}

.landing-mockup-inner i {
    font-size: 3rem;
    opacity: 0.85;
}

.landing-mockup-inner p {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

.landing-mockup-doctor {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    mix-blend-mode: multiply;
    filter: contrast(1.08) saturate(1.02);
}

@media (min-width: 992px) {
    .landing-hero .row {
        align-items: center;
    }
    .landing-mockup {
        margin-top: 0;
    }
}

/* —— Problem —— */
.landing-problem {
    background: var(--landing-problem-tint);
}

.landing-section-title {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.5rem;
    text-align: center;
}

.landing-problem-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .landing-problem-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.landing-problem-card {
    background: #fff;
    border-radius: var(--landing-radius);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.landing-problem-card .emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.landing-problem-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #334155;
}

/* —— Features grid —— */
.landing-features {
    background: var(--landing-surface);
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .landing-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .landing-feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.landing-feature-card {
    background: #fff;
    border-radius: var(--landing-radius);
    padding: 1.35rem;
    height: 100%;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 107, 91, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

a.landing-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(15, 107, 91, 0.12);
    color: inherit;
}

.landing-feature-card .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
    background: rgba(13, 148, 136, 0.12);
    color: var(--landing-teal);
}

.landing-feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: #0f172a;
}

.landing-feature-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.landing-feature-card .cta {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--landing-green);
}

/* —— How it works —— */
.landing-how {
    background: #fff;
}

.landing-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .landing-steps {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 0.5rem;
    }
}

.landing-step {
    flex: 1;
    text-align: center;
    padding: 1rem 0.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .landing-step:not(:last-child)::after {
        content: "→";
        position: absolute;
        right: -0.35rem;
        top: 2.25rem;
        color: #cbd5e1;
        font-size: 1.25rem;
    }
}

.landing-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--landing-green);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.landing-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.25rem 0 0;
    color: #0f172a;
}

.landing-step p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0.35rem 0 0;
}

/* —— Trust —— */
.landing-trust {
    background: #fff;
}

.landing-trust-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .landing-trust-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.landing-trust-bullets {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-trust-bullets div {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #334155;
}

.landing-trust-bullets i {
    color: var(--landing-teal);
    margin-top: 0.15rem;
}

.landing-testimonial {
    background: #f8fafc;
    border-radius: var(--landing-radius);
    padding: 1.35rem;
    border: 1px solid #e2e8f0;
}

.landing-testimonial blockquote {
    margin: 0;
    font-size: 1rem;
    font-style: italic;
    color: #334155;
}

.landing-testimonial footer {
    margin-top: 0.75rem;
    font-size: 0.88rem;
    color: #64748b;
}

.landing-avatar-row {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.landing-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488, #0f6b5b);
    opacity: 0.85;
}

/* —— Final CTA —— */
.landing-cta {
    background: linear-gradient(135deg, var(--landing-green-dark) 0%, var(--landing-green) 50%, #0f766e 100%);
    color: #fff;
    text-align: center;
}

.landing-cta h2 {
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 800;
    margin: 0 0 1rem;
}

.landing-cta .landing-hero-ctas {
    justify-content: center;
}

.landing-cta .landing-btn-primary {
    background: #fff !important;
    border-color: #fff !important;
    color: var(--landing-green) !important;
}

.landing-cta .landing-btn-primary:hover {
    background: #f0fdf9 !important;
}

.landing-cta .landing-btn-outline {
    border-color: rgba(255, 255, 255, 0.85);
    color: #fff;
}

.landing-cta .landing-btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.landing-wa {
    margin-top: 1rem;
}

.landing-wa a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.15rem;
    border-radius: 12px;
    background: #25d366;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
}

.landing-wa a:hover {
    background: #1ebe57;
    color: #fff !important;
}

/* —— Logged-in strip —— */
.landing-logged-tools {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1rem 0.75rem 0;
}

/* —— FAB —— */
.landing-fab {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 1040;
    min-height: 52px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(15, 107, 91, 0.35);
    background: var(--landing-green) !important;
    border: none;
    color: #fff !important;
}

.landing-fab:hover {
    background: var(--landing-green-dark) !important;
    color: #fff !important;
}

@media (min-width: 992px) {
    .landing-fab {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

/* Footer nav (layout) */
.footer-nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.footer-nav-link {
    color: var(--text-secondary, #64748b);
    text-decoration: none;
}

.footer-nav-link:hover {
    color: var(--landing-teal);
    text-decoration: underline;
}

html[data-bs-theme="dark"] .landing-hero {
    background: linear-gradient(165deg, #0f172a 0%, #134e4a 45%, #0f172a 100%);
}

html[data-bs-theme="dark"] .landing-hero-headline,
html[data-bs-theme="dark"] .landing-section-title {
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .landing-hero-sub {
    color: #94a3b8;
}

html[data-bs-theme="dark"] .landing-problem-card,
html[data-bs-theme="dark"] .landing-feature-card {
    background: #1e293b;
    border-color: rgba(148, 163, 184, 0.15);
}

html[data-bs-theme="dark"] .landing-feature-card h3 {
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .landing-hero-brand-title {
    color: #5eead4;
}

html[data-bs-theme="dark"] .landing-hero-brand-sub,
html[data-bs-theme="dark"] .landing-hero-trust,
html[data-bs-theme="dark"] .landing-feature-card p,
html[data-bs-theme="dark"] .landing-step p,
html[data-bs-theme="dark"] .landing-testimonial footer {
    color: #94a3b8;
}

html[data-bs-theme="dark"] .landing-problem {
    background: #111827;
}

html[data-bs-theme="dark"] .landing-features,
html[data-bs-theme="dark"] .landing-how,
html[data-bs-theme="dark"] .landing-trust {
    background: #0f172a;
}

html[data-bs-theme="dark"] .landing-problem-card h3,
html[data-bs-theme="dark"] .landing-step h3,
html[data-bs-theme="dark"] .landing-trust-bullets div,
html[data-bs-theme="dark"] .landing-testimonial blockquote {
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .landing-problem-card {
    background: #1e293b;
    border-color: rgba(248, 113, 113, 0.2);
}

html[data-bs-theme="dark"] .landing-feature-card .icon-wrap {
    background: rgba(45, 212, 191, 0.16);
    color: #5eead4;
}

html[data-bs-theme="dark"] .landing-feature-card .cta {
    color: #5eead4;
}

html[data-bs-theme="dark"] .landing-step:not(:last-child)::after {
    color: #64748b;
}

html[data-bs-theme="dark"] .landing-testimonial {
    background: #0b1220;
    border-color: #334155;
}

html[data-bs-theme="dark"] .landing-btn-outline {
    color: #5eead4;
    border-color: #2dd4bf;
}

html[data-bs-theme="dark"] .landing-btn-outline:hover {
    background: rgba(45, 212, 191, 0.14);
    color: #99f6e4;
}

html[data-bs-theme="dark"] .landing-logged-tools .fw-semibold {
    color: #e2e8f0;
}
