/* =====================================================
   DealMate.ai — Landing Hero (Refresh)
   Full-bleed hero image + frosted glass "Match Me" card.
   Scoped to the #welcome view. Frameless header (hamburger
   floats over the hero) is applied via body.dm-landing.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
    --dm-hero-ink: #1f2733;
    --dm-hero-muted: #7a8398;
    --dm-hero-brand: #2f7df5;          /* vivid azure accent + active chips/pills */
    --dm-hero-brand-rgb: 47, 125, 245;
    --dm-hero-btn-1: #93acf5;          /* button gradient start (light) */
    --dm-hero-btn-2: #6f8ef2;          /* button gradient end */
    --dm-hero-card: rgba(255, 255, 255, 0.62);
    --dm-hero-line: rgba(15, 23, 42, 0.06);
    --dm-hero-radius: 26px;
    --dm-hero-font-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dm-hero-font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Full-bleed hero (breaks out of the centered .container) ---- */
#welcome .dm-hero {
    position: relative;
    box-sizing: border-box;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 40px 18px 48px;
    background: #eef2f8;
}

#welcome .dm-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    pointer-events: none;
}

#welcome .dm-hero__veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
            rgba(238, 242, 248, 0.55) 0%,
            rgba(238, 242, 248, 0.35) 45%,
            rgba(238, 242, 248, 0.92) 100%);
}

/* ---- Glass card ---- */
#welcome .dm-hero__wrap {
    position: relative;
    width: 100%;
    max-width: 600px;
}

#welcome .dm-hero__card {
    background: var(--dm-hero-card);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--dm-hero-radius);
    padding: 34px 34px 30px;
    box-shadow: 0 30px 60px -20px rgba(20, 31, 64, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    text-align: left;
}

#welcome .dm-hero__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

#welcome .dm-hero__brand {
    font-family: var(--dm-hero-font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--dm-hero-ink);
}

/* In-card hamburger — sits at the far-right corner, aligned with the logo */
#welcome .dm-hero__menu {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    border: 1px solid var(--dm-hero-line);
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

#welcome .dm-hero__menu:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px -4px rgba(20, 31, 64, 0.2);
}

#welcome .dm-hero__menu span {
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: var(--dm-hero-ink);
}

#welcome .dm-hero__brand-accent,
#welcome .dm-hero__title-accent {
    color: var(--dm-hero-brand);
}

#welcome .dm-hero__title {
    font-family: var(--dm-hero-font-heading);
    font-size: clamp(28px, 6vw, 38px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--dm-hero-ink);
    margin: 0 0 26px;
}

/* ---- Search field ---- */
#welcome .dm-hero__search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--dm-hero-line);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

#welcome .dm-hero__search:focus-within {
    border-color: rgba(var(--dm-hero-brand-rgb), 0.45);
    box-shadow: 0 0 0 4px rgba(var(--dm-hero-brand-rgb), 0.12);
}

#welcome .dm-hero__search i {
    color: var(--dm-hero-muted);
    font-size: 16px;
    flex-shrink: 0;
}

#welcome .dm-hero__search input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--dm-hero-font-body);
    font-size: 16px;
    color: var(--dm-hero-ink);
}

#welcome .dm-hero__search input::placeholder {
    color: #9aa3b5;
}

/* ---- Filter chips ---- */
#welcome .dm-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

#welcome .dm-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

#welcome .dm-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

#welcome .dm-chip__in {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--dm-hero-line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--dm-hero-ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-family: var(--dm-hero-font-body);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.16s ease;
    white-space: nowrap;
}

#welcome .dm-chip__in i {
    font-size: 12px;
    color: var(--dm-hero-brand);
    transition: color 0.16s ease;
}

#welcome .dm-chip:hover .dm-chip__in {
    background: #ffffff;
    border-color: rgba(var(--dm-hero-brand-rgb), 0.4);
}

#welcome .dm-chip:has(input:checked) .dm-chip__in {
    background: var(--dm-hero-brand);
    border-color: var(--dm-hero-brand);
    color: #ffffff;
    box-shadow: 0 6px 14px -6px rgba(var(--dm-hero-brand-rgb), 0.7);
}

#welcome .dm-chip:has(input:checked) .dm-chip__in i {
    color: #ffffff;
}

/* premium 🔒 badge injected by index.html stays readable inside the chip */
#welcome .dm-chip .premium-badge {
    margin-left: 4px;
}

/* ---- Budget ---- */
#welcome .dm-hero__budget {
    margin-top: 22px;
}

#welcome .dm-hero__budget-label {
    display: block;
    font-family: var(--dm-hero-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dm-hero-muted);
    margin-bottom: 10px;
}

#welcome .dm-hero__budget-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

#welcome .dm-pill {
    border: 1px solid var(--dm-hero-line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--dm-hero-ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-family: var(--dm-hero-font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
    line-height: 1;
}

#welcome .dm-pill:hover {
    background: #ffffff;
    border-color: rgba(var(--dm-hero-brand-rgb), 0.4);
}

