/* ================================================
   WEBSITE MARKET
   Palette: Warm monochrome — charcoal on white
   Register: Brand / Landing page
   Strategy: Restrained — near-black accent, pure white surface
   ================================================ */

/* ── Tokens ──────────────────────────────────────── */
:root {
    /* Brand — warm near-black (ink itself is the accent) */
    --primary:       oklch(0.22 0.012 52);
    --primary-hover: oklch(0.16 0.010 52);
    --primary-text:  oklch(0.965 0.005 52);

    /* Surfaces */
    --bg:            oklch(1.000 0.000 0);   /* pure white */
    --surface:       oklch(0.978 0.004 70);  /* barely warm off-white */
    --surface-dark:  oklch(0.17 0.010 52);   /* warm near-black footer/cta */

    /* Ink on white — all ≥ 4.5:1 */
    --ink:           oklch(0.148 0.010 52);  /* ~17:1 */
    --ink-2:         oklch(0.44 0.010 52);   /* ~5:1 */
    --ink-3:         oklch(0.56 0.008 52);   /* muted, decorative only */

    /* Ink on dark */
    --on-dark:       oklch(0.960 0.005 52);  /* warm near-white */
    --on-dark-2:     oklch(0.70 0.010 52);   /* secondary on dark — ~5:1 */

    /* Borders */
    --border:        oklch(0.900 0.006 70);
    --border-focus:  oklch(0.80 0.008 52);

    /* Type */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-std: cubic-bezier(0.32, 0.72, 0, 1);
}


/* ── Reset ───────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }


/* ── Navigation ──────────────────────────────────── */
#nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 72px);
    height: 64px;
    background: oklch(1 0 0 / 0);
    border-bottom: 1px solid transparent;
    transition:
        background   0.4s var(--ease-out),
        border-color 0.4s var(--ease-out);
}

#nav.scrolled {
    background: oklch(1 0 0 / 0.94);
    border-bottom-color: var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-logo {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.nav-logo span {
    color: var(--ink-2);
    font-weight: 400;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    min-height: 44px;
    background: var(--primary);
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 100px;
    transition:
        background 0.2s var(--ease-out),
        transform  0.2s var(--ease-out);
}

.nav-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.nav-cta:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}


/* ── Hero ────────────────────────────────────────── */
#hero {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 320px);
    padding: clamp(72px, 9vw, 100px) clamp(20px, 5vw, 72px) clamp(20px, 2.5vw, 32px);
}

.hero-inner {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.hero-h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.10;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
    margin-bottom: clamp(14px, 2vw, 22px);
    animation: enter-fade 0.9s var(--ease-out) both;
}

.hero-sub {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    font-weight: 400;
    color: var(--ink-2);
    margin-bottom: clamp(24px, 4vw, 40px);
    animation: enter-fade 0.9s 0.09s var(--ease-out) both;
}


/* ── Search bar ──────────────────────────────────── */
.search-wrap {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    border: 1.5px solid var(--border-focus);
    border-radius: 10px;
    overflow: hidden;
    transition:
        border-color 0.2s var(--ease-out),
        box-shadow   0.2s var(--ease-out);
    animation: enter-fade 0.9s 0.18s var(--ease-out) both;
}

.search-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px oklch(0.22 0.012 52 / 0.10);
}

.search-box {
    display: flex;
    background: var(--bg);
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: clamp(16px, 2.5vw, 22px) clamp(16px, 2.5vw, 24px);
    font-family: var(--font-body);
    font-size: max(1rem, 16px);
    font-weight: 400;
    color: var(--ink);
    background: transparent;
    border: none;
    outline: none;
}

.search-input::placeholder {
    color: oklch(0.56 0.006 52);
}

.search-btn {
    flex-shrink: 0;
    padding: clamp(16px, 2.5vw, 22px) clamp(18px, 3.5vw, 36px);
    background: var(--primary);
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 44px;
    transition: background 0.2s var(--ease-out);
}

.search-btn:hover { background: var(--primary-hover); }

.search-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -3px;
}


/* ── Search results ──────────────────────────────── */
#results-section {
    display: none;
    padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 72px);
    background: var(--bg);
    border-top: 1px solid var(--border);
}

#results-section.visible { display: block; }

.results-inner { max-width: 1100px; margin: 0 auto; }

.results-header { margin-bottom: clamp(20px, 3vw, 40px); }

.results-title {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.results-count {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-2);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(12px, 2vw, 20px);
}

.business-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: clamp(20px, 2.5vw, 28px);
    cursor: pointer;
    transition:
        border-color 0.2s var(--ease-out),
        transform    0.25s var(--ease-out);
}

.business-card:hover {
    border-color: var(--ink-2);
    transform: translateY(-2px);
}

.business-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.card-category {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 7px;
}

.card-name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    font-weight: 600;
    font-style: normal;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}

