/* SFVMAPA shared styles — components + motion/accessibility layer.
   Loaded after assets/tw.css (compiled Tailwind). */

* {
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: 96px;
}

/* ── Accessibility ── */

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    background: #003D5C;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: top 150ms ease-out;
}

.skip-link:focus {
    top: 1rem;
}

:focus-visible {
    outline: 3px solid #003D5C;
    outline-offset: 2px;
}

footer :focus-visible,
.bg-primary :focus-visible,
.on-dark :focus-visible,
#cta :focus-visible {
    outline-color: #fff;
}

/* ── Buttons: one calm unified hover + a real press state ── */

.btn-pill {
    border-radius: 9999px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 200ms ease-out, box-shadow 200ms ease-out,
        background-color 200ms ease-out, color 200ms ease-out,
        border-color 200ms ease-out;
}

.btn-pill:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 26px rgba(0, 61, 92, 0.18);
}

.btn-pill:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 61, 92, 0.15);
}

.btn-primary {
    background-color: #003D5C;
    color: white;
}

.btn-primary:hover {
    background-color: #002d47;
}

.btn-accent {
    background-color: #DC143C;
    color: white;
}

.btn-accent:hover {
    background-color: #b01030;
}

.btn-outline {
    border: 2px solid #003D5C;
    color: #003D5C;
    background-color: transparent;
}

.btn-outline:hover {
    background-color: #003D5C;
    color: white;
}

/* Outline button that sits on a dark background */
.btn-outline-invert {
    border: 2px solid #fff;
    color: #fff;
    background-color: transparent;
}

.btn-outline-invert:hover {
    background-color: #fff;
    color: #003D5C;
}

/* ── Cards ── */

.card-soft {
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 300ms ease-out;
}

.card-soft:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 61, 92, 0.12);
}

.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 300ms ease-out;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 61, 92, 0.15);
}

.star-rating {
    color: #fbbf24;
    display: flex;
    gap: 0.25rem;
}

.star-rating svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* ── Forms ── */

.form-input {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.form-input:focus {
    border-color: #003D5C;
}

/* ── Header: shrink on scroll ── */

header.sticky nav {
    transition: padding-top 200ms ease-out, padding-bottom 200ms ease-out;
}

header.sticky.scrolled nav {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

header.sticky.scrolled {
    box-shadow: 0 8px 30px rgba(0, 61, 92, 0.12);
}

/* ── FAQ accordion: keyboard-accessible, animated collapse ── */

.faq-item {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: border-color 300ms ease-out, box-shadow 300ms ease-out;
}

.faq-item:hover {
    border-color: #003D5C;
    box-shadow: 0 10px 40px rgba(0, 61, 92, 0.1);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    font: inherit;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    color: #003D5C;
    user-select: none;
    transition: background-color 300ms ease-out;
}

.faq-question:hover {
    background-color: #f3f4f6;
}

.faq-icon {
    transition: transform 300ms ease-out;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

/* Open by default; collapsed only when site.js has tagged <html> with
   .js — so FAQ answers are always readable without JavaScript. */
.faq-answer-wrap {
    display: grid;
    grid-template-rows: 1fr;
}

.js .faq-answer-wrap {
    grid-template-rows: 0fr;
    transition: grid-template-rows 300ms ease-out;
}

.js .faq-item.open .faq-answer-wrap {
    grid-template-rows: 1fr;
}

.faq-answer {
    overflow: hidden;
    min-height: 0;
    color: #4b5563;
    line-height: 1.7;
    background-color: #f9fafb;
}

.faq-answer p {
    margin: 0;
    padding: 1.25rem 1.5rem 1.5rem;
}

/* ── Mobile menu: animated collapse (index only) ── */

/* Same .js gating as the FAQ: without JavaScript the menu simply shows
   expanded on small screens instead of being unreachable. */
.mobile-menu {
    display: grid;
    grid-template-rows: 1fr;
}

.js .mobile-menu {
    grid-template-rows: 0fr;
    transition: grid-template-rows 300ms ease-out;
}

.js .mobile-menu.open {
    grid-template-rows: 1fr;
}

.mobile-menu > div {
    overflow: hidden;
    min-height: 0;
    border-top: 1px solid transparent;
}

.mobile-menu.open > div,
html:not(.js) .mobile-menu > div {
    border-top-color: #e5e7eb;
}

.mobile-menu > div > :first-child {
    margin-top: 1rem;
}

.mobile-menu > div > :last-child {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none;
    }
}

/* ── Scroll reveals (classes applied by site.js only — nothing is
      hidden when JavaScript is unavailable) ── */

.reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Stats ── */

.stat-num {
    font-variant-numeric: tabular-nums;
}

/* ── Ambient orb drift (decorative) ── */

@keyframes orb-drift {
    from {
        translate: 0 0;
    }
    to {
        translate: 14px -10px;
    }
}

.orb-drift {
    animation: orb-drift 24s ease-in-out infinite alternate;
}

.orb-drift-b {
    animation: orb-drift 28s ease-in-out infinite alternate-reverse;
}

/* ── Reduced motion: kill everything ── */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
