/* ══════════════════════════════════════════════════════
   Feature Page Template — Shared Styles
   Used by: page-feature-learner-profiles.php (and future feature pages)
   Design spec: docs/superpowers/specs/2026-03-16-feature-page-template-design.md
   ══════════════════════════════════════════════════════ */

/* ── Base overrides ── */
.feature-page {
    padding: 0;
    background-color: var(--white);
}

.feature-page .container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Focus states (accessibility) ── */
.feature-page a:focus-visible,
.feature-page button:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ── Section 1: Hero ── */
.fp-hero {
    background: var(--gradient-primary);
    padding: 6rem 2rem 5rem;
    position: relative;
    overflow: visible;
}

.fp-hero .container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.fp-hero-copy {
    flex: 1.1;
}

.fp-hero-media {
    flex: 0.9;
    min-width: 0;
}

.fp-hero h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

.fp-hero .fp-tagline {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
    line-height: 1.5;
    font-weight: 500;
}

.fp-hero .fp-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.fp-hero .fp-cta-btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: var(--border-radius-button);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.fp-hero .fp-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.fp-hero .fp-tier-badge {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-button);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-base);
}

.fp-hero .fp-tier-badge:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Hero media: generic image fallback */
.fp-hero-media img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-large);
    box-shadow: var(--box-shadow-medium);
}

/* ── Phone Mockup ── */
.fp-phone {
    width: 260px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    /* Overlap: push below hero into next section */
    margin-bottom: -120px;
    /* Entrance animation */
    animation: fp-phone-enter 0.8s ease-out both;
}

@keyframes fp-phone-enter {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fp-phone-frame {
    background: #1a1a2e;
    border-radius: 36px;
    padding: 10px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.1);
    position: relative;
}

/* Notch */
.fp-phone-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 22px;
    background: #1a1a2e;
    border-radius: 0 0 14px 14px;
    z-index: 3;
}

.fp-phone-screen {
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    position: relative;
    aspect-ratio: 390 / 750;
}

/* Screenshots stack and crossfade */
.fp-phone-screen img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    opacity: 0;
    animation: fp-screen-fade 20s infinite;
}

.fp-phone-screen img:nth-child(1) { animation-delay: 0s; }
.fp-phone-screen img:nth-child(2) { animation-delay: 4s; }
.fp-phone-screen img:nth-child(3) { animation-delay: 8s; }
.fp-phone-screen img:nth-child(4) { animation-delay: 12s; }
.fp-phone-screen img:nth-child(5) { animation-delay: 16s; }

@keyframes fp-screen-fade {
    0%   { opacity: 0; }
    3%   { opacity: 1; }
    20%  { opacity: 1; }
    23%  { opacity: 0; }
    100% { opacity: 0; }
}

/* Home indicator */
.fp-phone-home {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 8px auto 4px;
}


/* ── Section 2: How It Works ── */
.fp-how-it-works {
    padding: var(--section-padding);
    padding-top: 8rem; /* extra space for overlapping phone */
    padding-left: 2rem;
    padding-right: 2rem;
    background: var(--white);
}

.fp-how-it-works .fp-section-title {
    text-align: center;
    font-size: 2.1rem;
    color: var(--dark-gray);
    font-weight: 700;
    margin-bottom: 3rem;
}

.fp-steps {
    max-width: 800px;
    margin: 0 auto;
}

.fp-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.fp-step:last-child {
    margin-bottom: 0;
}

.fp-step-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fp-step-text {
    flex: 1;
}

.fp-step-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-gray);
    margin-bottom: 0.2rem;
}

.fp-step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.fp-step-media {
    width: 100%;
    padding-left: 77px; /* align with text (52px badge + 1.25rem gap) */
}

.fp-step-media a {
    display: block;
    cursor: zoom-in;
}

.fp-step-media img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-light);
}

/* Lightbox (CSS-only, :target based) */
.fp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.fp-lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

.fp-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--border-radius);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.fp-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    z-index: 1;
}

.fp-lightbox-close:hover {
    color: #ccc;
}

/* ── Section 3: Key Capabilities ── */
.fp-capabilities {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    background: var(--background-primary);
}

.fp-capabilities .fp-section-title {
    text-align: center;
    font-size: 2.1rem;
    color: var(--dark-gray);
    font-weight: 700;
    margin-bottom: 3rem;
}

.fp-capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.fp-capability-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow-light);
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.fp-capability-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-medium);
}

.fp-capability-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: rgba(69, 104, 220, 0.08);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fp-capability-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--primary-blue);
}

.fp-capability-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.fp-capability-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ── Section 4: Before/After ── */
.fp-before-after {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    background: var(--white);
}

.fp-before-after .fp-section-title {
    text-align: center;
    font-size: 2.1rem;
    color: var(--dark-gray);
    font-weight: 700;
    margin-bottom: 3rem;
}

.fp-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.fp-comparison-side h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.fp-comparison-side.fp-before h3 {
    color: var(--text-muted);
    border-bottom: 2px solid var(--background-secondary);
}

.fp-comparison-side.fp-after h3 {
    color: var(--primary-blue);
    border-bottom: 2px solid var(--primary-blue);
}

.fp-comparison-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.fp-comparison-zoom {
    display: block;
    cursor: zoom-in;
}

.fp-comparison-side img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.fp-comparison-side.fp-before img {
    filter: grayscale(0.6) opacity(0.85);
}

.fp-comparison-side.fp-after img {
    box-shadow: var(--box-shadow-light);
    border-left: 3px solid var(--primary-blue);
}

/* ── Section 5: Testimonial ── */
.fp-testimonial {
    padding: 5rem 2rem;
    background: var(--background-primary);
    text-align: center;
}

.fp-testimonial-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.fp-quote-portrait {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(69, 104, 220, 0.2);
    border: 3px solid rgba(69, 104, 220, 0.15);
}

.fp-quote-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.fp-quote-content {
    flex: 1;
    min-width: 0;
}

.fp-quote-mark {
    font-size: 3.5rem;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.fp-quote-text {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.fp-quote-author {
    padding-top: 1rem;
    border-top: 2px solid rgba(69, 104, 220, 0.12);
}

.fp-quote-name {
    font-weight: 700;
    color: var(--dark-gray);
    font-size: 1rem;
}

.fp-quote-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.15rem;
}

.fp-quote-role a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-decoration-color: rgba(69, 104, 220, 0.3);
}

.fp-quote-role a:hover {
    text-decoration-color: var(--primary-blue);
}

/* ── Section: Full Walkthrough ── */
.fp-walkthrough {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    background: #0f1623;
    text-align: center;
}

.fp-walkthrough .fp-section-title {
    color: #fff;
}

.fp-walkthrough-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.fp-walkthrough-demo {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

.fp-walkthrough-demo iframe {
    width: 100%;
    height: 640px;
    border: none;
    display: block;
}

.fp-walkthrough-demo video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Desktop: show iframe, hide video */
.fp-walkthrough-mobile {
    display: none;
}

/* Mobile: show video, hide iframe */
@media (max-width: 768px) {
    .fp-walkthrough-desktop {
        display: none;
    }
    .fp-walkthrough-mobile {
        display: block;
        max-width: 360px;
        margin: 0 auto;
    }
}

/* ── Section 6: Bottom CTA ── */
.fp-bottom-cta {
    padding: var(--section-padding);
    padding-left: 2rem;
    padding-right: 2rem;
    background: var(--gradient-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fp-bottom-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
}

.fp-bottom-cta .container {
    position: relative;
    z-index: 1;
}

.fp-bottom-cta h2 {
    color: var(--white);
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.fp-bottom-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.fp-bottom-cta .fp-cta-btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--white);
    color: var(--primary-blue);
    border-radius: var(--border-radius-button);
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.fp-bottom-cta .fp-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.fp-bottom-cta .fp-secondary-link {
    display: block;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    transition: color var(--transition-base);
}

.fp-bottom-cta .fp-secondary-link:hover {
    color: var(--white);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .fp-capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hero */
    .fp-hero {
        padding: 5rem 1rem 3rem;
        overflow: hidden;
    }
    .fp-hero .container {
        flex-direction: column;
        gap: 2rem;
    }
    .fp-hero h1 {
        font-size: 1.75rem;
    }
    .fp-hero .fp-tagline {
        font-size: 1rem;
    }
    .fp-hero .fp-tier-badge {
        display: block;
        margin: 1rem 0 0;
        text-align: center;
    }
    .fp-phone {
        width: 200px;
        margin-bottom: -80px;
    }
    .fp-phone-frame {
        border-radius: 28px;
        padding: 8px;
    }
    .fp-phone-frame::before {
        width: 60px;
        height: 18px;
        border-radius: 0 0 10px 10px;
        top: 8px;
    }
    .fp-phone-screen {
        border-radius: 22px;
    }
    .fp-how-it-works {
        padding-top: 6rem;
    }
    /* How It Works */
    .fp-how-it-works {
        padding: 3rem 1rem;
    }
    .fp-step-media {
        padding-left: 0;
    }

    /* Capabilities */
    .fp-capabilities {
        padding: 3rem 1rem;
    }
    .fp-capabilities-grid {
        grid-template-columns: 1fr;
    }

    /* Before/After */
    .fp-before-after {
        padding: 3rem 1rem;
    }
    .fp-comparison {
        grid-template-columns: 1fr;
    }

    /* Testimonial */
    .fp-testimonial {
        padding: 3rem 1rem;
    }
    .fp-testimonial-inner {
        flex-direction: column;
        text-align: center;
    }
    .fp-quote-portrait {
        width: 140px;
        height: 140px;
    }
    .fp-quote-author {
        text-align: center;
    }
    .fp-quote-text {
        font-size: 1.05rem;
    }

    /* Bottom CTA */
    .fp-bottom-cta {
        padding: 3.5rem 1rem;
    }
    .fp-bottom-cta h2 {
        font-size: 1.5rem;
    }
    .fp-bottom-cta .fp-cta-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    /* Section titles */
    .fp-section-title {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 400px) {
    .fp-hero h1 {
        font-size: 1.5rem;
    }
    .fp-hero {
        padding: 4.5rem 0.75rem 2.5rem;
    }
}