.card-city {
    font-family: var(--font-body);
    font-size: 0.84rem;
    color: var(--ink-2);
    margin-bottom: clamp(14px, 2vw, 20px);
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: clamp(16px, 2.5vw, 22px);
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-2);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: clamp(14px, 2vw, 20px);
    border-top: 1px solid var(--border);
}

.card-price {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.card-price em {
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--ink-3);
    letter-spacing: 0;
    margin-left: 4px;
}

.card-btn {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    transition: color 0.2s var(--ease-out);
}

.business-card:hover .card-btn { color: var(--ink); }

.no-results {
    grid-column: 1 / -1;
    padding: clamp(40px, 6vw, 80px) 0;
    text-align: center;
}

.no-results-title {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 10px;
}

.no-results-sub {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.65;
}

.no-results-sub a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--border-focus);
    text-underline-offset: 3px;
}

.load-error {
    grid-column: 1 / -1;
    padding: clamp(20px, 3vw, 36px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--ink-2);
}

.load-error strong { color: var(--ink); }

.load-error code {
    font-family: monospace;
    font-size: 0.88em;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 3px;
}


/* ── Stats ───────────────────────────────────────── */
#stats {
    background: var(--bg);
    padding: clamp(12px, 2vw, 20px) 0;
    border-top: 1px solid var(--border);
}

.stats-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 72px);
}

.stat-row {
    display: grid;
    grid-template-columns: clamp(88px, 10vw, 120px) 1fr;
    align-items: baseline;
    gap: clamp(16px, 3vw, 44px);
    padding: clamp(10px, 1.8vw, 16px) 0;
    border-top: 1px solid var(--border);
}

.stat-row:nth-child(1) { animation: enter-fade 0.8s 0.22s var(--ease-out) both; }
.stat-row:nth-child(2) { animation: enter-fade 0.8s 0.32s var(--ease-out) both; }
.stat-row:nth-child(3) { animation: enter-fade 0.8s 0.42s var(--ease-out) both; }

.stat-row:last-child {
    border-bottom: 1px solid var(--border);
}

.stat-pct {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.8vw, 3rem);
    font-weight: 300;
    font-style: normal;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.stat-claim {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 50ch;
}


/* ── How it works ────────────────────────────────── */
#how {
    background: var(--surface);
    padding: clamp(60px, 9vw, 120px) clamp(20px, 5vw, 72px);
}

.how-inner {
    max-width: 680px;
    margin: 0 auto;
}

.how-title {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: clamp(32px, 5vw, 60px);
}

.step {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: start;
    gap: clamp(20px, 3vw, 32px);
    padding: clamp(24px, 3.5vw, 40px) 0;
    border-top: 1px solid var(--border);
}

.step:last-child {
    border-bottom: 1px solid var(--border);
}

.step-number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    font-style: italic;
    color: var(--border-focus);
    line-height: 1;
    padding-top: 3px;
}

.step-content {}

.step-title {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.step-desc {
    font-family: var(--font-body);
    font-size: clamp(0.88rem, 1.3vw, 0.98rem);
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 48ch;
    text-wrap: pretty;
}


/* ── All Builds page ─────────────────────────────── */
.builds-header {
    background: var(--bg);
    padding: clamp(88px, 10vw, 120px) clamp(20px, 5vw, 72px) clamp(24px, 3vw, 40px);
}

.builds-header-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.builds-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 600;
    font-style: italic;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 10px;
}

.builds-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--ink-2);
}

.builds-body {
    padding: 0 clamp(20px, 5vw, 72px) clamp(64px, 9vw, 120px);
    background: var(--bg);
}

.builds-body .results-grid {
    max-width: 1100px;
    margin: 0 auto;
}


/* ── CTA ─────────────────────────────────────────── */
#cta {
    background: var(--surface-dark);
    padding: clamp(64px, 10vw, 140px) clamp(20px, 5vw, 72px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--on-dark);
    text-wrap: balance;
    margin-bottom: clamp(14px, 2vw, 22px);
}

.cta-sub {
    font-family: var(--font-body);
    font-size: clamp(0.88rem, 1.3vw, 1rem);
    line-height: 1.7;
    color: var(--on-dark-2);
    max-width: 40ch;
    margin: 0 auto clamp(28px, 4vw, 44px);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 40px;
    min-height: 48px;
    background: var(--on-dark);
    color: var(--surface-dark);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 100px;
    transition:
        opacity   0.2s var(--ease-out),
        transform 0.2s var(--ease-out);
}

.cta-btn:hover {
    opacity: 0.90;
    transform: translateY(-1px);
}

.cta-btn:focus-visible {
    outline: 2px solid var(--on-dark);
    outline-offset: 4px;
}


