/* ==========================================================
   APEX DETAIL — Auto detailer concept (Avara Designs)
   Matte black + bright pearl + bold red. Bebas Neue display.
   ========================================================== */

:root {
  --bg:        #0D0D0D;
  --bg-2:      #161616;
  --bg-3:      #1F1F1F;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.16);
  --ink:       #F2F2F0;
  --ink-soft:  rgba(242, 242, 240, 0.66);
  --ink-faint: rgba(242, 242, 240, 0.45);
  --red:       #E63946;
  --red-deep:  #C1232E;

  --display: 'Bebas Neue', 'Impact', sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;

  --container-max: 1280px;
  --container-pad: clamp(20px, 4vw, 48px);
}

*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
ul,ol { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

::selection { background: var(--red); color: var(--bg); }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding-inline: var(--container-pad); }

/* Typography */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
}
.dot-red { display:inline-block; width:8px; height:8px; border-radius:50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }

.section-headline {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.accent-red { color: var(--red); }
.hero-headline-accent { color: var(--red); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: transform 200ms cubic-bezier(.22,1,.36,1), background 200ms ease, color 200ms ease, border-color 200ms ease;
  border: 1px solid transparent;
}
.btn-red { background: var(--red); color: var(--ink); }
.btn-red:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-block { width: 100%; }

/* ----------- NAV ----------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  background: rgba(13, 13, 13, 0);
  transition: background 250ms ease, backdrop-filter 250ms ease, padding 250ms ease, border-color 250ms ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }

.brand {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand span { color: var(--red); }

.nav-links { display: flex; gap: 32px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.nav-links a { transition: color 200ms ease; }
.nav-links a:hover { color: var(--red); }
.nav-cta { padding: 10px 20px; font-size: 12px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ----------- HERO ----------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 60px;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../../concepts/detailer/images/hero.jpg'), url('https://images.unsplash.com/photo-1583121274602-3e2820c69888?w=1920');
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  filter: brightness(0.65);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,13,0.4) 0%, rgba(13,13,13,0.6) 60%, rgba(13,13,13,1) 100%),
    radial-gradient(circle at 75% 30%, rgba(230, 57, 70, 0.18), transparent 60%);
}
.hero-inner { position: relative; z-index: 2; max-width: 920px; }

.hero-headline {
  font-family: var(--display);
  font-size: clamp(60px, 11vw, 160px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-sub {
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--ink-soft);
  margin-bottom: 40px;
  max-width: 640px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 80px; }

.hero-stats { display: flex; gap: clamp(32px, 6vw, 80px); padding-top: 40px; border-top: 1px solid var(--line); }
.stat-num {
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--red);
  line-height: 1;
}
.stat-num::after { content: '+'; color: var(--ink); }
.stat:nth-child(2) .stat-num::after { content: '%'; }
.stat:nth-child(3) .stat-num::after { content: ''; }
.stat-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 8px;
}

@media (max-width: 720px) {
  .hero-stats { gap: 28px; flex-wrap: wrap; }
}

/* ----------- SECTIONS ----------- */

.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 36px 28px;
  position: relative;
  transition: transform 280ms cubic-bezier(.22,1,.36,1), border-color 220ms ease, background 220ms ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  background: var(--bg-3);
}
.service-card-popular { border-color: var(--red); background: linear-gradient(180deg, var(--bg-2), var(--bg-3)); }
.popular-tag {
  position: absolute;
  top: -1px; right: 16px;
  background: var(--red);
  color: var(--bg);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 5px 10px;
}

.service-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; color: var(--red); }
.service-tier {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}

.service-price {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--ink);
  margin-bottom: 24px;
}

.service-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.service-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink-soft);
}
.service-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 2px;
  background: var(--red);
}

.service-time {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

/* ----------- BEFORE/AFTER GALLERY ----------- */

.gallery { background: var(--bg-2); }

.ba-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 40px 0 24px; }
.ba-tab {
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--ink-soft);
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.ba-tab:hover { color: var(--ink); }
.ba-tab.is-active { background: var(--red); color: var(--ink); border-color: var(--red); }

.ba {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  user-select: none;
  background: var(--bg-3);
  border: 1px solid var(--line);
  cursor: ew-resize;
  touch-action: pan-y;
}

