/* ============================================================
   Rob DiMeo CMA Form - Styles
   https://contact.robdimeo.com/CMA
   ============================================================ */

:root {
    --navy: #0f1c3f;
    --blue: #1a3a6e;
    --light-blue: #e8f0fe;
    --accent: #c41e3a;
    --green: #0d9488;
    --gray: #64748b;
    --light-gray: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 10px 40px -10px rgba(15, 28, 63, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(180deg, #f0f4f8 0%, #ffffff 100%);
    color: var(--navy);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ===== HERO ===== */
.hero {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 28px;
    text-align: center;
}

.hero-media {
    position: relative;
    background: var(--blue);
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.hero-media .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.hero-media .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.hero-content {
    padding: 28px 24px 32px;
}

.hero h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.3;
}

.hero p {
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 24px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        max-width: none;
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 54px;
}

.btn-primary {
    background: var(--navy);
    color: white;
    box-shadow: 0 4px 14px rgba(15, 28, 63, 0.25);
}

.btn-primary:hover {
    background: #1a2a55;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--light-blue);
}

.btn-call {
    background: var(--green);
    color: white;
}

.btn-call:hover {
    background: #0f766e;
}

/* ===== FORM CARD ===== */
.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 28px 24px 32px;
    margin-bottom: 32px;
}

.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.form-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.35s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--navy);
    text-align: center;
}

/* Form elements */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--navy);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 58, 110, 0.12);
}

/* Radio / Choice cards */
.choice-grid {
    display: grid;
    gap: 12px;
}

.choice-card {
    position: relative;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.choice-card label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    margin: 0;
}

.choice-card input:checked + label {
    border-color: var(--navy);
    background: var(--light-blue);
    color: var(--navy);
}

.choice-card label:hover {
    border-color: #94a3b8;
}

.choice-icon {
    font-size: 1.4rem;
    width: 28px;
    text-align: center;
}

/* Navigation buttons */
.form-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.form-nav .btn {
    flex: 1;
}

.btn-back {
    background: var(--light-gray);
    color: var(--gray);
    border: 1px solid var(--border);
}

.btn-back:hover {
    background: #e2e8f0;
}

.btn-next,
.btn-submit {
    background: var(--navy);
    color: white;
}

.btn-next:hover,
.btn-submit:hover {
    background: #1a2a55;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading spinner on buttons */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* Error / success messages */
.field-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.global-message {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

.global-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.global-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ===== FOOTER ===== */
.site-footer {
    text-align: center;
    padding: 32px 16px 40px;
    color: var(--gray);
    font-size: 0.9rem;
}

.site-footer .name {
    font-weight: 700;
    color: var(--navy);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.site-footer .contact-line {
    margin: 4px 0;
}

.site-footer a {
    color: var(--blue);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .license {
    margin: 12px 0 6px;
    font-size: 0.85rem;
}

.site-footer .legal {
    margin-top: 18px;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.7;
}

.site-footer .legal a {
    color: #64748b;
    margin: 0 6px;
}

/* ===== THANK YOU PAGE ===== */
.thankyou-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
}

.thankyou-photo-wrap {
    background: var(--blue);
    padding: 0;
}

.thankyou-photo-wrap img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.thankyou-content {
    padding: 32px 28px 36px;
}

.thankyou-content h1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--navy);
}

.thankyou-message {
    font-size: 1.05rem;
    color: #334155;
    margin-bottom: 24px;
    text-align: left;
    background: var(--light-gray);
    padding: 20px 18px;
    border-radius: 12px;
    border-left: 4px solid var(--green);
}

.thankyou-message p {
    margin-bottom: 12px;
}

.thankyou-message p:last-child {
    margin-bottom: 0;
}

.thankyou-message .highlight {
    font-weight: 600;
    color: var(--navy);
}

.call-box {
    margin-top: 8px;
    padding: 18px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}

.call-box a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--green);
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.call-box a:hover {
    background: #0f766e;
}

/* Small screens */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.4rem;
    }
    .form-card {
        padding: 22px 16px 28px;
    }
}