/* ── Footer ──────────────────────────────────────── */
footer {
    background: var(--surface-dark);
    border-top: 1px solid oklch(0.30 0.008 52);
    padding: clamp(24px, 3.5vw, 44px) clamp(20px, 5vw, 72px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-logo {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--on-dark);
    letter-spacing: -0.01em;
}

.footer-logo span {
    color: var(--on-dark-2);
    font-weight: 400;
}

.footer-builds-link {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--on-dark-2);
    text-decoration: none;
    transition: color 0.2s var(--ease-out);
}

.footer-builds-link:hover { color: var(--on-dark); }

.footer-copy {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--on-dark-2);
    line-height: 1.5;
}


/* ── Modal ───────────────────────────────────────── */
#modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: oklch(0.14 0.008 52 / 0.68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: stretch;
}

#modal-overlay.open { display: flex; }

.modal {
    background: var(--bg);
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 28px);
    height: 56px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 16px;
}

.modal-business-name {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.modal-purchase-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    min-height: 36px;
    background: var(--primary);
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s var(--ease-out);
}

.modal-purchase-btn:hover { background: var(--primary-hover); }

.modal-purchase-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-text-short { display: none; }

.modal-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--ink-2);
    font-size: 0.8rem;
    line-height: 1;
    transition:
        background 0.2s var(--ease-out),
        color      0.2s var(--ease-out);
}

.modal-close:hover  { background: var(--border); color: var(--ink); }

.modal-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.modal-loading {
    position: absolute;
    inset: 0;
    background: var(--bg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 2;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-2);
}

.loader {
    width: 26px;
    height: 26px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.modal-pricing {
    display: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: var(--bg);
}

.pricing-wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 48px);
    text-align: center;
}

.pricing-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 400;
    font-style: italic;
    color: var(--ink);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.pricing-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink-2);
    margin-bottom: clamp(28px, 4vw, 44px);
}

.pricing-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.plan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: clamp(20px, 3vw, 32px) 16px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.plan-card:hover {
    border-color: var(--ink-2);
    transform: translateY(-2px);
}

.plan-card--featured {
    border-color: var(--primary);
    background: var(--surface);
}

.plan-card--featured:hover { border-color: var(--ink); }

.plan-name {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.plan-price {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 300;
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1;
}

.plan-price em {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--ink-3);
    letter-spacing: 0;
}

.plan-note {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--ink-2);
}

.pricing-legal {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--ink-3);
    line-height: 1.6;
}

@media (max-width: 400px) {
    .pricing-plans { grid-template-columns: 1fr; }
}


/* ── Keyframes ───────────────────────────────────── */
@keyframes enter-fade {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

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


/* ── Scroll-driven reveals ───────────────────────── */
@supports (animation-timeline: view()) {
    .step {
        animation: reveal-in linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 38%;
    }
}


/* ── Reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .loader {
        animation: none;
        border-color: var(--ink-3);
        border-top-color: var(--ink-3);
    }
}


/* ── Responsive ──────────────────────────────────── */
@media (max-width: 640px) {
    .stat-row {
        grid-template-columns: 72px 1fr;
        gap: 12px;
    }

    .stat-pct { font-size: clamp(1.7rem, 8.5vw, 2.1rem); }

    .step {
        grid-template-columns: 40px 1fr;
        gap: 16px;
    }

    .step-number { font-size: 1.8rem; }

    .btn-text-full  { display: none; }
    .btn-text-short { display: inline; }

    .results-grid { grid-template-columns: 1fr; }

    footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .nav-cta {
        padding: 8px 14px;
        font-size: 0.68rem;
        letter-spacing: 0.05em;
    }

    .search-btn {
        padding: 16px 14px;
        font-size: 0.7rem;
        letter-spacing: 0.06em;
    }
}


/* ── Contact section ─────────────────────────────── */
#contact {
    background: var(--bg);
    padding: 28px clamp(20px, 5vw, 72px);
    text-align: center;
    border-top: 1px solid var(--border);
}

.contact-inner {
    max-width: 580px;
    margin: 0 auto;
}

.contact-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink-2);
}

.contact-link {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.15s var(--ease-out);
}

.contact-link:hover { opacity: 0.65; }


/* ── Demo modal ──────────────────────────────────── */
#demo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease-out);
}

#demo-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.demo-modal {
    background: var(--bg);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    transform: translateY(12px);
    transition: transform 0.25s var(--ease-out);
}

#demo-modal-overlay.open .demo-modal {
    transform: translateY(0);
}

.demo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.demo-modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--ink);
}

.demo-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: background 0.15s var(--ease-out);
}

.demo-modal-close:hover { background: var(--border); }

.demo-modal-body {
    padding: 20px 24px 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.form-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink-3);
    font-size: 0.78rem;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s var(--ease-out);
}

.form-input:focus {
    border-color: var(--border-focus);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.demo-submit-btn {
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    background: var(--primary);
    color: var(--primary-text);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.demo-submit-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.demo-success {
    text-align: center;
    padding: 20px 0;
}

.demo-success-msg {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
}
