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

:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --surface-alt: #eef4ff;
    --surface-soft: #f9fbff;
    --ink: #15213c;
    --muted: #5f6b85;
    --line: #dbe4f5;
    --primary: #2854f0;
    --primary-dark: #1738b8;
    --secondary: #16a3a2;
    --secondary-dark: #0d7a78;
    --warm: #ff6b57;
    --shadow: 0 24px 60px rgba(20, 33, 60, 0.12);
    --shadow-soft: 0 16px 34px rgba(20, 33, 60, 0.08);
    --radius-lg: 30px;
    --radius-md: 22px;
    --radius-sm: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at top left, rgba(40, 84, 240, 0.1), transparent 36%),
        radial-gradient(circle at bottom right, rgba(22, 163, 162, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fe 100%);
    color: var(--ink);
    font-family: "Figtree", "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

a:hover {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

input,
select,
textarea,
button {
    font: inherit;
}

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

.page-shell {
    padding: 24px 0 60px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(219, 228, 245, 0.85);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.site-header-inner,
.site-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-header-inner {
    min-height: 84px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 12px;
}

.brand-wordmark {
    font-family: "Poppins", "Segoe UI", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}

.site-nav,
.site-actions,
.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.site-nav a,
.footer-links a {
    color: var(--muted);
    font-weight: 600;
}

.site-nav a:hover,
.footer-links a:hover {
    color: var(--primary);
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(219, 228, 245, 0.9);
    background: rgba(255, 255, 255, 0.88);
}

.site-footer-inner {
    padding: 30px 0 40px;
}

.footer-brand {
    max-width: 520px;
}

.footer-brand p {
    margin: 14px 0 0;
    color: var(--muted);
}

.footer-brand-link {
    margin-bottom: 10px;
}

.landing-page {
    display: grid;
    gap: 32px;
}

.homehunt-landing {
    padding-top: 8px;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 32px;
    align-items: center;
    padding: 32px 0 10px;
}

.hero-copy h1,
.surface h1 {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    font-size: clamp(2.7rem, 5vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.surface h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.surface h2,
.section-heading h2 {
    margin: 0 0 10px;
    font-family: "Poppins", "Segoe UI", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
}

.hero-lead,
.section-heading p,
.surface p,
.listing-card p,
.price-card p,
.history-item p,
.prose p,
.scenario-card p,
.feature-card p,
.search-meta,
.surface-intro {
    color: var(--muted);
}

.hero-lead {
    max-width: 680px;
    margin: 18px 0 0;
    font-size: 1.08rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-actions,
.site-actions,
.search-form-actions,
.cta-actions,
.inline-form,
.quick-auth-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 24px;
}

.hero-stats,
.scenario-grid,
.result-grid,
.pricing-grid,
.feature-grid,
.admin-stats {
    display: grid;
    gap: 18px;
}

.hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 30px;
}

.hero-stats article,
.scenario-card,
.price-card,
.listing-card,
.history-item,
.feature-card,
.process-item,
.count-chip,
.flash,
.media-card {
    border-radius: var(--radius-sm);
}

.hero-stats article {
    padding: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.hero-stats strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1.6rem;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

.hero-stats span {
    color: var(--muted);
}

.hero-visual {
    position: relative;
}

.hero-visual img {
    width: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: #dfe8f8;
}

.home-search-card,
.surface {
    padding: 30px;
    border: 1px solid rgba(219, 228, 245, 0.95);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.accent {
    background: linear-gradient(135deg, rgba(40, 84, 240, 0.1), rgba(22, 163, 162, 0.14));
}

.section-heading {
    max-width: 760px;
}

.homehunt-search-card {
    display: grid;
    gap: 18px;
}

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

.homehunt-fields label:last-child {
    grid-column: 1 / -1;
}

.homehunt-search-actions {
    display: grid;
    gap: 14px;
}

.search-panel-grid,
.content-section-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 24px;
    align-items: start;
}

.search-form,
.stack-form {
    display: grid;
    gap: 16px;
}

.search-form label,
.stack-form label {
    display: grid;
    gap: 8px;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--ink);
}

input,
select,
textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(40, 84, 240, 0.55);
    box-shadow: 0 0 0 4px rgba(40, 84, 240, 0.12);
}

textarea {
    resize: vertical;
}

.button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 26px rgba(40, 84, 240, 0.22);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover,
.link-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(40, 84, 240, 0.24);
}

.ghost {
    border-color: rgba(40, 84, 240, 0.18);
    background: #fff;
    color: var(--primary);
    box-shadow: none;
}

.secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    box-shadow: 0 14px 26px rgba(22, 163, 162, 0.22);
}

.wide {
    width: 100%;
}

.search-form-actions {
    margin-top: 4px;
}

.search-meta,
.surface-intro {
    margin: 0;
}

.scenario-grid,
.pricing-grid,
.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scenario-card,
.price-card,
.listing-card,
.history-item,
.feature-card,
.process-item {
    padding: 22px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.scenario-card h3,
.price-card h3,
.listing-card h3,
.feature-card h3 {
    margin: 0 0 10px;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

.listing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.listing-card .cta-actions {
    margin-top: auto;
    padding-top: 14px;
}

.price-card.featured {
    background: linear-gradient(180deg, rgba(40, 84, 240, 0.08), rgba(255, 255, 255, 1));
    transform: translateY(-8px);
}

.content-section {
    display: grid;
    gap: 20px;
}

.process-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.process-item strong {
    display: block;
    margin-bottom: 8px;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

.media-stack {
    display: grid;
    gap: 18px;
}

.media-card {
    width: 100%;
    min-height: 220px;
    object-fit: cover;
}

.search-results-panel {
    scroll-margin-top: 108px;
}

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

.result-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.count-chip {
    padding: 12px 16px;
    border: 1px solid rgba(40, 84, 240, 0.18);
    background: rgba(40, 84, 240, 0.08);
    color: var(--primary-dark);
    font-weight: 800;
    white-space: nowrap;
}

.count-chip-secondary {
    border-color: rgba(22, 163, 162, 0.18);
    background: rgba(22, 163, 162, 0.1);
    color: var(--secondary-dark);
}

.search-progress {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--surface-alt);
}

.spinner {
    width: 54px;
    height: 54px;
    border: 5px solid rgba(40, 84, 240, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.scraper-counts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.scraper-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(22, 163, 162, 0.1);
    color: var(--secondary-dark);
    border: 1px solid rgba(22, 163, 162, 0.18);
    font-size: 0.92rem;
    font-weight: 700;
}

.scraper-pill-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.scraper-pill-link:hover {
    transform: translateY(-1px);
    background: rgba(22, 163, 162, 0.16);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.scraper-pill-empty {
    opacity: 0.56;
}

.result-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.source-anchor-card {
    scroll-margin-top: 124px;
}

.source-anchor-card:target {
    border-color: rgba(40, 84, 240, 0.28);
    box-shadow: 0 0 0 3px rgba(40, 84, 240, 0.08), var(--shadow-soft);
}

.source {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.upgrade-cta {
    margin-top: 20px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

.dashboard-main {
    display: grid;
    gap: 24px;
}

.sidebar {
    align-self: start;
    position: sticky;
    top: 108px;
}

.side-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.side-links a,
.side-links form {
    margin: 0;
}

.link-button {
    width: 100%;
    border-color: rgba(40, 84, 240, 0.16);
    background: rgba(40, 84, 240, 0.06);
    color: var(--primary-dark);
    box-shadow: none;
}

.history-list {
    display: grid;
    gap: 14px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.history-item.stacked,
.history-header {
    display: grid;
    gap: 12px;
}

.auth-card {
    width: min(700px, 100%);
    margin: 0 auto;
}

.wide-card {
    width: min(860px, 100%);
}

.toggle {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

.toggle input {
    width: auto;
}

.flash {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 1px solid rgba(22, 163, 162, 0.18);
    background: rgba(22, 163, 162, 0.1);
}

.flash-info {
    color: var(--ink);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #fff;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    font-family: "Poppins", "Segoe UI", sans-serif;
}

.prose {
    width: min(900px, 100%);
    margin: 0 auto;
}

.lead {
    font-size: 1.08rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .home-hero,
    .search-panel-grid,
    .content-section-split,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 920px) {
    .site-header-inner,
    .site-footer-inner,
    .result-header,
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-stats,
    .scenario-grid,
    .pricing-grid,
    .feature-grid,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .homehunt-fields {
        grid-template-columns: 1fr;
    }

    .homehunt-fields label:last-child {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .shell {
        width: min(100% - 20px, 1160px);
    }

    .page-shell {
        padding-top: 18px;
    }

    .site-header-inner {
        padding: 14px 0;
    }

    .home-search-card,
    .surface {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-visual img {
        min-height: 280px;
    }
}