.ba-after, .ba-before { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ba-after  { background: linear-gradient(135deg, #2a2a2a, #0d0d0d 60%); }
.ba-before { clip-path: inset(0 50% 0 0); background: linear-gradient(135deg, #555a60, #2a2a2a 60%); filter: brightness(0.7) contrast(0.85); }

.ba-after-1  { background: linear-gradient(135deg, #1c1410, #0d0d0d 60%); }
.ba-before-1 { background: linear-gradient(135deg, #5a3a2a, #2a1f1a 60%); filter: brightness(0.7); }

.ba-after-2  { background: linear-gradient(135deg, #1a2630, #0d0d0d 60%); }
.ba-before-2 { background: linear-gradient(135deg, #5a4030, #3a2a1f 60%); filter: brightness(0.7); }

/* Sample patterns to suggest paint surfaces */
.ba-after::after,
.ba-before::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08), transparent 30%), radial-gradient(circle at 80% 70%, rgba(230,57,70,0.06), transparent 40%);
}

.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--ink);
  transform: translateX(-1px);
  z-index: 3;
  cursor: ew-resize;
}
.ba-handle-line { display: block; width: 2px; height: 100%; background: var(--ink); }
.ba-handle-knob {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.ba-handle:focus { outline: none; }
.ba-handle:focus .ba-handle-knob { box-shadow: 0 0 0 3px var(--red), 0 8px 24px rgba(0,0,0,0.6); }

.ba-label {
  position: absolute;
  top: 24px;
  z-index: 2;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.06em;
  background: rgba(13,13,13,0.7);
  padding: 6px 14px;
  pointer-events: none;
}
.ba-label-before { left: 24px; color: var(--ink); }
.ba-label-after { right: 24px; color: var(--red); }

/* ----------- AREAS ----------- */

.areas-inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 880px) { .areas-inner { grid-template-columns: 1fr; gap: 32px; } }

.areas-sub { font-size: 17px; color: var(--ink-soft); margin-bottom: 32px; max-width: 540px; }
.areas-list { display: flex; flex-direction: column; gap: 14px; }
.areas-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  padding-left: 20px;
}
.areas-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 22px;
  width: 8px; height: 2px;
  background: var(--red);
}

.areas-map {
  aspect-ratio: 5 / 4;
  background:
    linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 60%, #1a0d10 100%),
    radial-gradient(circle at 30% 40%, rgba(230,57,70,0.15), transparent 50%);
  background-size: cover;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.areas-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(230,57,70,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,57,70,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.map-pulse {
  position: absolute;
  left: var(--x, 45%); top: var(--y, 50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 16px var(--red);
  animation: mapPulse 2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes mapPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(2); opacity: 0.4; }
}

/* ----------- TESTIMONIALS ----------- */

.testimonials { background: var(--bg-2); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
@media (max-width: 880px) { .testimonials-grid { grid-template-columns: 1fr; } }

.t-card {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 220ms ease, transform 280ms cubic-bezier(.22,1,.36,1);
}
.t-card:hover { border-color: var(--red); transform: translateY(-3px); }
.stars { color: var(--red); font-size: 16px; letter-spacing: 2px; }
.t-card blockquote { font-size: 16px; line-height: 1.55; color: var(--ink); }
.t-card figcaption { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }

/* ----------- BOOKING ----------- */

.booking-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.booking-frame {
  background: var(--bg-2);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  margin-bottom: 32px;
}
.booking-frame-placeholder {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  line-height: 1.3;
}
.booking-frame-placeholder span { font-size: 13px; font-family: var(--sans); letter-spacing: 0.06em; color: var(--ink-faint); display: block; margin-top: 8px; text-transform: uppercase; }
.booking-direct { color: var(--ink-soft); }
.booking-direct a { color: var(--red); font-weight: 700; }

/* ----------- FOOTER ----------- */

.footer { background: #050505; padding: 64px 0 32px; border-top: 1px solid var(--line); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }

.brand-logo { font-family: var(--display); font-size: 28px; letter-spacing: 0.04em; }
.brand-logo span { color: var(--red); }
.footer-brand p { color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; font-size: 14px; color: var(--ink-soft); }
.footer-contact a:hover { color: var(--red); }
@media (max-width: 720px) { .footer-contact { align-items: flex-start; } }
.footer-copy { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid var(--line); margin-top: 16px; font-size: 12px; color: var(--ink-faint); }
.footer-copy a { color: var(--red); }

/* ----------- STICKY BOOK ----------- */

.sticky-book {
  position: fixed;
  bottom: 16px; right: 16px;
  background: var(--red);
  color: var(--ink);
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(230,57,70,0.4);
  z-index: 30;
  border-radius: 2px;
  display: none;
}
@media (max-width: 720px) { .sticky-book { display: inline-flex; } }

/* ----------- REVEAL ----------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 700ms cubic-bezier(.22,1,.36,1), transform 700ms cubic-bezier(.22,1,.36,1); }
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }
