@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&display=swap');

.homepage-header {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.homepage-logo img {
    height: 40px;
    width: auto;
}

.search-homepage .hero-block {
    display: grid;
    gap: 2.5rem;
    justify-items: center;
    text-align: center;
    padding: 5.5rem 0 2rem;
}

.search-homepage .hero-search {
    margin-top: 2.25rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.homepage-actions {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.header-partners-text {
    color: var(--gc-text-muted);
    font-size: 0.9rem;
}

.header-signup-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--gc-text-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--gc-text-primary);
}

.hero-title {
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    margin: 0;
    letter-spacing: -0.02em;
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: center;
    gap: 0.45rem;
    row-gap: 0.1rem;
    line-height: 1.05;
    white-space: nowrap;
}

.hero-main {
    font-weight: 700;
}

.hero-with-wrap {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.hero-caret {
    font-family: 'Caveat', cursive;
    font-size: clamp(2rem, 4vw, 3.4rem);
    color: var(--gc-primary);
    transform: rotate(-12deg);
    display: inline-block;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-script {
    position: absolute;
    top: calc(-3.5rem - 9px);
    left: -1.25rem;
    font-family: 'Caveat', cursive;
    font-size: clamp(2rem, 4vw, 3.4rem);
    color: var(--gc-primary);
    transform: rotate(-10deg);
    white-space: nowrap;
    display: inline-flex;
    gap: 0.4rem;
    align-items: baseline;
    text-align: left;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.search-homepage.fonts-ready .hero-script,
.search-homepage.fonts-ready .hero-caret {
    opacity: 1;
}

.headline-rotating-word {
    display: inline-block;
    min-width: 9ch;
    text-align: left;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform-origin: left center;
}

.hero-with,
.hero-tail {
    font-weight: 600;
}

.hero-tail {
    margin-left: 0.05em;
}

.hero-perks {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--gc-text-secondary);
}

.perk-item {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.perk-check {
    font-weight: 700;
}

.hero-search {
    width: min(720px, 100%);
}

.hero-search-form {
    display: grid;
    gap: 1rem;
    position: relative;
}

.turnstile-shell {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: min(320px, 100%);
    margin-top: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.hero-search-form.is-loading .search-input {
    opacity: 0.65;
    pointer-events: none;
}

.hero-search-form.is-loading .btn {
    opacity: 0.75;
    pointer-events: none;
}

.hero-search-form.is-loading .turnstile-shell {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.15rem;
}

.search-input {
    padding-left: 3rem;
    padding-right: 12.5rem;
    font-size: 1.05rem;
    background: #2a2d31;
    color: #f5f7fa;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
}

.search-input::placeholder {
    color: rgba(245, 247, 250, 0.6);
}

.search-input:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35), 0 18px 30px rgba(0, 0, 0, 0.25);
}

.search-actions {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    z-index: 2;
}

.search-input-wrap .search-clear-btn {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(245, 247, 250, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-input-wrap.has-text .search-clear-btn {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.search-input-wrap .search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.search-submit-btn {
    padding: 0.6rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.search-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: var(--gc-shadow-md);
    display: none;
    z-index: 5;
    padding: 0.25rem;
}

.search-suggestions.is-visible {
    display: grid;
    gap: 0.25rem;
}

.search-suggestions.has-error {
    gap: 0.5rem;
}

.search-suggestion {
    background: transparent;
    border: none;
    color: var(--gc-text-secondary);
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.search-suggestion.tip-message {
    cursor: default;
    pointer-events: none;
    user-select: none;
    color: #f5f7fa;
    background: transparent;
    line-height: 1.35;
}

.search-suggestion.tip-message:hover,
.search-suggestion.tip-message:focus {
    background: transparent;
    color: #f5f7fa;
}

.search-suggestion .tip-label {
    color: #10b981;
    font-weight: 700;
}

.search-suggestion .tip-text {
    font-weight: 400;
}

.search-suggestion:hover,
.search-suggestion:focus {
    background: rgba(16, 185, 129, 0.12);
    color: var(--gc-text-primary);
    outline: none;
}

.search-suggestion.error-message {
    color: var(--gc-text-primary);
    font-weight: 600;
    cursor: default;
}

.search-suggestion.error-hint {
    color: var(--gc-text-secondary);
    font-size: 0.9rem;
    cursor: default;
    padding-top: 0;
}

.search-suggestion.force-search {
    color: var(--gc-primary);
    font-weight: 600;
    background: rgba(16, 185, 129, 0.12);
}

.search-validation {
    min-height: 1.5rem;
    color: var(--gc-warning);
    font-size: 0.9rem;
    order: -1;
    margin-bottom: 0.35rem;
}

.search-validation.is-success {
    color: var(--gc-primary);
}

@media (max-width: 768px) {
    .header-partners-text {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-perks {
        flex-direction: column;
    }

    .hero-search-form {
        gap: 0.75rem;
    }

    .homepage-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem 0;
    }

    .hero-script {
        top: -2.3rem;
        font-size: 1.8rem;
    }

    .hero-title {
        flex-wrap: wrap;
        white-space: normal;
    }

    .search-input {
        padding-right: 9.5rem;
    }

    .search-submit-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .header-signup-btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.9rem;
    }
}
