/*
Theme Name: Foamagic
Theme URI: https://foamagicamerica.com
Author: Foamagic
Description: Technology-forward mobile vehicle care, community service days, fleet, and marine/recreation theme for Foamagic.
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: foamagic
*/

:root {
  --fm-blue: #2563eb;
  --fm-magenta: #ec168c;
  --fm-navy: #0b163f;
  --fm-ice: #f7faff;
  --fm-white: #ffffff;
  --fm-slate: #475569;
  --fm-border: #dce6f3;
  --fm-shadow: 0 18px 45px rgba(11, 22, 63, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fm-navy);
  background: var(--fm-ice);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 999; background: white; padding: .75rem 1rem; border-radius: .75rem; }
.container { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  margin: 0 0 1rem; color: var(--fm-blue); font-weight: 800;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 9px; background: linear-gradient(90deg, var(--fm-blue), var(--fm-magenta)); }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.65rem, 6vw, 5.7rem); max-width: 760px; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: 1.22rem; letter-spacing: -.015em; }
p { margin: 0; }
.lead { color: #dfe8ff; font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 650px; }
.muted { color: var(--fm-slate); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .85rem 1.25rem; border: 0; border-radius: 14px;
  background: var(--fm-blue); color: var(--fm-white); text-decoration: none;
  font-weight: 750; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 99, 235, .28); }
.btn-secondary { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(14px); }
.btn-secondary:hover { background: rgba(255,255,255,.18); }
.btn-light { background: var(--fm-white); color: var(--fm-navy); }
.btn-light:hover { background: var(--fm-ice); }
.btn-text { min-height: auto; padding: 0; background: transparent; color: var(--fm-blue); }
.btn-text:hover { background: transparent; box-shadow: none; }

.site-header {
  position: sticky; top: 0; z-index: 80; background: rgba(247,250,255,.88);
  border-bottom: 1px solid rgba(220,230,243,.8); backdrop-filter: blur(18px);
}
.nav-wrap { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand img { width: 210px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 1.35rem; }
.site-nav a { text-decoration: none; font-weight: 650; font-size: .94rem; }
.site-nav a:not(.btn):hover { color: var(--fm-blue); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--fm-border); border-radius: 13px; color: var(--fm-navy); background: white; }

.hero { position: relative; min-height: 700px; display: grid; align-items: center; overflow: hidden; background: var(--fm-navy); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,12,39,.97) 0%, rgba(5,12,39,.86) 37%, rgba(5,12,39,.30) 70%, rgba(5,12,39,.06) 100%); z-index: 1; }
.hero::after { content: ""; position: absolute; inset: auto auto -240px -140px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(236,22,140,.28), transparent 67%); filter: blur(18px); z-index: 1; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; padding: 100px 0 90px; color: var(--fm-white); }
.hero h1 span { color: #78a0ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; margin-top: 2.4rem; color: #d7e2ff; font-size: .92rem; }
.proof-item { display: flex; align-items: center; gap: .55rem; }
.proof-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fm-magenta); box-shadow: 0 0 0 5px rgba(236,22,140,.14); }

.signal-bar { position: relative; z-index: 4; margin-top: -42px; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: white; border: 1px solid var(--fm-border); border-radius: 22px; box-shadow: var(--fm-shadow); overflow: hidden; }
.signal { padding: 1.25rem 1.35rem; border-right: 1px solid var(--fm-border); }
.signal:last-child { border-right: 0; }
.signal strong { display: block; font-size: .98rem; }
.signal span { color: var(--fm-slate); font-size: .82rem; }

.section-heading { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(260px,.8fr); gap: 2.5rem; align-items: end; margin-bottom: 2.5rem; }
.section-heading p { color: var(--fm-slate); max-width: 520px; justify-self: end; }
.route-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.route-card { position: relative; min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.5rem; color: var(--fm-navy); background: white; border: 1px solid var(--fm-border); border-radius: var(--radius-md); text-decoration: none; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.route-card:hover { transform: translateY(-5px); box-shadow: var(--fm-shadow); border-color: #adc5fa; }
.route-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -65px; bottom: -65px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.16), transparent 70%); }
.route-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--fm-blue); background: #edf3ff; border-radius: 16px; font-size: 1.5rem; }
.route-card p { color: var(--fm-slate); font-size: .93rem; line-height: 1.5; margin-top: .7rem; }
.route-link { color: var(--fm-blue); font-weight: 750; }

