/* Allgroom Motorsport – custom styles (Tailwind handles the rest) */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  background: #111418;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Focus states */
:focus-visible {
  outline: 3px solid #C8102E;
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.legal-dialog :focus-visible { outline-color: #F5B700; }
.legal-dialog .legal-body :focus-visible { outline-color: #C8102E; }
[tabindex="-1"]:focus { outline: none; }

/* Section headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C8102E;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
}
.eyebrow-dark { color: #F5B700; }

.section-title {
  margin-top: 0.75rem;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 2px rgba(17, 20, 24, 0.04);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #C8102E 0%, #C8102E 70%, #F5B700 100%);
  transform: scaleX(0.25);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #D1D5DB;
  box-shadow: 0 14px 30px -12px rgba(17, 20, 24, 0.22);
}
.card:hover::before { transform: scaleX(1); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: #111418;
  color: #F5B700;
}
.card-icon svg { width: 1.6rem; height: 1.6rem; }

.card-title {
  margin-top: 1.25rem;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.05;
  text-transform: uppercase;
  color: #111418;
}
.card-text {
  margin-top: 0.75rem;
  line-height: 1.65;
  color: #4B5563;
}

.tick {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: 0.15rem;
  border-radius: 9999px;
  background: #C8102E;
  color: #fff;
}
.tick svg { width: 1.2rem; height: 1.2rem; }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 60% 70% at 85% 15%, rgba(200, 16, 46, 0.32), transparent 65%),
    radial-gradient(ellipse 40% 50% at 10% 100%, rgba(245, 183, 0, 0.08), transparent 70%),
    linear-gradient(180deg, #111418 0%, #0B0D10 100%);
}
.hero-stripes {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-stripes .stripe {
  position: absolute;
  top: -20%;
  height: 140%;
  transform: skewX(-18deg);
}
.stripe-red   { right: 6%;  width: 5.5rem; background: linear-gradient(180deg, rgba(200, 16, 46, 0.9), rgba(200, 16, 46, 0.55)); }
.stripe-amber { right: 15%; width: 1.25rem; background: rgba(245, 183, 0, 0.85); }
.stripe-faint { right: 19%; width: 0.5rem; background: rgba(255, 255, 255, 0.14); }

@media (max-width: 1023px) {
  .stripe-red   { right: -2rem; width: 3rem; opacity: 0.35; }
  .stripe-amber { right: 2.5rem; width: 0.6rem; opacity: 0.3; }
  .stripe-faint { right: 4rem; width: 0.3rem; opacity: 0.5; }
}

/* Chequered band */
.checker {
  background-color: #F4F5F7;
  background-image: conic-gradient(#111418 25%, transparent 0 50%, #111418 0 75%, transparent 0);
  background-size: 24px 24px;
}
footer .checker { background-size: 12px 12px; }

/* Legal dialogs */
.legal-dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: min(85vh, 52rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: #111418;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.legal-dialog[open] { display: flex; }
.legal-dialog::backdrop {
  background: rgba(11, 13, 16, 0.72);
  backdrop-filter: blur(2px);
}
.legal-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(85vh, 52rem);
}
.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: #111418;
  color: #fff;
  border-bottom: 4px solid #C8102E;
}
.legal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  color: #fff;
}
.legal-close:hover { background: rgba(255, 255, 255, 0.1); }
.legal-body {
  overflow-y: auto;
  padding: 1.5rem;
  line-height: 1.65;
  color: #374151;
}
.legal-body h3 {
  margin-top: 1.5rem;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #111418;
}
.legal-body p { margin-top: 0.5rem; }
.legal-body ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-body li { margin-top: 0.25rem; }
@media (min-width: 640px) {
  .legal-head { padding: 1.25rem 2rem; }
  .legal-body { padding: 1.75rem 2rem 2rem; }
}

html.modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
}
