/* =============================================================================
   ACUTUS AUTO CARE — PPF, 9H Ceramic Coating & Detailing Studio Demo (Flagship)
   Architecture: Racing Carbon & Crimson Asphalt · Orbitron + Exo 2 + IBM Plex Mono
                 Fixed Left Mini-Rail Nav · Vehicle-Class Reactive Pricing Studio
                 Before/After Swirl Slider · PPF vs Ceramic Matrix · Builds Portfolio · FAQ
   Crafted by Acutus Digital Dynamics (https://acutusdigitaldynamics.com)
   ============================================================================= */

:root {
  --bg: #0c0d10;
  --panel: #14161c;
  --panel-2: #1b1e26;
  --red: #e11d2e;
  --red-dark: #b51221;
  --silver: #e5e9f0;
  --muted: #939aa8;
  --line: rgba(229, 233, 240, 0.12);
  --font-display: 'Orbitron', sans-serif;
  --font-sans: 'Exo 2', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --rail-w: 88px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--bg); color: var(--silver); font-family: var(--font-sans); line-height: 1.62; overflow-x: clip; padding-left: var(--rail-w); -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; color: inherit; }

.wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* Fixed Left Mini-Rail Navigation */
.mini-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  background: #08090c;
  border-right: 1px solid var(--line);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0.5rem;
}

