/* =========================================================
   landing.css — AEO Checker landing page (index.php)
   Mobile-first. Dark theme. References base.css tokens.
   ========================================================= */

/* ----- Landing-page-specific tokens ----- */
:root {
    --lp-bg:           #0f172a;
    --lp-surface:      #1e293b;
    --lp-border:       #334155;
    --lp-text:         #e2e8f0;
    --lp-text-muted:   #94a3b8;
    --lp-text-faint:   #64748b;
    --lp-text-dimmer:  #475569;
    --lp-accent:       #22c55e;
    --lp-accent-dark:  #16a34a;
    --lp-accent-bg:    #052e16;
    --lp-accent-hover: #1a2e1a;
    --lp-input-bg:     #0f172a;
    --lp-error-bg:     #450a0a;
    --lp-error-border: #b91c1c;
    --lp-error-text:   #fca5a5;
}

/* ----- Page shell ----- */
body {
    background-color: var(--lp-bg);
    color: var(--lp-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-10) var(--space-4) var(--space-15);
}

.wrapper {
    width: 100%;
    max-width: 640px;
}

/* ----- Site header ----- */
.site-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-7);
}

.site-wordmark {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-50);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-wordmark .highlight {
    color: var(--lp-accent);
}

/* ----- Hero ----- */
.hero {
    text-align: center;
    margin-bottom: var(--space-8);
}

.hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-gray-50);
    margin-bottom: var(--space-3);
}

.hero p {
    font-size: 1.05rem;
    color: var(--lp-text-muted);
    line-height: 1.6;
}

.hero .highlight {
    color: var(--lp-accent);
}

/* ----- Card ----- */
.card {
    background-color: var(--lp-surface);
    border: 1px solid var(--lp-border);
    border-radius: 12px;
    padding: var(--space-8);
}

.card h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-gray-100);
    margin-bottom: var(--space-5);
}

/* ----- Form fields ----- */
.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-gray-300);
    margin-bottom: 6px;
}

.field input[type="url"],
.field input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--lp-input-bg);
    border: 1px solid var(--lp-dimmer, #475569);
    border-radius: 6px;
    color: var(--color-gray-100);
    font-size: var(--font-size-base);
    outline: none;
    transition: border-color 0.15s;
}

.field input[type="url"]:focus,
.field input[type="email"]:focus {
    border-color: var(--lp-accent);
}

.field-hint {
    font-size: 0.8rem;
    color: var(--lp-text-muted);
    line-height: 1.4;
    margin: 0 0 6px;
}

.field select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    background-color: var(--lp-input-bg);
    border: 1px solid var(--lp-dimmer, #475569);
    border-radius: 6px;
    color: var(--color-gray-100);
    font-size: var(--font-size-base);
    outline: none;
    transition: border-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    cursor: pointer;
}

/* Firefox: remove the native dropdown arrow button it draws even with appearance: none */
.field select::-ms-expand {
    display: none;
}

.field select:focus {
    border-color: var(--lp-accent);
}

.field select:hover {
    border-color: var(--lp-text-muted, #94a3b8);
}

.field select option {
    background-color: var(--lp-surface);
    color: var(--color-gray-100);
}

/* ----- Error message ----- */
.form-error {
    background-color: var(--lp-error-bg);
    border: 1px solid var(--lp-error-border);
    border-radius: 6px;
    padding: var(--space-3) var(--space-4);
    color: var(--lp-error-text);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

/* ----- Tier selection ----- */
.tier-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-gray-300);
    margin-bottom: 10px;
}

.tier-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.tier-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 14px var(--space-4);
    border: 1px solid var(--lp-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    position: relative;
}

.tier-option:hover {
    border-color: #4ade80;
    background-color: var(--lp-accent-hover);
}

.tier-option input[type="radio"] {
    margin-top: 2px;
    accent-color: var(--lp-accent);
    flex-shrink: 0;
}

.tier-option.selected {
    border-color: var(--lp-accent);
    background-color: var(--lp-accent-bg);
}

/* Popular badge */
.popular-badge {
    position: absolute;
    top: -10px;
    right: var(--space-3);
    background-color: var(--lp-accent);
    color: var(--lp-accent-bg);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px var(--space-2);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tier card text */
.tier-info {
    flex: 1;
}

.tier-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray-100);
}

.tier-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lp-accent);
    margin-left: 6px;
}

.tier-desc {
    font-size: 0.82rem;
    color: var(--lp-text-muted);
    margin-top: 3px;
    line-height: 1.4;
}

/* ----- CTA button ----- */
.cta-block {
    margin-top: var(--space-1);
}

#cta-btn {
    width: 100%;
    padding: 14px var(--space-5);
    background-color: var(--lp-accent);
    color: var(--lp-accent-bg);
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
    position: relative;
}

#cta-btn:hover {
    background-color: var(--lp-accent-dark);
    color: #f0fdf4;
}

/* Loading state — hide text, show spinner */
#cta-btn.is-loading {
    color: transparent;
    pointer-events: none;
}

#cta-btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(5, 46, 22, 0.3);
    border-top-color: var(--lp-accent-bg);
    border-radius: 50%;
    animation: lp-spin 0.7s linear infinite;
}

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

/* Guarantee line below button */
.guarantee {
    text-align: center;
    font-size: 0.8rem;
    color: var(--lp-text-faint);
    margin-top: 10px;
}

/* ----- Value props ----- */
.value-props {
    margin-top: 28px;
    border-top: 1px solid var(--lp-surface);
    padding-top: var(--space-6);
}

.value-props ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.value-props li {
    font-size: var(--font-size-sm);
    color: var(--lp-text-muted);
    padding-left: var(--space-5);
    position: relative;
}

.value-props li::before {
    content: '\2713'; /* checkmark */
    position: absolute;
    left: 0;
    color: var(--lp-accent);
    font-weight: 700;
}

/* ----- Trust line ----- */
.trust {
    text-align: center;
    margin-top: var(--space-6);
    font-size: 0.82rem;
    color: var(--lp-dimmer, #475569);
}

.trust a {
    color: var(--lp-dimmer, #475569);
    overflow-wrap: anywhere;
}

.trust a:hover {
    color: var(--lp-text-muted);
}

/* ----- Site footer ----- */
.site-footer {
    text-align: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--lp-border);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-5);
    margin-bottom: var(--space-2);
}

.footer-nav a {
    font-size: 0.82rem;
    color: var(--lp-text-faint);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--lp-text-muted);
    text-decoration: underline;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--lp-text-dimmer);
}

.footer-copy a {
    color: var(--lp-text-dimmer);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.footer-copy a:hover {
    color: var(--lp-text-faint);
    text-decoration: underline;
}

/* ----- FAQ accordion ----- */
.faq {
    margin-top: var(--space-8);
    border-top: 1px solid var(--lp-border);
    padding-top: var(--space-6);
}

.faq h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-gray-50);
    margin-bottom: var(--space-5);
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--lp-border);
}

.faq-item h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--color-gray-100);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-align: left;
    padding: var(--space-4) 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.faq-question:hover {
    color: var(--lp-accent);
}

.faq-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--lp-text-faint);
    transition: transform 0.2s;
    line-height: 1;
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    font-size: var(--font-size-sm);
    color: var(--lp-text-muted);
    line-height: 1.65;
    padding-bottom: var(--space-4);
}

.faq-answer a {
    color: var(--lp-accent);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ----- Responsive: wider screens ----- */
@media (min-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 640px) {
    body {
        padding-top: var(--space-12);
        padding-bottom: var(--space-16);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .card {
        padding: var(--space-10);
    }
}