.event-shell { display: grid; grid-template-columns: .9fr 1.1fr; background: var(--fm-navy); color: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--fm-shadow); }
.event-info { padding: clamp(2rem,5vw,4.2rem); background: radial-gradient(circle at 0 0, rgba(236,22,140,.22), transparent 52%); }
.event-info p { color: #dbe5ff; margin-top: 1rem; }
.event-date { display: inline-flex; align-items: center; gap: .55rem; margin: 1.3rem 0; padding: .55rem .8rem; border-radius: 999px; color: white; background: rgba(255,255,255,.1); font-weight: 750; }
.event-services { padding: clamp(2rem,5vw,4.2rem); background: white; color: var(--fm-navy); }
.price-list { display: grid; gap: .75rem; margin: 1.5rem 0; }
.price-row { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--fm-border); }
.price-row span { color: var(--fm-slate); }
.code-pill { display: inline-flex; gap: .65rem; align-items: center; margin-top: .85rem; padding: .65rem .9rem; color: var(--fm-navy); background: var(--fm-ice); border: 1px dashed #9fb7e8; border-radius: 12px; font-size: .9rem; }

.process-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; counter-reset: step; }
.process-card { counter-increment: step; background: white; border: 1px solid var(--fm-border); border-radius: var(--radius-md); padding: 1.6rem; }
.process-card::before { content: "0" counter(step); display: block; width: fit-content; margin-bottom: 2.4rem; color: var(--fm-magenta); font-weight: 850; letter-spacing: .08em; }
.process-card p { color: var(--fm-slate); margin-top: .7rem; }