#welcome .dm-pill.is-active {
    background: var(--dm-hero-brand);
    border-color: var(--dm-hero-brand);
    color: #ffffff;
    box-shadow: 0 6px 14px -6px rgba(var(--dm-hero-brand-rgb), 0.7);
}

#welcome .dm-pill--custom {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 6px 14px;
}

#welcome .dm-pill--custom .dm-pill__dollar {
    opacity: 0.6;
    font-weight: 600;
}

#welcome .dm-pill--custom input {
    width: 72px;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--dm-hero-font-body);
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

#welcome .dm-pill--custom.is-active input::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

#welcome .dm-pill--custom input::placeholder {
    color: #9aa3b5;
    font-weight: 500;
}

/* ---- CTA ---- */
#welcome .dm-hero__cta {
    margin-top: 26px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 999px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--dm-hero-btn-1) 0%, var(--dm-hero-btn-2) 100%);
    color: #ffffff;
    font-family: var(--dm-hero-font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 16px 30px -12px rgba(111, 142, 242, 0.65);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#welcome .dm-hero__cta i {
    font-size: 13px;
    transition: transform 0.15s ease;
}

#welcome .dm-hero__cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 20px 36px -12px rgba(111, 142, 242, 0.7);
}

#welcome .dm-hero__cta:hover i {
    transform: translateX(3px);
}

#welcome .dm-hero__cta:active {
    transform: translateY(0) scale(0.99);
}

#welcome .dm-hero__how {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-family: var(--dm-hero-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--dm-hero-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

#welcome .dm-hero__how:hover {
    color: var(--dm-hero-brand);
}

/* =====================================================
   FRAMELESS HEADER (body.dm-landing)
   The global header bar is removed entirely on the landing view; the
   hamburger lives inside the card (.dm-hero__menu) instead. This lets the
   hero start at the very top of the page.
   ===================================================== */
body.dm-landing .container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.dm-landing #welcome {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.dm-landing .main-header {
    display: none !important;
}

/* The nav-menu overlay should cover from the very top on the frameless landing. */
body.dm-landing .nav-menu {
    top: 0;
    height: 100vh;
}

/* =====================================================
   NAV MENU CLOSE (X) BUTTON
   Fixed top-right of the menu overlay so it stays reachable while scrolling.
   ===================================================== */
.nav-menu .nav-close {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 1002;
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--dm-hero-line, rgba(15, 23, 42, 0.08));
    border-radius: 12px;
    background: #ffffff;
    color: #1f2733;
    cursor: pointer;
    box-shadow: 0 4px 14px -6px rgba(20, 31, 64, 0.25);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-menu.active .nav-close {
    display: inline-flex;
}

.nav-menu .nav-close:hover {
    background: #f3f5f9;
    box-shadow: 0 6px 18px -6px rgba(20, 31, 64, 0.3);
}

.nav-menu .nav-close:active {
    transform: scale(0.94);
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    #welcome .dm-hero {
        padding: 20px 14px 32px;
    }

    #welcome .dm-hero__card {
        padding: 24px 22px 24px;
        border-radius: 22px;
    }
}

/* ---- Service Pro launch modal ---- */
.sp-launch-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: spLaunchFadeIn 0.28s ease-out;
}

.sp-launch-overlay[hidden] {
    display: none !important;
}

@keyframes spLaunchFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spLaunchSlideUp {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sp-launch-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 36px 32px 28px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 32px 64px -24px rgba(20, 31, 64, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    text-align: center;
    font-family: var(--dm-hero-font-body, 'Manrope', sans-serif);
    animation: spLaunchSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-launch-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sp-launch-close:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #334155;
}

.sp-launch-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(147, 172, 245, 0.35), rgba(111, 142, 242, 0.25));
    color: #3b5bcc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sp-launch-title {
    margin: 0 0 10px;
    font-family: var(--dm-hero-font-heading, 'Sora', sans-serif);
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dm-hero-ink, #1f2733);
    line-height: 1.25;
}

.sp-launch-lead {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--dm-hero-muted, #7a8398);
}

.sp-launch-date {
    margin: 0 0 18px;
    font-family: var(--dm-hero-font-heading, 'Sora', sans-serif);
    font-size: clamp(2rem, 6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--dm-hero-btn-2, #6f8ef2) 0%, var(--dm-hero-brand, #2f7df5) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sp-launch-copy {
    margin: 0 0 26px;
    font-size: 15px;
    line-height: 1.6;
    color: #5c6478;
}

.sp-launch-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--dm-hero-btn-1, #93acf5) 0%, var(--dm-hero-btn-2, #6f8ef2) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 30px -12px rgba(111, 142, 242, 0.65);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.sp-launch-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 20px 36px -12px rgba(111, 142, 242, 0.7);
}

.sp-launch-btn:active {
    transform: translateY(0) scale(0.99);
}

@media (max-width: 480px) {
    .sp-launch-modal {
        padding: 30px 22px 24px;
        border-radius: 22px;
    }
}
