/* ============================================================
   COMPONENTS.CSS — Buttons, Cards, Forms, Modal, Stats
   ============================================================ */

/* --- Buttons --- */
.btn-primary,
.btn-secondary {
    display: inline-block;   /* add this */
    text-decoration: none;
    padding: 16px 32px;
    font-weight: 600;
    border-radius: 4px;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    cursor: pointer;
    border: none;
    font-family: var(--font-ui);
}

.btn-primary {
    background: var(--red);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
    transition: left .5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(222, 37, 67, .4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: transparent;
    color: var(--bg);
    border: 2px solid var(--bg);
}

.btn-secondary:hover {
    background: var(--bg);
    color: var(--blue-dark);
    transform: translateY(-2px);
}

/* --- Card --- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: .75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    transition: transform .3s ease, box-shadow .3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(31, 48, 99, .1);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: .5rem;
    background: linear-gradient(135deg, rgba(31, 48, 99, .08), rgba(31, 48, 99, .03));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--fg);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

.card p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.card .price {
    color: var(--accent);
    font-weight: 600;
}

/* --- Stats --- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 500px;
    margin-top: 64px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--bg);
}

.stat-label {
    font-size: .875rem;
    opacity: .6;
    margin-top: 4px;
    color: var(--bg);
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3rem;
    }
}

/* Variant: dark text stats (About section) */
.stats--dark .stat-number,
.stats--dark .stat-label {
    color: var(--fg);
}

.stats--dark .stat-label {
    opacity: .7;
}

/* --- Form --- */
.quote-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: .75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .05);
}

@media (min-width: 640px) {
    .quote-form {
        padding: 2rem;
    }
}

.form-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: .5rem;
}

.form-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid var(--border);
    border-radius: .5rem;
    background: var(--card);
    font-family: inherit;
    font-size: 1rem;
    color: var(--fg);
    transition: border-color .2s, box-shadow .2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--fg);
    box-shadow: 0 0 0 3px rgba(31, 48, 99, .1);
}

.form-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    margin-top: .5rem;
}

.form-note {
    text-align: center;
    color: var(--muted);
    font-size: .875rem;
    margin-top: 1rem;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    border-radius: .75rem;
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
    text-align: center;
    animation: scaleIn .5s ease-out forwards;
}

.modal-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.modal-icon svg {
    width: 2rem;
    height: 2rem;
    color: #16a34a;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

.modal-content p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}