.tech-panel { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding: clamp(2rem,5vw,4.5rem); background: linear-gradient(135deg, #0b163f, #142867 72%, #263d80); color: white; border-radius: var(--radius-lg); overflow: hidden; }
.tech-panel::after { content: ""; position: absolute; right: -170px; top: -220px; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.025); }
.tech-copy { position: relative; z-index: 2; }
.tech-copy p { color: #dce6ff; margin-top: 1rem; }
.tech-list { display: grid; gap: 1rem; margin: 1.7rem 0; padding: 0; list-style: none; }
.tech-list li { display: grid; grid-template-columns: 38px 1fr; gap: .8rem; align-items: start; }
.tech-list li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); color: #9ab7ff; font-size: .75rem; font-weight: 850; }
.tech-list strong, .tech-list small { display: block; }
.tech-list small { color: #b9c8ef; margin-top: .15rem; line-height: 1.45; }
.journey-card { position: relative; z-index: 2; padding: 1.2rem; background: rgba(255,255,255,.97); color: var(--fm-navy); border: 1px solid rgba(255,255,255,.35); border-radius: 22px; box-shadow: 0 30px 70px rgba(4,10,34,.28); }
.journey-head { padding: .2rem .2rem 1rem; border-bottom: 1px solid var(--fm-border); }
.journey-head span, .journey-head strong { display: block; }
.journey-head span { color: var(--fm-blue); font-size: .7rem; font-weight: 850; letter-spacing: .1em; }
.journey-head strong { margin-top: .3rem; font-size: 1.08rem; }
.vehicle-row { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: 1rem .2rem; }
.vehicle-row strong, .vehicle-row small { display: block; }
.vehicle-row small { color: var(--fm-slate); }
.vehicle-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--fm-navy); color: white; font-weight: 900; }
.status-chip { padding: .35rem .6rem; border-radius: 999px; background: #e7f8ef; color: #157347; font-size: .75rem; font-weight: 800; }
.journey-track { display: grid; gap: .65rem; padding: 1rem; background: var(--fm-ice); border: 1px solid var(--fm-border); border-radius: 16px; }
.journey-step { display: grid; grid-template-columns: 32px 1fr; gap: .75rem; align-items: center; opacity: .55; }
.journey-step i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #aebedc; font-style: normal; font-size: .78rem; font-weight: 850; }
.journey-step strong, .journey-step small { display: block; }
.journey-step small { color: var(--fm-slate); }
.journey-step.complete, .journey-step.current { opacity: 1; }
.journey-step.complete i { color: white; background: var(--fm-blue); border-color: var(--fm-blue); }
.journey-step.current i { color: var(--fm-blue); border: 2px solid var(--fm-blue); box-shadow: 0 0 0 5px rgba(37,99,235,.1); }
.journey-note { margin-top: .8rem; padding: .85rem 1rem; border-left: 4px solid var(--fm-magenta); background: #fff4fa; border-radius: 8px 14px 14px 8px; }
.journey-note span, .journey-note strong { display: block; }
.journey-note span { color: var(--fm-slate); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.dashboard { position: relative; z-index: 2; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 22px; padding: 1rem; backdrop-filter: blur(14px); }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.dash-dots { display: flex; gap: .35rem; }
.dash-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fm-magenta); }
.dash-dots i:nth-child(2) { background: #ffca5c; }.dash-dots i:nth-child(3) { background: #5ee7a4; }
.dash-card { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: 1rem; margin-top: .65rem; background: rgba(4,10,34,.46); border-radius: 15px; }
.dash-card b { display: block; font-size: .9rem; }.dash-card small { color: #b9c8ef; }.dash-time { color: #a9c2ff; font-weight: 750; }

.audience-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.audience-card { padding: 1.8rem; background: white; border: 1px solid var(--fm-border); border-radius: var(--radius-md); }
.audience-card p { color: var(--fm-slate); margin-top: .7rem; }
.audience-card .tag { display: inline-block; margin-bottom: 1.2rem; color: var(--fm-blue); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.entry-content { max-width: 850px; margin-top: 2rem; }
.entry-content h2 { margin-top: 2.5rem; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.entry-content h3 { margin-top: 1.8rem; }
.entry-content p, .entry-content ul { color: var(--fm-slate); margin-top: .85rem; }
.entry-content ul { padding-left: 1.3rem; }
.entry-content li + li { margin-top: .45rem; }
.entry-content a { color: var(--fm-blue); }

.cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(2rem,5vw,4rem); background: linear-gradient(120deg, var(--fm-blue), #3252ba); color: white; border-radius: var(--radius-lg); }
.cta p { color: #e7eeff; margin-top: .65rem; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; flex-shrink: 0; }

.site-footer { margin-top: 88px; padding: 64px 0 28px; background: #07102f; color: white; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 3rem; }
.footer-brand img { width: 220px; filter: brightness(0) invert(1); opacity: .96; }
.footer-brand p { color: #aab9df; max-width: 400px; margin-top: 1rem; }
.footer-links { display: grid; gap: .55rem; align-content: start; }
.footer-links strong { margin-bottom: .4rem; }.footer-links a { color: #c9d5f3; text-decoration: none; }
.footer-links a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.12); color: #93a4cf; font-size: .83rem; }
.footer-bottom a { color: #c9d5f3; text-decoration: none; }
.footer-bottom a:hover { color: white; }

.booking-drawer { position: fixed; inset: 0; display: none; place-items: center; padding: 1rem; background: rgba(4,10,34,.72); z-index: 200; backdrop-filter: blur(8px); }
.booking-drawer.open { display: grid; }
.booking-card { width: min(620px,100%); max-height: 90vh; overflow: auto; padding: 1.5rem; background: white; border-radius: 24px; box-shadow: 0 25px 80px rgba(0,0,0,.28); }
.booking-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.close-btn { width: 42px; height: 42px; border: 1px solid var(--fm-border); border-radius: 12px; background: var(--fm-ice); cursor: pointer; }
.booking-options { display: grid; gap: .75rem; margin-top: 1.25rem; }
.booking-option { width: 100%; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem; color: var(--fm-navy); background: var(--fm-ice); border: 1px solid var(--fm-border); border-radius: 14px; text-decoration: none; text-align: left; cursor: pointer; }
.booking-option:hover { border-color: var(--fm-blue); background: #eef4ff; }
.booking-option small { display: block; color: var(--fm-slate); }
.match-result { padding-top: 1rem; }
.match-result h3 { font-size: 1.7rem; }
.match-result > p:not(.eyebrow) { margin-top: .75rem; color: var(--fm-slate); }
.match-back { margin: 0 0 1.2rem; padding: 0; border: 0; background: transparent; color: var(--fm-blue); font-weight: 750; cursor: pointer; }
.match-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.3rem; }
.btn-outline { color: var(--fm-navy); background: white; border: 1px solid var(--fm-border); }
.btn-outline:hover { color: var(--fm-blue); background: var(--fm-ice); box-shadow: none; }

.event-page { min-height: 100vh; background: linear-gradient(180deg, var(--fm-navy) 0 340px, var(--fm-ice) 340px); }
.event-header { padding: 1.2rem 0; }
.event-header .brand img { filter: brightness(0) invert(1); }
.event-page main { padding: 2rem 0 5rem; }
.private-event-card { overflow: hidden; background: white; border: 1px solid var(--fm-border); border-radius: var(--radius-lg); box-shadow: var(--fm-shadow); }
.event-hero-copy { padding: clamp(2rem,6vw,4.5rem); color: white; background: linear-gradient(130deg, #0b163f, #173377 75%, #2a3e79); }
.event-hero-copy h1 { max-width: 900px; font-size: clamp(2.6rem,7vw,5.5rem); }
.event-hero-copy p { max-width: 660px; margin-top: 1rem; color: #dce6ff; font-size: 1.08rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.event-meta span { padding: .5rem .75rem; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 750; }
.event-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; padding: clamp(1.5rem,5vw,3.5rem); }
.event-body h2 { font-size: clamp(1.8rem,4vw,2.8rem); }
.event-body-copy > p { margin-top: 1rem; color: var(--fm-slate); }
.resident-note { margin-top: 1.25rem; padding: 1rem; border-left: 4px solid var(--fm-magenta); background: #fff4fa; border-radius: 8px 14px 14px 8px; }
.event-action { display: grid; align-content: start; padding: 1.25rem; background: var(--fm-ice); border: 1px solid var(--fm-border); border-radius: 18px; }
.event-action .price-list { margin-top: 0; }
.event-action .btn { width: 100%; margin-top: 1rem; }
.event-action small { display: block; margin-top: .8rem; color: var(--fm-slate); text-align: center; }

@media (max-width: 980px) {
  .site-nav { position: absolute; display: none; left: 20px; right: 20px; top: 72px; padding: 1rem; background: white; border: 1px solid var(--fm-border); border-radius: 18px; box-shadow: var(--fm-shadow); flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav .btn { width: 100%; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .route-grid { grid-template-columns: repeat(2,1fr); }
  .signal-grid { grid-template-columns: repeat(2,1fr); }
  .signal:nth-child(2) { border-right: 0; }.signal:nth-child(-n+2) { border-bottom: 1px solid var(--fm-border); }
  .event-shell, .tech-panel, .event-body { grid-template-columns: 1fr; }
  .process-grid, .audience-grid { grid-template-columns: 1fr; }
  .dashboard { max-width: 560px; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1200px); }
  .brand img { width: 174px; }
  .nav-wrap { min-height: 70px; }
  .hero { min-height: 760px; align-items: end; }
  .hero::before { background: linear-gradient(180deg, rgba(5,12,39,.20) 0%, rgba(5,12,39,.60) 42%, rgba(5,12,39,.98) 73%); }
  .hero-media { object-position: 66% center; }
  .hero-content { padding: 300px 0 86px; }
  .hero-actions .btn { width: 100%; }
  .signal-bar { margin-top: -26px; }
  .signal-grid { grid-template-columns: 1fr 1fr; }
  .signal { padding: 1rem; }
  .section, .section-tight { padding: 64px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .section-heading p { justify-self: start; }
  .route-grid { grid-template-columns: 1fr; }
  .route-card { min-height: 245px; }
  .event-info, .event-services { padding: 1.5rem; }
  .tech-panel { padding: 1.5rem; gap: 2rem; }
  .cta { align-items: flex-start; flex-direction: column; }
  .cta-actions, .cta-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