.rail-logo { font-family: var(--font-display); font-size: 0.92rem; font-weight: 800; color: var(--red); letter-spacing: 0.12em; writing-mode: vertical-rl; transform: rotate(180deg); }
.rail-links { display: flex; flex-direction: column; gap: 0.55rem; width: 100%; align-items: center; }
.rail-links a {
  width: 66px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 10px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: all 0.2s ease;
}
.rail-links a i { font-size: 0.95rem; }
.rail-links a:hover, .rail-links a.active { background: var(--panel-2); color: #ffffff; border: 1px solid rgba(225, 29, 46, 0.5); }

.mobile-topbar { display: none; background: #08090c; border-bottom: 1px solid var(--line); padding: 0.75rem 1rem; position: sticky; top: 0; z-index: 1000; justify-content: space-between; align-items: center; }
.mobile-topbar strong { font-family: var(--font-display); font-size: 1rem; color: #ffffff; }
.mobile-topbar strong span { color: var(--red); }

.auto-demo-bar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 0.5rem 0; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.auto-demo-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.auto-demo-bar a { color: #ff6b78; text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem 1.55rem; min-height: 46px; border-radius: 6px; font-family: var(--font-display); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid transparent; transition: all 0.22s ease; white-space: nowrap; }
.btn-red { background: var(--red); color: #ffffff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--silver); }
.btn-ghost:hover { border-color: var(--red); color: #ffffff; }
.btn-block { width: 100%; }

/* Studio Hero + Vehicle Class Dock */
.studio-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(3rem, 7vw, 5.5rem) 0 2.75rem;
  background: linear-gradient(180deg, rgba(12, 13, 16, 0.35) 0%, rgba(12, 13, 16, 0.88) 72%, #0c0d10 100%),
              url('https://images.unsplash.com/photo-1607860108855-64acf2078ed9?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero-kicker { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: #ff6b78; margin-bottom: 0.75rem; display: block; }
.studio-hero h1 { font-family: var(--font-display); font-size: clamp(2.15rem, 5.2vw, 4.1rem); line-height: 1.08; max-width: 850px; text-transform: uppercase; }
.studio-hero p { max-width: 580px; color: #c4cad6; margin: 1rem 0 1.75rem; font-size: 1rem; }

.hero-badges { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.85rem; font-family: var(--font-mono); font-size: 0.76rem; color: #d4d8e0; }
.hero-badges span i { color: var(--red); margin-right: 0.4rem; }

.veh-selector-bar {
  background: rgba(20, 22, 28, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.veh-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.veh-btn { padding: 0.65rem 1.15rem; min-height: 44px; border-radius: 6px; border: 1px solid var(--line); background: transparent; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); transition: all 0.2s ease; }
.veh-btn.active, .veh-btn:hover { background: var(--red); border-color: var(--red); color: #ffffff; }

/* Sections */
.sec { padding: clamp(3.5rem, 6.5vw, 5.5rem) 0; border-bottom: 1px solid var(--line); }
.sec-alt { background: var(--panel); }
.sec-title { font-family: var(--font-display); font-size: clamp(1.65rem, 3.3vw, 2.55rem); text-transform: uppercase; line-height: 1.15; }
.sec-sub { color: var(--muted); margin-top: 0.45rem; max-width: 600px; }

/* Reactive Package Matrix */
.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.35rem; margin-top: 2rem; }
.pkg-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem; display: flex; flex-direction: column; }
.pkg-card.featured { border-color: var(--red); background: var(--panel-2); }
.pkg-code { font-family: var(--font-mono); font-size: 0.72rem; color: #ff6b78; letter-spacing: 0.14em; text-transform: uppercase; }
.pkg-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0.45rem 0; }
.pkg-price { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: #ffffff; margin: 0.65rem 0; }
.pkg-card ul { flex: 1; margin: 0.75rem 0 1.4rem; }
.pkg-card li { font-size: 0.87rem; color: var(--muted); padding: 0.45rem 0; border-bottom: 1px solid var(--line); }

/* Interactive Before / After Paint Correction Slider */
.ba-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.25rem; align-items: center; margin-top: 2rem; }
.ba-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); user-select: none; height: clamp(270px, 38vw, 400px); background: #000; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { filter: contrast(0.75) brightness(0.72) saturate(0.55) blur(0.6px); }
.ba-after-clip { position: absolute; inset: 0; width: 52%; overflow: hidden; border-right: 2px solid var(--red); }
.ba-after-clip img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.15) saturate(1.12); max-width: none; }
.ba-label { position: absolute; bottom: 1rem; padding: 0.35rem 0.75rem; background: rgba(12, 13, 16, 0.85); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.ba-label.left { left: 1rem; color: #ff6b78; }
.ba-label.right { right: 1rem; color: #cbd5e1; }
.ba-slider-range { width: 100%; accent-color: var(--red); margin-top: 1rem; cursor: ew-resize; }

/* 5-Layer PPF Stack + Comparison Table */
.layer-stack { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.85rem; margin-top: 2rem; }
.layer-item { background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--red); padding: 1.2rem; border-radius: 8px; }
.layer-item span { font-family: var(--font-mono); font-size: 0.72rem; color: #ff6b78; }
.layer-item h4 { font-family: var(--font-display); font-size: 0.9rem; margin: 0.45rem 0; }
.layer-item p { font-size: 0.82rem; color: var(--muted); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 2rem; background: var(--panel); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.cmp-table th, .cmp-table td { padding: 0.95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.cmp-table th { background: var(--panel-2); font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: #ff6b78; }
.cmp-table tr:last-child td { border-bottom: none; }

/* Recent Studio Builds Filterable Portfolio */
.build-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.build-tab { padding: 0.5rem 1.05rem; min-height: 42px; border-radius: 6px; border: 1px solid var(--line); background: transparent; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.build-tab.active, .build-tab:hover { background: var(--red); border-color: var(--red); color: #ffffff; }
.builds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.build-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.build-card.hidden { display: none; }
.build-card img { width: 100%; height: 215px; object-fit: cover; }
.build-cap { padding: 1.15rem; }
.build-cap span { font-family: var(--font-mono); font-size: 0.7rem; color: #ff6b78; text-transform: uppercase; }
.build-cap h3 { font-family: var(--font-display); font-size: 1rem; margin: 0.3rem 0; }
.build-cap p { font-size: 0.83rem; color: var(--muted); }

/* FAQ Accordion */
.faq-list { margin-top: 1.75rem; border-top: 1px solid var(--line); max-width: 900px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; background: transparent; border: none; padding: 1.15rem 0; min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: left; font-weight: 700; font-size: 0.96rem; color: #ffffff; }
.faq-q i { color: #ff6b78; transition: transform 0.2s ease; }
.faq-a { display: none; padding: 0 0 1.2rem; font-size: 0.88rem; color: var(--muted); }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q i { transform: rotate(45deg); }

/* Booking Layout + Defensive Forms */
.book-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2rem; align-items: start; margin-top: 2rem; min-width: 0; }
.book-layout > * { min-width: 0; }
.studio-loc-card { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 1.35rem; margin-bottom: 1rem; }
.studio-loc-card h3 { font-family: var(--font-display); font-size: 1rem; color: #ff6b78; margin-bottom: 0.45rem; }
.studio-loc-card p { font-size: 0.86rem; color: var(--muted); margin-bottom: 0.3rem; }

.book-shell { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.35rem, 3.5vw, 2.25rem); width: 100%; min-width: 0; overflow: hidden; }
.form-group { margin-bottom: 1rem; min-width: 0; }
.form-label { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.form-control { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; min-height: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: #ffffff; padding: 0.6rem 0.9rem; font-family: inherit; font-size: 0.92rem; }
.form-control:focus { outline: none; border-color: var(--red); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; min-width: 0; }
.form-row-2 > div { min-width: 0; }

.auto-footer { padding: 2.5rem 0; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.auto-footer-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.auto-footer a { color: #ff6b78; text-decoration: underline; }

.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; background: var(--red); color: #ffffff; border-radius: 8px; padding: 1rem 1.35rem; opacity: 0; transform: translateY(14px); pointer-events: none; transition: all 0.25s ease; max-width: 350px; }
.toast.show { opacity: 1; transform: translateY(0); pointer-events: all; }

@media (max-width: 960px) {
  body { padding-left: 0; }
  .mini-rail { display: none; }
  .mobile-topbar { display: flex; }
  .pkg-grid, .layer-stack, .ba-grid, .builds-grid, .book-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .toast { left: 1rem; right: 1rem; max-width: none; }
}
