/* ================================================
   FORMA MOTORSPORT — SHARED DESIGN SYSTEM
   ================================================ */

/* ================================================
   CSS VARIABLES — FORMA BRAND TOKENS
   ================================================ */
:root {
  --cyan: #55C6FF;
  --cyan-glow: rgba(85, 198, 255, 0.35);
  --cyan-dim: rgba(85, 198, 255, 0.08);
  --dark: #00011A;
  --dark-mid: #060820;
  --dark-surface: #0A0D2E;
  --dark-card: #0E1138;
  --white: #FCFCFC;
  --white-60: rgba(252, 252, 252, 0.6);
  --white-30: rgba(252, 252, 252, 0.3);
  --white-10: rgba(252, 252, 252, 0.1);
  --green: #34D399;
  --amber: #FBBF24;
  --red: #F87171;
  --ff-heading: 'Montserrat', sans-serif;
  --ff-body: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  --radius-btn: 20px;
  --radius-card: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--ff-body);
  background: var(--dark);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; cursor: pointer; font-family: inherit; }

/* ================================================
   NOISE OVERLAY — CINEMATIC GRAIN
   ================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: var(--cyan);
  color: var(--dark);
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--cyan-glow);
}
.btn-primary:hover::before { opacity: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: transparent;
  color: var(--white);
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--white-30);
  transition: all 0.4s var(--ease-out);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.section-label {
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--ff-heading);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  color: var(--white);
}

.section-title em {
  font-style: italic;
  color: var(--cyan);
}

/* ================================================
   SCROLL REVEAL
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ================================================
   HEADER / NAV
   ================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(20px, 4vw, 60px);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.header.scrolled {
  background: rgba(0, 1, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.logo img {
  height: 36px;
  width: auto;
}
.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-family: var(--ff-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white-60);
  transition: color 0.3s;
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 0.3s var(--ease-out);
}
.nav a:hover { color: var(--white); }
.nav a:hover::after { width: 100%; }

.nav-cta {
  padding: 10px 28px !important;
  font-size: 11px !important;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

/* ================================================
   PAGE HERO (Service & Problem Pages)
   ================================================ */
.page-hero {
  position: relative;
  min-height: 100dvh;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-bg img,
.page-hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,11,0.25) 0%,
    rgba(9,9,11,0.10) 35%,
    rgba(9,9,11,0.60) 65%,
    rgba(9,9,11,0.97) 100%
  );
}
.page-hero .container {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(48px, 8vh, 88px);
}

/* Page hero content elements */
.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.page-hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.page-hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 32px;
}
.page-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.breadcrumbs a {
  color: var(--white-30);
  transition: color 0.3s;
}
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs .sep { color: var(--white-10); }
.breadcrumbs .current { color: var(--cyan); }

.page-hero h1 {
  font-family: var(--ff-heading);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.92;
  text-transform: uppercase;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.page-hero h1 em {
  font-style: italic;
  color: var(--cyan);
}

/* ================================================
   QUICK ANSWER BLOCK (GEO)
   ================================================ */
.quick-answer {
  background: var(--dark-surface);
  border: 1px solid var(--white-10);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-card);
  padding: 32px 36px;
  margin-bottom: 64px;
}
.quick-answer p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--white-60);
}
.quick-answer p + p { margin-top: 12px; }
.quick-answer strong { color: var(--white); }

/* ================================================
   CONTENT SECTIONS
   ================================================ */
.content-section {
  padding: 64px 0;
}
.content-section + .content-section {
  border-top: 1px solid var(--white-10);
}
.content-section h2 {
  font-family: var(--ff-heading);
  font-weight: 800;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.15;
  margin-bottom: 24px;
}
.content-section h2 em {
  font-style: italic;
  color: var(--cyan);
}
.content-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--white-60);
  margin-bottom: 16px;
  max-width: 780px;
}
.content-section ul, .content-section ol {
  padding-left: 24px;
  margin-bottom: 24px;
}
.content-section li {
  font-size: 16px;
  line-height: 1.8;
  color: var(--white-60);
  margin-bottom: 8px;
}
.content-section li strong {
  color: var(--white);
}

/* ================================================
   TRUST SIGNALS BAR
   ================================================ */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}
.trust-card {
  background: var(--dark-surface);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.3s;
}
.trust-card:hover { border-color: var(--cyan); }
.trust-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--cyan-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trust-card h4 {
  font-family: var(--ff-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: var(--white);
}
.trust-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--white-30);
}

/* ================================================
   COST TABLE
   ================================================ */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 15px;
}
.cost-table th {
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  text-align: left;
  padding: 14px 20px;
  border-bottom: 2px solid var(--white-10);
  background: var(--dark-surface);
}
.cost-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--white-10);
  color: var(--white-60);
}
.cost-table tr:hover td {
  background: var(--dark-surface);
  color: var(--white);
}

/* ================================================
   FAQ SECTION
   ================================================ */
.faq-section {
  padding: 80px 0;
  background: var(--dark-mid);
  border-top: 1px solid var(--white-10);
}
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}
.faq-item {
  background: var(--dark-surface);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item:hover { border-color: var(--cyan); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  background: none;
  width: 100%;
  text-align: left;
  color: var(--white);
  font-family: var(--ff-heading);
  font-size: 15px;
  font-weight: 600;
}
.faq-question svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s;
}
.faq-item.open .faq-question svg {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s;
}
.faq-item.open .faq-answer {
  max-height: 300px;
}
.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--white-60);
}

/* ================================================
   SOLVE IT CTA (Problem → Service link)
   ================================================ */
.solve-cta {
  background: linear-gradient(135deg, var(--dark-surface), var(--dark-card));
  border: 1px solid var(--cyan);
  border-radius: var(--radius-card);
  padding: 40px;
  margin: 48px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.solve-cta-text h3 {
  font-family: var(--ff-heading);
  font-weight: 800;
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.solve-cta-text h3 em {
  color: var(--cyan);
  font-style: italic;
}
.solve-cta-text p {
  font-size: 15px;
  color: var(--white-60);
}

/* ================================================
   CTA BANNER
   ================================================ */
.cta-banner {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--cyan-dim), transparent 70%);
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner h2 {
  font-family: var(--ff-heading);
  font-weight: 900;
  font-size: clamp(36px, 6vw, 72px);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 24px;
}
.cta-banner h2 em {
  font-style: italic;
  color: var(--cyan);
}
.cta-banner p {
  font-size: 18px;
  color: var(--white-60);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--white-10);
  background: var(--dark-mid);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand img { height: 36px; margin-bottom: 16px; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--white-30);
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--white-30);
  padding: 6px 0;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--white-10);
  font-size: 13px;
  color: var(--white-30);
}

/* ================================================
   SEVERITY INDICATOR
   ================================================ */
.severity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ff-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.severity-high { background: rgba(248,113,113,0.15); color: var(--red); }
.severity-medium { background: rgba(251,191,36,0.15); color: var(--amber); }
.severity-low { background: rgba(52,211,153,0.15); color: var(--green); }
.severity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ================================================
   KEYFRAMES
   ================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideLeft {
  from { opacity: 0; transform: translate(60px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}
@keyframes lineReveal {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================
   MOBILE DRAWER
   ================================================ */
#mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: #09090b;
  padding-top: 80px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-drawer.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 clamp(20px,6vw,40px);
  font-family: 'Satoshi','Outfit',sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #a1a1aa;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.drawer-nav a:hover,
.drawer-nav a:focus {
  color: #fcfcfc;
  background: rgba(255,255,255,0.03);
  outline: none;
}
.drawer-cta {
  margin: 20px clamp(20px,6vw,40px) 32px;
}
.drawer-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  width: 100%;
  background: #fcfcfc;
  color: #09090b;
  font-family: 'Satoshi','Outfit',sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.drawer-cta a:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
}
.mobile-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.mobile-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .trust-bar { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .solve-cta { flex-direction: column; text-align: center; }
}

/* ── Services dropdown ── */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-trigger { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-dropdown-trigger svg { transition: transform 0.2s; }
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75) !important;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-dropdown-menu a:hover { color: #fff !important; background: rgba(255,255,255,0.06); }

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-toggle { display: flex; }
  .trust-bar { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: clamp(32px, 10vw, 52px); }
  .cost-table { font-size: 13px; }
  .cost-table th, .cost-table td { padding: 10px 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
