/* Palette from build spec:
     navy #0D2440 | gold #C9962F | cream #F4F1EA | white #FFFFFF
     cream-tint #FDF6E9 | gray-muted #5B6675 | gray-border #D4D8DE
     Tile accents (Q2 only): green #3F6B40 teal #2F6A80 rust #B06A2C purple #5D4B86 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F4F1EA;
    font-family: 'Montserrat', sans-serif;
    padding: 32px 16px;
}

.card {
    width: 100%;
    max-width: 900px;
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(13, 36, 64, 0.12);
}

/* ---------- Header ---------- */
.header {
    background: #0D2440;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, #F4C95D 0%, #C9962F 45%, #7a5a1e 100%);
    border: 2px solid #E8C77A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.wordmark {
    color: #FFFFFF;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 20px;
}

/* ---------- Body ---------- */
.body {
    padding: 28px 24px 24px;
}

.kicker {
    text-align: center;
    margin-bottom: 18px;
}

.kicker h1 {
    margin: 0 0 4px;
    color: #0D2440;
    font-size: 22px;
    font-weight: 800;
}

.kicker p {
    margin: 0;
    color: #5B6675;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ---------- Progress bar ---------- */
.progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: #D4D8DE;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 25%;
    background: #C9962F;
    border-radius: 3px;
    transition: width 0.35s ease;
}

.progress-count {
    color: #0D2440;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Steps (each question is its own block) ---------- */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question {
    text-align: center;
    color: #0D2440;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 22px;
}

/* ---------- Stacked options (Q1, Q3, Q4) ---------- */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
}

.option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #D4D8DE;
    background: #FFFFFF;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.option:hover {
    transform: translateY(-1px);
    border-color: #C9962F;
}

.option:active {
    transform: translateY(0);
}

.option-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #EEF0F2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon svg {
    width: 18px;
    height: 18px;
    fill: #0D2440;
}

.option-label {
    flex: 1;
    color: #0D2440;
    font-size: 16px;
    font-weight: 700;
}

.option-arrow {
    flex-shrink: 0;
    display: flex;
}

.option-arrow svg {
    stroke: #0D2440;
}

/* plain variant used for Q3 / Q4 — no icon square */
.option.plain {
    padding: 16px 18px;
}

/* ---------- Tile grid (Q2 only) ---------- */
.tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    margin-bottom: 22px;
}

.tile {
    aspect-ratio: 1 / 0.85;
    border-radius: 14px;
    border: none;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    cursor: pointer;
    font-family: inherit;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    transition: transform 0.1s ease;
}

.tile:hover {
    transform: translateY(-2px);
}

.tile:active {
    transform: translateY(0);
}

.tile-green {
    background: #3F6B40;
}

.tile-teal {
    background: #2F6A80;
}

.tile-rust {
    background: #B06A2C;
}

.tile-purple {
    background: #5D4B86;
}

/* ---------- Reassurance ---------- */
.reassurance {
    text-align: center;
    color: #5B6675;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

/* ---------- Interstitial (5th "step") ---------- */
#step-interstitial .interstitial {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0 8px;
    text-align: center;
}

.bag-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #FDF6E9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 26px;
    animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.interstitial p {
    color: #0D2440;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 22px;
}

.spinner-track {
    width: 140px;
    height: 5px;
    background: #D4D8DE;
    border-radius: 3px;
    overflow: hidden;
}

.spinner-fill {
    height: 100%;
    width: 0%;
    background: #C9962F;
    border-radius: 3px;
    transition: width 2.3s ease;
}

/* ---------- Opt-in form (6th "step") ---------- */
#step-optin {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.optin-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #C9962F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 18px;
    opacity: 0;
    animation: popIn 0.55s cubic-bezier(.34, 1.56, .64, 1) 0.05s forwards;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.4) rotate(-8deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.12) rotate(3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.optin-title {
    color: #0D2440;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px;
    opacity: 0;
    animation: riseIn 0.4s ease 0.25s forwards;
}

.optin-subtitle {
    color: #5B6675;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 22px;
    opacity: 0;
    animation: riseIn 0.4s ease 0.35s forwards;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field-group {
    text-align: left;
    margin-bottom: 16px;
    opacity: 0;
    animation: riseIn 0.4s ease forwards;
}

.field-group:nth-of-type(1) {
    animation-delay: 0.45s;
}

.field-group:nth-of-type(2) {
    animation-delay: 0.55s;
}

.field-group:nth-of-type(3) {
    animation-delay: 0.65s;
}

.field-group label {
    display: block;
    color: #0D2440;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.field-group input {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid #D4D8DE;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: #0D2440;
    background: #FFFFFF;
    transition: border-color 0.15s ease;
}

.field-group input::placeholder {
    color: #B9BFC7;
}

.field-group input:focus {
    outline: none;
    border-color: #C9962F;
}

.optin-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #C9962F;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    opacity: 0;
    animation: riseIn 0.4s ease 0.75s forwards;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
    margin-bottom: 10px;
}

.optin-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(201, 150, 47, 0.35);
}

.optin-submit:active {
    transform: translateY(0);
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid #D4D8DE;
    padding: 16px 24px 24px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin-bottom: 8px;
}

.footer-links a {
    color: #3A6EA5;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-help {
    color: #0D2440;
    font-size: 12px;
    margin: 0 0 6px;
    font-weight: 500;
}

.footer-help b {
    font-weight: 700;
}

.footer-copy {
    color: #9AA3AD;
    font-size: 11px;
    margin: 0;
}


.tile-grid img {
    width: 60px;
}

/* new tile_css */

.tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    margin-bottom: 22px;
}

/* ---------- the card ---------- */
.tile {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1.5px solid #D4D8DE;
    border-radius: 14px;
    background: #FFFFFF;
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 36, 64, 0.12);
    border-color: #C9962F;
    box-shadow: 0 0 0 1px #C9962F;
}

.tile:active {
    transform: translateY(0);
}

/* selected state (gold border, cream-tint label area) — see JS below */

/* .tile.is-selected{
    border-color:#C9962F;
    box-shadow:0 0 0 1px #C9962F;
  } */

.tile.is-selected .tile-label {
    background: #FDF6E9;
    width: 100%;
    height: 100%;
}

/* ---------- icon block (top, colored) ---------- */
.tile-icon {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 30px 20px;
}

.tile-icon img {
    width: 50px;
    height: auto;
    object-fit: contain;
    /* If your .webp icons are dark/colored line art rather than
       already-white, uncomment the line below to force them white
       so they read clearly on the colored background:            */
    /* filter:brightness(0) invert(1); */
}

.tile-green .tile-icon {
    background: #3F6B40;
}

.tile-teal .tile-icon {
    background: #2F6A80;
}

.tile-rust .tile-icon {
    background: #B06A2C;
}

.tile-purple .tile-icon {
    background: #5D4B86;
}

/* ---------- label block (bottom, title + subtitle) ---------- */
.tile-label {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #FFFFFF;
    transition: background 0.15s ease;
    width: 100%;
}

.tile-label strong {
    color: #0D2440;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}

.tile-label span {
    color: #5B6675;
    font-size: 12.5px;
    font-weight: 500;
}


@media (max-width:575px) {

    .tile-icon {
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 10px 12px;

    }

    .tile-icon img {
        width: 40px;
        height: auto;
        object-fit: contain;
        /* filter: brightness(0) invert(1); */
    }

}

@media (max-width:480px) {
    .tile-label strong {
        color: #0D2440;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.25;
    }

    .tile-label span {
        color: #5B6675;
        font-size: 10.5px;
        font-weight: 500;
    }
    .body {
        padding: 28px 10px 24px;
    }
    .tile-label {
    padding: 9px 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #FFFFFF;
    transition: background 0.15s ease;
    width: 100%;
    }

}