/* ═══════════════════════════════════════════════════════════════════
   FRONT PAGE STYLES — exclusive to front-page.php
   Contains only what's unique to the home page. Sitewide/shared styles
   (root variables, resets, container system, header, footer, buttons,
   review carousel, cta-bottom, shared title/subtitle rules) live in
   critical.css, which must also be loaded alongside this file.
   ═══════════════════════════════════════════════════════════════════ */

.cta-phone-icon{
    animation: lp-phone-ring 3s ease-in-out infinite;
    color: var(--gravity-green);
}

@keyframes lp-phone-ring {
    0% { transform: rotate(0deg); }
    5% { transform: rotate(-18deg); }
    10% { transform: rotate(18deg); }
    15% { transform: rotate(-14deg); }
    20% { transform: rotate(14deg); }
    25% { transform: rotate(-8deg); }
    30% { transform: rotate(8deg); }
    35% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* ── Hero ── */
.hero{
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   width: 100%;
   padding-top: 7rem;
   font-family: var(--gravity-font-family);
   position: relative;
}

.hero-text{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--gravity-darkblue);
}

h1.hero-text-title{
    font-weight: var(--bold);
    font-size: 56px;
    color: var(--gravity-darkblue);
    border-bottom: none;
    line-height: 1;
    letter-spacing: -2px;
}

@keyframes heroSlideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero-title-line-1,
.hero-title-line-2 {
    display: block;
    opacity: 0;
}

.hero-title-line-1 {
    animation: heroSlideInRight 0.6s ease 0.1s forwards;
}

.hero-title-line-2 {
    animation: heroSlideInRight 0.6s ease 0.35s forwards;
}

h2.hero-text-subtitle{
    font-weight: var(--normal);
    font-size: 20px;
}

.hero-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(350px, 20vw, 600px);
}

.hero-image {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* ── CTA (top section) ── */
.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cta-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--gravity-darkblue);
    padding: 2rem 2rem;
    border-radius: 1.5rem;
    color: white;
    gap: 0.6rem;
    width: 100%;
    max-width: 500px;
}
.cta-eyebrow {
    font-size: 0.78rem;
    font-weight: var(--demi-bold);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--gravity-green);
    margin: 0;
}
.cta-phone-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: var(--bold);
    color: white;
    text-decoration: none;
    line-height: 1;
    margin: 0.25rem 0 0.25rem;
    transition: color 0.2s ease;
}
.cta-phone-number:hover { color: var(--gravity-green); }
.cta-text-subtitle{
    font-size: 1rem;
    font-weight: var(--normal);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0;
}
.cta-apply-btn {
    margin-top: 0.5rem;
    padding: 0.65rem 2rem !important;
    width: auto !important;
    font-size: 0.95rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ── Benefits ── */
.benefits{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gravity-darkblue);
    border-radius: 1rem;
    padding: 1rem;
}

.benefits-columns{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(6, auto);
    grid-auto-flow: column;
    column-gap: 8px;
    row-gap: 8px;
    padding-top: 16px;
    text-align: center;
}
.benefits-left, .benefits-right{
    display: contents;
}
.feature{
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    justify-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.feature.feature-visible {
    opacity: 1;
    transform: translateY(0);
}
.benefits-right .feature:nth-child(1) { transition-delay: 0.18s; }
.benefits-left .feature:nth-child(2)  { transition-delay: 0.36s; }
.benefits-right .feature:nth-child(2) { transition-delay: 0.54s; }
.feature:nth-child(2){
    margin-top: 1.5rem;
}
.benefits-photo{
    border-radius: 1rem;
    width: clamp(325px, 40vw, 600px);
}
.feature-icon{
    width: 50px;
}

/* ── How It Works ── */
.how-it-works{
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
}
.how-it-works-timeline{
    display: flex;
    flex-direction: column;
    padding: 16px;
    margin-top: 12px;
    gap: 16px;
    max-width: 360px;
    border-radius: 16px;
    color: var(--gravity-darkblue);
}
.how-it-works-title .how-it-works-subtitle{
    color: var(--gravity-darkblue);
}
.how-it-works-subtitle{
    font-weight: var(--normal);
}
.how-it-works-title {
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.how-it-works-title.feature-visible {
    opacity: 1;
    transform: translateY(0);
}
.how-it-works-step {
    display: flex;
    gap: 14px;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.how-it-works-step.feature-visible {
    opacity: 1;
    transform: translateY(0);
}
.how-it-works-step:nth-child(2) { transition-delay: 0.18s; }
.how-it-works-step:nth-child(3) { transition-delay: 0.36s; }
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--gravity-green);
    color: var(--gravity-darkblue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--bold);
    font-size: 14px;
    flex-shrink: 0;
    transform: scale(0);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}
.how-it-works-step.feature-visible .step-dot {
    transform: scale(1);
}
.how-it-works-step:nth-child(2) .step-dot { transition-delay: 0.38s; }
.how-it-works-step:nth-child(3) .step-dot { transition-delay: 0.56s; }
.step-line {
    width: 2px;
    flex: 1;
    min-height: 16px;
    margin-top: 6px;
    background-color: rgba(144, 144, 144, 0.2);
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 0.4s ease 0.55s;
}
.how-it-works-step.feature-visible .step-line {
    transform: scaleY(1);
}
.how-it-works-step:nth-child(2) .step-line { transition-delay: 0.75s; }
.how-it-works-step:nth-child(3) .step-line { transition-delay: 0.93s; }
.how-it-works-step:last-child .step-line {
    display: none;
}
.step-body {
    flex: 1;
    padding-bottom: 0.5rem;
}
.how-it-works-step-title{
    padding-bottom: 0.5rem;
    font-weight: var(--bold);
}
.how-it-works-step-content{
    font-weight: var(--normal);
}

/* ── Savings Stat ── */
.savings-stat {
    display: flex;
    justify-content: center;
    padding: 1.5rem 1rem;
}
.savings-stat-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--gravity-darkblue);
    border-radius: 1rem;
    padding: 1.5rem 2.5rem;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.savings-stat-inner.feature-visible {
    opacity: 1;
    transform: translateY(0);
}
.savings-stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: var(--bold);
    color: var(--gravity-green);
    line-height: 1;
    white-space: nowrap;
}
.savings-stat-divider {
    width: 1px;
    height: 3rem;
    background-color: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.savings-stat-text {
    font-size: 0.95rem;
    font-weight: var(--demi-bold);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* ── Responsive ── */
@media (min-width: 992px) {
    .hero {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 'left right';
        align-items: center;
        justify-items: center;
    }
    h1.hero-text-title{
        margin-right: auto;
    }
    .hero-text{
        display: flex;
        align-items: center;
        justify-content: flex-start;
        grid-area: left;
        text-align: left;
        place-self: flex-start;
    }
    .hero-text .apply-now-btn{
        align-self: flex-start;
    }
    .hero-image-wrap{
        place-self: flex-end;
    }
    .benefits-content, .how-it-works{
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 'left right';
        align-items: center;
        justify-items: center;
        padding: 1rem;
    }
    .benefits-photo{
        grid-area: right;
    }
    .benefits-columns{
        grid-area: left;
    }
    .how-it-works-text{
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        text-align: left;
    }
    .how-it-works-title{
        margin-right: auto;
    }
    .how-it-works-timeline{
        margin-left: auto;
    }
}

@media (max-width: 767px) {
     .hero-text{
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center
    }
    h1.hero-text-title{
        margin: 0;
    }
}

@media (min-width: 1200px) {
    .hero-image-wrap{
        width: 600px;
    }
    .hero-text, .hero-image-wrap{
        margin-top: auto;
    }
}
