/* ============================================
   Home page (index.php) — Matrix Skills Academy
   Matches: hero-serif, about, training/CEP cards, FAQ
   ============================================ */

/* Design tokens first so html/body can use var(--page-bg-*) */
:root {
    /* Logo / Matrix Skills Academy — navy + gold (see Training hero, contact map CTA) */
    --logo-navy: #1d2b53;
    --logo-navy-deep: #151d38;
    --logo-gold: #c58f2f;
    --page-bg-top: #f6f8fc;
    --page-bg-mid: #eef1f7;
    --page-bg-bottom: #f3f5f9;
    --brand-primary: #b44a3f;
    --brand-dark: #8b3a32;
    --brand-light: #d65a4f;
    /* Used by FAQ + sitewide accents (matches footer / legacy Matrix theme) */
    --brand-gold: #c9a227;
    --brand-accent: #c9a227;
    --text-primary: #1a1a1a;
    --text-secondary: #444;
    --text-muted: #666;
    --bg-soft: #f8f9fa;
    /* Hero — reference layout (navy on bright blurred photo) */
    --hero-navy: #1a2042;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.1);
    --transition: 0.25s ease;
}

html {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: "Outfit", system-ui, sans-serif;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    color: #1a1a1a;
    background-color: var(--page-bg-mid);
    /* Soft page canvas: navy + gold tints from logo, stays light for white content cards */
    background-image:
        radial-gradient(ellipse 130% 85% at 50% -28%, rgba(29, 43, 83, 0.1) 0%, transparent 54%),
        radial-gradient(ellipse 65% 50% at 100% 8%, rgba(197, 143, 47, 0.08) 0%, transparent 52%),
        radial-gradient(ellipse 55% 45% at 0% 92%, rgba(29, 43, 83, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--page-bg-top) 0%, var(--page-bg-mid) 45%, var(--page-bg-bottom) 100%);
    background-attachment: fixed;
}

.page-home {
    min-height: 100vh;
}

/* ============================================
   Hero — bright blurred auditorium + navy type + chevron bottom
   (copy stays in index.php; uppercase via CSS)
   ============================================ */
.hero-serif {
    position: relative;
    margin: 0;
    padding: 0;
    background: #fff;
}

.hero-serif-visual {
    position: relative;
    min-height: min(86vh, 800px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Bottom “V” transition like reference */
    clip-path: polygon(0 0, 100% 0, 100% 92%, 50% 100%, 0 92%);
}

.hero-serif-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    /* Sharp photo — only light grading, no blur */
    filter: brightness(1.04) contrast(0.98) saturate(0.96);
    transform: scale(1.05);
    will-change: transform;
    animation: heroBgKenBurns 48s ease-in-out infinite alternate;
}

@keyframes heroBgKenBurns {
    0% {
        transform: scale(1.04) translate(0, 0);
    }
    100% {
        transform: scale(1.09) translate(-0.6%, 0.35%);
    }
}

.hero-serif-fade-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent);
    z-index: 1;
    pointer-events: none;
}

/* Light warm wash so navy text stays readable on bright areas */
.hero-serif-tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 252, 248, 0.5) 0%,
        rgba(252, 246, 240, 0.38) 45%,
        rgba(255, 255, 255, 0.5) 100%
    );
    z-index: 1;
    pointer-events: none;
    animation: heroTintPulse 22s ease-in-out infinite alternate;
}

@keyframes heroTintPulse {
    0% {
        opacity: 0.92;
    }
    100% {
        opacity: 1;
    }
}

.hero-serif-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 4vw, 2rem) clamp(4rem, 10vw, 6rem);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1.25rem, 3vw, 1.75rem);
}

.hero-serif-tagline {
    margin: 0;
    max-width: 40rem;
    font-size: clamp(0.72rem, 1.5vw, 0.88rem);
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--hero-navy);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: heroLineIn 1.45s cubic-bezier(0.25, 0.46, 0.2, 1) both;
    animation-delay: 0.12s;
}

.hero-serif-title {
    margin: 0;
    font-family: "Libre Baskerville", Georgia, serif;
    font-weight: 700;
    font-size: clamp(2rem, 6.5vw, 3.5rem);
    line-height: 1.1;
    color: var(--hero-navy);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    animation: heroLineIn 1.65s cubic-bezier(0.25, 0.46, 0.2, 1) both;
    animation-delay: 0.38s;
}

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

.hero-serif-line {
    display: block;
}

.hero-serif-line + .hero-serif-line {
    margin-top: 0.08em;
}

/* Rectangular navy CTA — white caps label */
.hero-serif-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12rem;
    padding: 0.95rem 2.5rem;
    font-size: clamp(0.75rem, 1.4vw, 0.85rem);
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    background: var(--hero-navy);
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin-top: 0.25rem;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    animation: heroLineIn 1.5s cubic-bezier(0.25, 0.46, 0.2, 1) both;
    animation-delay: 0.62s;
}

.hero-serif-cta:hover {
    background: #121731;
    color: #fff;
    transform: translateY(-2px);
}

.hero-serif-cta:focus-visible {
    outline: 3px solid var(--hero-navy);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .hero-serif-bg {
        animation: none;
        transform: scale(1.05);
    }

    .hero-serif-tint {
        animation: none;
        opacity: 1;
    }

    .hero-serif-tagline,
    .hero-serif-title,
    .hero-serif-cta {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   About
   ============================================ */
.about-section {
    padding: clamp(3rem, 8vw, 5rem) 1.25rem;
    background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
    text-align: center;
}

.about-section-inner {
    max-width: 1120px;
    margin: 0 auto;
}

.about-section-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.about-section-subtitle {
    margin-top: 0.5rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.125rem);
    text-align: center;
}

.hero-cards-title {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
    text-align: center;
}

.about-section-header .hero-cards-title {
    text-align: center;
}

.about-section-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-main-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.25rem);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.about-main-card__title {
    font-size: clamp(1.2rem, 2.5vw, 1.45rem);
    margin: 0 0 0.75rem;
    color: var(--brand-dark);
    text-align: center;
}

.about-main-card__intro {
    margin: 0 auto 1.25rem;
    max-width: 40rem;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
    text-align: center;
}

.about-main-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-main-card__list li {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-primary);
    text-align: left;
}

.about-main-card__list li:last-child {
    margin-bottom: 0;
}

.about-main-card__check {
    flex-shrink: 0;
    color: #2e7d32;
    margin-top: 2px;
}

.about-feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.about-feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    padding: 1.35rem 1.25rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(180, 74, 63, 0.15);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.about-feature-card:hover {
    border-color: rgba(180, 74, 63, 0.35);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.about-feature-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(180, 74, 63, 0.1);
    color: var(--brand-primary);
}

.about-feature-card__title {
    /* Keep headings on one line; scale down slightly on narrow cards */
    font-size: clamp(0.78rem, 1.85vw, 1.05rem);
    line-height: 1.3;
    margin: 0 0 0.35rem;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 340px) {
    .about-feature-card__title {
        white-space: normal;
    }
}

.about-feature-card__body {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
}

.about-feature-card__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

/* ============================================
   Training & CEP card grids
   ============================================ */
.hero-cards-section {
    padding: clamp(3rem, 8vw, 4.5rem) 1.25rem;
    background: #fff;
}

.hero-cards-section--cep {
    background: linear-gradient(180deg, #fef9f8 0%, #fff 100%);
}

.hero-cards-section > .hero-cards-title {
    margin-bottom: 2rem;
}

.hero-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
}

.hero-cards-grid--cep {
    gap: 1.5rem;
}

.hero-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(180, 74, 63, 0.25);
}

.hero-card-body {
    padding: 1.5rem 1.5rem 1.65rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hero-card-body h3 {
    font-size: 1.2rem;
    margin: 0 0 0.65rem;
    color: var(--text-primary);
    font-weight: 700;
}

.hero-card-body p {
    margin: 0 0 1.15rem;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
    flex: 1;
}

.hero-card-body span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.hero-cards-section--cep .hero-card {
    background: linear-gradient(180deg, #fff 0%, #fefcfb 100%);
}

/* ============================================
   FAQ — navy band (same gradient as footer.css / original site)
   From this project’s earlier index.css; footer was matched to this block.
   ============================================ */
.faq-section {
    padding: 4rem 1.25rem 4.5rem;
    background: linear-gradient(155deg, #0a1628 0%, #0c2140 45%, #0f2d5c 100%);
    color: #eee;
}

.faq-section-inner {
    max-width: 760px;
    margin: 0 auto;
}

.faq-label {
    text-align: center;
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-gold);
}

.faq-heading {
    text-align: center;
    margin: 0 0 2rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #f0f4fc;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border-radius: var(--radius-md);
    background: rgba(30, 74, 140, 0.1);
    border: 1px solid rgba(30, 74, 140, 0.28);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.faq-item.is-open {
    background: rgba(30, 74, 140, 0.18);
    border-color: rgba(201, 162, 39, 0.45);
}

.faq-trigger {
    width: 100%;
    text-align: left;
    padding: 1.1rem 1.25rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #f0f4fc;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq-trigger::after {
    content: "+";
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--brand-gold);
    flex-shrink: 0;
    transition: transform 0.25s ease, color 0.2s ease;
}

.faq-item.is-open .faq-trigger::after {
    content: "−";
    transform: rotate(0deg);
}

.faq-trigger:hover {
    background: rgba(30, 74, 140, 0.12);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.25rem;
    transition: max-height 0.35s ease;
}

.faq-item.is-open .faq-content {
    max-height: 800px;
    padding-bottom: 1.15rem;
}

.faq-content p,
.faq-content a {
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(238, 238, 238, 0.92);
}

.faq-content a {
    color: #9ec5ff;
    font-weight: 600;
}

.faq-content a:hover {
    color: #fff;
}

/* ============================================
   WhatsApp float
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
    color: #fff;
}

.whatsapp-float svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ============================================
   Accessibility
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .whatsapp-float {
        font-size: 0;
        padding: 14px;
        border-radius: 50%;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}
