/* =================================================================
 * Homepage first screen: heading + action box (Codex SPEC-A-LEAN).
 * Everything is scoped to body.home-page and .home-hero / .home-action*.
 * Markup: resources/views/partials/home-action.blade.php
 * Script: public/assets/js/home-action.js
 * ================================================================= */

/* ── Header: normal document flow with a stable slot (88 / 64 px) ── */
.home-page #header-sticky.header-1,
.home-page #header-sticky.sticky {
    position: relative !important;
    top: auto !important;
    z-index: 1000;
    background-color: transparent !important;
    border-bottom-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    animation: none !important;
}

.home-page #header-sticky .header-main {
    height: 64px;
    min-height: 64px;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .home-page #header-sticky .header-main {
        height: 88px;
        min-height: 88px;
    }
}

/* ── Scroll clearance for the cookie notice (fixed, never measured) ── */
html:has(body.home-page) {
    scroll-padding-bottom: calc(224px + env(safe-area-inset-bottom));
}

body.home-page.home-cookie-pending {
    padding-bottom: calc(224px + env(safe-area-inset-bottom));
}

/* Dialogs above the cookie notice (z-index 99999) on the homepage. */
.home-page .mfp-bg {
    z-index: 100010;
}

.home-page .mfp-wrap {
    z-index: 100011;
}

/* Sentence case as written (the theme capitalizes every h3). */
.home-page #signup-prompt-popup h3 {
    text-transform: none;
}

.home-page #signup-prompt-popup .signup-popup-close {
    width: 44px;
    height: 44px;
    top: 12px;
    right: 12px;
}

.home-page .home-signin-warning {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #331E24;
    color: #FFABAB;
    font-size: 14px;
    line-height: 20px;
    text-align: left;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.home-hero {
    position: relative;
    padding: 40px 0 64px;
    background: #151518;
    color: #F8F8FA;
    font-family: "Satoshi Variable", sans-serif;
}

.home-hero-inner {
    width: min(100% - 32px, 1040px);
    margin: 0 auto;
    text-align: center;
}

.home-hero-title {
    margin: 0;
    color: #F8F8FA;
    font-family: inherit;
    font-size: 48px;
    line-height: 58px;
    font-weight: 500;
    letter-spacing: -1.4px;
    text-transform: none;
}

.home-hero-title-line {
    display: inline;
}

.home-hero-subtitle {
    max-width: 760px;
    margin: 12px auto 0;
    color: #BDBDC8;
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
}

.home-action-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 24px;
}

.home-action-links a {
    color: #EFFB53;
    text-decoration: underline;
}

/* ── Panel ──────────────────────────────────────────────────────── */
.home-action {
    box-sizing: border-box;
    width: 100%;
    max-width: 840px;
    margin: 24px auto 0;
    padding: 24px;
    background: #1D1D23;
    border: 1px solid #3B3B46;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
    color: #F8F8FA;
    font-family: "Satoshi Variable", sans-serif;
    text-align: left;
}

.home-action *,
.home-action *::before,
.home-action *::after {
    box-sizing: border-box;
}

.home-action button,
.home-action textarea,
.home-action input {
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
}

.home-action button,
.home-action textarea {
    scroll-margin-top: 80px;
}

/* ── Prompt ─────────────────────────────────────────────────────── */
.home-action-prompt {
    margin-top: 0;
}

.home-action-label {
    display: block;
    margin: 0;
    color: #F8F8FA;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-transform: none;
}

.home-action-textarea {
    display: block;
    width: 100%;
    height: 96px;
    min-height: 72px;
    margin: 8px 0 0;
    padding: 14px;
    border: 1px solid #676775;
    border-radius: 12px;
    background: #151518;
    color: #F8F8FA;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    resize: vertical;
    transition: border-color .12s ease;
}

.home-action-textarea::placeholder {
    color: #A4A4B3;
    opacity: 1;
}

.home-action-textarea:hover {
    border-color: #9898A6;
}

.home-action-textarea:focus {
    outline: none;
}

.home-action-textarea[aria-invalid="true"] {
    border-color: #E47F7F;
}

/* ── Actions ────────────────────────────────────────────────────── */
.home-action-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.home-action-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    height: 48px;
    margin: 0;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 700;
    text-align: center;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}

.home-action-primary {
    flex: 0 0 auto;
    min-width: 192px;
    margin-left: auto;
    padding: 0 20px;
    border: 1px solid transparent;
    background: var(--theme, #EFFB53);
    color: #151518;
}

.home-action-primary:hover {
    background: #E5F040;
}

.home-action-primary:active {
    background: #D9E539;
}

.home-action-primary.is-busy,
.home-action-primary.is-busy:hover,
.home-action-primary.is-busy:active {
    background: #34343E;
    color: #B6B6C2;
    cursor: wait;
}

.home-action-primary-label {
    min-width: 0;
}

.home-action-primary:focus-visible,
.home-action-textarea:focus-visible,
.home-action-help a:focus-visible,
.home-action-help button:focus-visible {
    outline: 2px solid #EFFB53;
    outline-offset: 3px;
}

.home-action-textarea:disabled {
    cursor: wait;
}

.home-action-textarea:disabled {
    color: #B6B6C2;
}

/* ── Messages and information ───────────────────────────────────── */
.home-action-message {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    color: #BDBDC8;
    font-size: 13px;
    line-height: 20px;
    font-weight: 500;
    text-align: left;
}

.home-action-message[hidden] {
    display: none;
}

.home-action-message.is-error {
    color: #FFABAB;
}

.home-action-message i {
    flex: 0 0 auto;
    line-height: 20px;
}

.home-action-submit {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #24242B;
}

.home-action-submit.is-error {
    background: #331E24;
}

.home-action-submit .home-action-message {
    margin: 0;
}

.home-action-help {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 4px 0 0 20px;
    font-size: 13px;
    line-height: 20px;
}

.home-action-help[hidden] {
    display: none;
}

.home-action-help a,
.home-action-help button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #EFFB53;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.home-action-help a[hidden],
.home-action-help button[hidden] {
    display: none;
}

.home-action-info {
    min-height: 40px;
    margin: 12px 0 0;
    color: #BDBDC8;
    font-size: 13px;
    line-height: 20px;
    font-weight: 400;
    text-align: left;
}

@media (prefers-reduced-motion: reduce) {
    .home-action .fa-spin {
        animation: none;
    }
}

/* ── Lower homepage: tool suite right after the hero ──────────────── */
.home-page .home-suite {
    padding-top: 48px;
}

/* ── Tablet 768..1023 ───────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .home-hero-title {
        font-size: 40px;
        line-height: 48px;
    }
}

/* ── Mobile below 768 ───────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .home-hero {
        padding: 16px 0 32px;
    }

    .home-hero-title {
        font-size: 32px;
        line-height: 36px;
        letter-spacing: -0.8px;
    }

    .home-hero-title-line {
        display: block;
    }

    .home-hero-subtitle {
        max-width: 358px;
        margin-top: 8px;
        font-size: 15px;
        line-height: 20px;
    }

    .home-action {
        margin-top: 16px;
        padding: 16px;
        border-radius: 16px;
    }

    .home-action-textarea {
        height: 72px;
        padding: 10px;
    }

    .home-action-actions {
        margin-top: 12px;
    }

    .home-action-primary {
        width: 100%;
        min-width: 0;
        margin-left: 0;
        padding: 0 12px;
        font-size: 14px;
        white-space: normal;
    }

    .home-action-info {
        margin-top: 10px;
    }

    .home-page .home-suite {
        padding-top: 32px;
    }
}

