/* South Louisiana Automation: shared styles (used with Tailwind CDN). */

[hidden] { display: none !important; }

html {
    font-size: 17px; /* min body size on phones; Tailwind rem sizes scale from this */
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    background: #FFFFFF;
    color: #334155;
    font-family: Barlow, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
    font-family: "Barlow Condensed", Barlow, system-ui, sans-serif;
    letter-spacing: -0.01em;
}

/* ---------- Focus ---------- */
:focus-visible {
    outline: 3px solid #F97316;
    outline-offset: 2px;
    border-radius: 4px;
}
.on-dark :focus-visible { outline-color: #FDBA74; }

.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 100;
    background: #0F172A; color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 8px; }

.sr-only-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ----------
   White on #EA580C passes AA for large text only, so button labels stay >= 19px bold. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 52px; padding: .7rem 1.5rem; border-radius: 8px;
    font-family: "Barlow Condensed", Barlow, sans-serif; font-weight: 700;
    font-size: 1.25rem; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase;
    transition: background-color .2s, color .2s, border-color .2s;
    text-decoration: none; cursor: pointer;
}
.btn-primary { background: #EA580C; color: #fff; border: 2px solid #EA580C; }
.btn-primary:hover { background: #C2410C; border-color: #C2410C; }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }
.btn-outline-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.btn-outline-light:hover { background: #fff; color: #0F172A; }
.btn-outline { background: #fff; color: #1E293B; border: 2px solid #1E293B; }
.btn-outline:hover { background: #1E293B; color: #fff; }
.btn-sm { min-height: 44px; font-size: 1.1rem; padding: .5rem 1.1rem; }

.link-orange { color: #C2410C; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; overflow-wrap: anywhere; }
.link-orange:hover { color: #9A3412; }
.on-dark .link-orange { color: #FDBA74; }

/* ---------- Placeholders Chris still needs to fill ---------- */
.placeholder {
    background: #FEF3C7; color: #92400E; border: 1px dashed #D97706;
    padding: 0 .3em; border-radius: 4px; font-family: ui-monospace, monospace; font-size: .85em;
    overflow-wrap: anywhere;
}

/* ---------- Nav ---------- */
#main-nav { transition: background-color .25s, box-shadow .25s; }
#main-nav.nav-solid { background: #fff; box-shadow: 0 1px 0 #E2E8F0; }
#main-nav .nav-link { color: #fff; }
#main-nav.nav-solid .nav-link { color: #1E293B; }
#main-nav .nav-link:hover { color: #FDBA74; }
#main-nav.nav-solid .nav-link:hover { color: #C2410C; }
#main-nav .menu-btn { color: #fff; }
#main-nav.nav-solid .menu-btn { color: #1E293B; }
#main-nav.nav-solid #mobile-menu { background: #fff; }
#main-nav:not(.nav-solid) #mobile-menu { background: #0F172A; }

/* ---------- Cards / sections ---------- */
.card { background: #fff; border: 1px solid #D9D3C7; border-radius: 10px; }
.card-plain { background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; }
.eyebrow {
    font-family: "Barlow Condensed", Barlow, sans-serif; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em; font-size: .95rem;
}
.step-num {
    width: 3.25rem; height: 3.25rem; border-radius: 9999px; background: #EA580C; color: #fff;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-family: "Barlow Condensed", Barlow, sans-serif; font-weight: 700; font-size: 1.6rem;
}
.check-icon { color: #C2410C; flex-shrink: 0; }

/* ---------- Tabs ---------- */
.tab-btn {
    font-family: "Barlow Condensed", Barlow, sans-serif; font-weight: 700; font-size: 1.25rem;
    text-transform: uppercase; letter-spacing: .03em;
    padding: .75rem 1.25rem; min-height: 52px; border-bottom: 4px solid transparent; color: #475569;
}
.tab-btn[aria-selected="true"] { color: #0F172A; border-bottom-color: #EA580C; }
.tab-btn:hover { color: #0F172A; }

/* ---------- FAQ ---------- */
.faq-answer { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.faq-icon { transition: transform .3s; }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }

/* ---------- Reveal on scroll (only hides content when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out, transform .6s ease-out; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Mobile sticky bar ---------- */
.sticky-bar { box-shadow: 0 -2px 12px rgba(15, 23, 42, .15); padding-bottom: env(safe-area-inset-bottom); }
@media (max-width: 767px) {
    body.has-sticky-bar { padding-bottom: 76px; }
}

/* ---------- Form fields ---------- */
.field-label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field {
    width: 100%; min-height: 50px; padding: .65rem .9rem; border-radius: 8px;
    border: 1px solid #94A3B8; background: #fff; color: #0F172A; font-size: 1rem;
}
.field:focus { outline: 3px solid #F97316; outline-offset: 1px; border-color: #1E293B; }
.field[aria-invalid="true"] { border-color: #B91C1C; border-width: 2px; }
.field-error { color: #B91C1C; font-weight: 600; font-size: .9rem; margin-top: .3rem; }
.on-dark .field-error { color: #FCA5A5; }
.consent-box { display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; line-height: 1.45; }
.consent-box input { width: 22px; height: 22px; margin-top: .15rem; flex-shrink: 0; accent-color: #EA580C; }

/* ---------- Hero phone animation ---------- */
.phone {
    width: 270px; height: 540px; border-radius: 38px; background: #0F172A;
    border: 3px solid #334155; padding: 12px; position: relative;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
}
.phone-screen {
    position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden;
    background: #F8FAFC; font-family: Barlow, system-ui, sans-serif;
}
.ph-notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 84px; height: 20px; border-radius: 12px; background: #0F172A; z-index: 3; }
.ph-layer { position: absolute; inset: 0; transition: opacity .45s ease, transform .45s ease; }

.ph-call { background: linear-gradient(#1E293B, #0F172A); color: #fff; display: flex; flex-direction: column; align-items: center; padding-top: 88px; }
.ph-call .ph-avatar { width: 84px; height: 84px; border-radius: 9999px; background: #334155; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.ph-call .ph-label { font-size: .95rem; color: #CBD5E1; }
.ph-call .ph-number { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.7rem; margin-top: 4px; }
.ph-call .ph-missed { color: #FCA5A5; font-weight: 700; }
.ph-call .ph-buttons { position: absolute; bottom: 64px; display: flex; gap: 72px; }
.ph-call .ph-btn { width: 58px; height: 58px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; }
.ph-ring { position: absolute; top: 88px; left: 50%; width: 84px; height: 84px; margin-left: -42px; border-radius: 9999px; border: 2px solid #F97316; opacity: 0; }

.ph-thread { background: #F8FAFC; display: flex; flex-direction: column; }
.ph-thread-head { padding: 40px 14px 10px; border-bottom: 1px solid #E2E8F0; text-align: center; background: #fff; }
.ph-thread-head .ph-name { font-weight: 700; color: #0F172A; font-size: .95rem; }
.ph-thread-head .ph-sub { font-size: .75rem; color: #475569; }
.ph-msgs { padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.ph-sys { align-self: center; font-size: .72rem; color: #B91C1C; font-weight: 600; background: #FEE2E2; padding: 3px 10px; border-radius: 999px; }
.ph-bubble { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: .86rem; line-height: 1.3; transition: opacity .4s ease, transform .4s ease; }
.ph-bubble small { display: block; font-size: .68rem; opacity: .85; margin-bottom: 2px; font-weight: 600; }
.ph-out { align-self: flex-end; background: #EA580C; color: #fff; border-bottom-right-radius: 4px; }
.ph-in { align-self: flex-start; background: #E2E8F0; color: #0F172A; border-bottom-left-radius: 4px; }
.ph-badge {
    position: absolute; left: 50%; bottom: 34px; transform: translate(-50%, 10px);
    background: #0F172A; color: #fff; border: 2px solid #F97316; border-radius: 999px;
    padding: 8px 18px; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.15rem;
    letter-spacing: .03em; text-transform: uppercase; display: flex; align-items: center; gap: 6px;
    transition: opacity .4s ease, transform .4s ease; white-space: nowrap;
}

/* Stage visibility. data-stage: 0 ringing, 1 missed, 2 auto-text, 3 reply, 4 job saved */
.phone .ph-call { opacity: 1; }
.phone .ph-thread { opacity: 0; transform: translateX(20px); }
.phone[data-stage="2"] .ph-call, .phone[data-stage="3"] .ph-call, .phone[data-stage="4"] .ph-call { opacity: 0; }
.phone[data-stage="2"] .ph-thread, .phone[data-stage="3"] .ph-thread, .phone[data-stage="4"] .ph-thread { opacity: 1; transform: none; }
.phone .ph-missed, .phone[data-stage="1"] .ph-incoming { display: none; }
.phone[data-stage="1"] .ph-missed { display: inline; }
.phone[data-stage="0"] .ph-ring { animation: ph-ring 1.2s ease-out infinite; }
.phone[data-stage="1"] .ph-buttons { opacity: .35; }
.phone .ph-b1, .phone .ph-b2, .phone .ph-badge { opacity: 0; }
.phone .ph-b1, .phone .ph-b2 { transform: translateY(8px); }
.phone[data-stage="2"] .ph-b1, .phone[data-stage="3"] .ph-b1, .phone[data-stage="4"] .ph-b1 { opacity: 1; transform: none; }
.phone[data-stage="3"] .ph-b2, .phone[data-stage="4"] .ph-b2 { opacity: 1; transform: none; }
.phone[data-stage="4"] .ph-badge { opacity: 1; transform: translate(-50%, 0); }

@keyframes ph-ring {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.7); opacity: 0; }
}

@media (max-width: 380px) {
    .phone { width: 250px; height: 500px; }
}

/* ---------- Checkup ---------- */
.choice {
    display: flex; align-items: center; gap: .85rem; min-height: 56px; padding: .8rem 1rem;
    border: 2px solid #CBD5E1; border-radius: 10px; background: #fff; cursor: pointer;
    font-size: 1.05rem; font-weight: 500; color: #0F172A; transition: border-color .15s, background-color .15s;
}
.choice:hover { border-color: #1E293B; }
.choice input { width: 22px; height: 22px; accent-color: #EA580C; flex-shrink: 0; }
.choice:has(input:checked) { border-color: #EA580C; background: #FFF7ED; }
.choice.is-picked { border-color: #EA580C; background: #FFEDD5; }
.choice:has(input:focus-visible) { outline: 3px solid #F97316; outline-offset: 2px; }
.progress-track { height: 8px; background: #E2E8F0; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: #EA580C; border-radius: 999px; transition: width .3s ease; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
    .js .reveal { opacity: 1; transform: none; }
}
