/*
Theme Name: Envision Motorsports
Theme URI: https://envisionmotorsports.com
Author: Envision Motorsports
Author URI: https://envisionmotorsports.com
Description: Purpose-built performance theme for Envision Motorsports — custom turbo builds, motor swaps, fabrication, and high-performance work out of Colona, IL. Pairs with the site's PHP snippet override for full frontend control.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: https://envisionmotorsports.com
Text Domain: envision-motorsports
Tags: custom, performance, automotive, one-page

Envision Motorsports — Built for Speed, Precision, and Power.
*/

/* ==========================================================================
   CSS Custom Properties — Envision Motorsports Brand System
   ========================================================================== */

:root {
  /* Core Brand Colors */
  --em-black:        #0A0A0A;
  --em-black-deep:   #050505;
  --em-black-soft:   #111111;
  --em-black-mid:    #1A1A1A;
  --em-black-light:  #222222;
  --em-red:          #CC1122;
  --em-red-dark:     #AA0E1C;
  --em-red-bright:   #E01224;
  --em-red-glow:     rgba(204, 17, 34, 0.15);
  --em-silver:       #C0C0C0;
  --em-silver-light: #D8D8D8;
  --em-silver-dark:  #888888;
  --em-white:        #FFFFFF;
  --em-white-soft:   #F5F5F5;
  --em-white-dim:    rgba(255, 255, 255, 0.85);

  /* Typography Scale */
  --em-font-display: 'Barlow Condensed', 'Impact', 'Arial Narrow', sans-serif;
  --em-font-body:    'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --em-font-mono:    'JetBrains Mono', 'Courier New', monospace;

  --em-text-xs:   0.75rem;
  --em-text-sm:   0.875rem;
  --em-text-base: 1rem;
  --em-text-lg:   1.125rem;
  --em-text-xl:   1.25rem;
  --em-text-2xl:  1.5rem;
  --em-text-3xl:  1.875rem;
  --em-text-4xl:  2.25rem;
  --em-text-5xl:  3rem;
  --em-text-6xl:  3.75rem;
  --em-text-7xl:  4.5rem;
  --em-text-8xl:  6rem;

  /* Spacing */
  --em-space-1:  0.25rem;
  --em-space-2:  0.5rem;
  --em-space-3:  0.75rem;
  --em-space-4:  1rem;
  --em-space-6:  1.5rem;
  --em-space-8:  2rem;
  --em-space-10: 2.5rem;
  --em-space-12: 3rem;
  --em-space-16: 4rem;
  --em-space-20: 5rem;
  --em-space-24: 6rem;
  --em-space-32: 8rem;

  /* Layout */
  --em-container: 1280px;
  --em-container-narrow: 900px;
  --em-radius-sm: 2px;
  --em-radius:    4px;
  --em-radius-lg: 8px;

  /* Borders & Lines */
  --em-border:       1px solid rgba(255, 255, 255, 0.08);
  --em-border-red:   1px solid rgba(204, 17, 34, 0.4);
  --em-border-bright: 1px solid rgba(204, 17, 34, 0.8);

  /* Shadows */
  --em-shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.4);
  --em-shadow:     0 4px 20px rgba(0, 0, 0, 0.6);
  --em-shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.8);
  --em-shadow-red: 0 4px 24px rgba(204, 17, 34, 0.3);

  /* Transitions */
  --em-transition-fast:   150ms ease;
  --em-transition:        250ms ease;
  --em-transition-slow:   400ms ease;
  --em-transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --em-z-base:    1;
  --em-z-raised:  10;
  --em-z-overlay: 100;
  --em-z-modal:   1000;
  --em-z-nav:     9000;
  --em-z-top:     9999;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  background-color: var(--em-black);
  color: var(--em-white);
  font-family: var(--em-font-body);
  font-size: var(--em-text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--em-red);
  text-decoration: none;
  transition: color var(--em-transition-fast);
}

a:hover {
  color: var(--em-red-bright);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--em-font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--em-white);
}

h1 { font-size: clamp(var(--em-text-4xl), 6vw, var(--em-text-8xl)); }
h2 { font-size: clamp(var(--em-text-3xl), 4vw, var(--em-text-6xl)); }
h3 { font-size: clamp(var(--em-text-2xl), 3vw, var(--em-text-4xl)); }
h4 { font-size: var(--em-text-2xl); }
h5 { font-size: var(--em-text-xl); }
h6 { font-size: var(--em-text-lg); }

p {
  line-height: 1.7;
  color: var(--em-silver-light);
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.em-container {
  width: 100%;
  max-width: var(--em-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--em-space-6);
  padding-right: var(--em-space-6);
}

.em-container--narrow {
  max-width: var(--em-container-narrow);
}

.em-section {
  padding-top: var(--em-space-24);
  padding-bottom: var(--em-space-24);
}

.em-section--sm {
  padding-top: var(--em-space-16);
  padding-bottom: var(--em-space-16);
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

.em-label {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--em-red);
}

.em-label--silver {
  color: var(--em-silver-dark);
}

.em-overline {
  display: inline-flex;
  align-items: center;
  gap: var(--em-space-3);
  margin-bottom: var(--em-space-4);
}

.em-overline::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--em-red);
  flex-shrink: 0;
}

/* ==========================================================================
   Button System
   ========================================================================== */

.em-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--em-space-2);
  font-family: var(--em-font-display);
  font-size: var(--em-text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--em-space-3) var(--em-space-8);
  border: none;
  cursor: pointer;
  transition: all var(--em-transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.em-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--em-transition-fast);
}

.em-btn:hover::after {
  opacity: 1;
}

/* Primary — red fill */
.em-btn--primary {
  background: var(--em-red);
  color: var(--em-white);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.em-btn--primary:hover {
  background: var(--em-red-bright);
  color: var(--em-white);
  box-shadow: var(--em-shadow-red);
  transform: translateY(-1px);
}

/* Secondary — outline */
.em-btn--secondary {
  background: transparent;
  color: var(--em-white);
  border: 1px solid rgba(255,255,255,0.3);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.em-btn--secondary:hover {
  border-color: var(--em-red);
  color: var(--em-white);
  box-shadow: inset 0 0 0 1px var(--em-red);
}

/* Ghost — minimal */
.em-btn--ghost {
  background: transparent;
  color: var(--em-red);
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid var(--em-red);
  clip-path: none;
}

.em-btn--ghost:hover {
  color: var(--em-red-bright);
  border-color: var(--em-red-bright);
}

.em-btn--lg {
  font-size: var(--em-text-base);
  padding: var(--em-space-4) var(--em-space-10);
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.em-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-2);
}

.em-label-text {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--em-silver-dark);
}

.em-input,
.em-select,
.em-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--em-white);
  padding: var(--em-space-3) var(--em-space-4);
  font-family: var(--em-font-body);
  font-size: var(--em-text-base);
  transition: border-color var(--em-transition-fast), background var(--em-transition-fast);
  outline: none;
  width: 100%;
  border-radius: var(--em-radius-sm);
}

.em-input:focus,
.em-select:focus,
.em-textarea:focus {
  border-color: var(--em-red);
  background: rgba(204, 17, 34, 0.04);
}

.em-input::placeholder,
.em-textarea::placeholder {
  color: var(--em-silver-dark);
  opacity: 0.6;
}

.em-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Navigation Base
   ========================================================================== */

.em-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--em-z-nav);
  height: 72px;
  display: flex;
  align-items: center;
  transition: background var(--em-transition), box-shadow var(--em-transition);
}

.em-nav--scrolled {
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.em-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.em-nav__logo {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xl);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--em-white);
  text-decoration: none;
}

.em-nav__logo span {
  color: var(--em-red);
}

.em-nav__links {
  display: flex;
  align-items: center;
  gap: var(--em-space-8);
}

.em-nav__link {
  font-family: var(--em-font-display);
  font-size: var(--em-text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--em-transition-fast);
  position: relative;
}

.em-nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 100%;
  height: 2px;
  background: var(--em-red);
  transition: right var(--em-transition);
}

.em-nav__link:hover {
  color: var(--em-white);
}

.em-nav__link:hover::after {
  right: 0;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.em-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--em-black-deep);
}

.em-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center;
}

.em-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.7) 50%,
    rgba(10, 10, 10, 0.4) 100%
  );
}

.em-hero__content {
  position: relative;
  z-index: var(--em-z-base);
  padding-top: 100px;
}

.em-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--em-space-3);
  margin-bottom: var(--em-space-6);
}

.em-hero__eyebrow-line {
  width: 40px;
  height: 2px;
  background: var(--em-red);
}

.em-hero__eyebrow-text {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--em-red);
}

.em-hero__title {
  font-size: clamp(var(--em-text-5xl), 8vw, 7rem);
  line-height: 0.95;
  margin-bottom: var(--em-space-8);
  max-width: 18ch;
}

.em-hero__title em {
  font-style: normal;
  color: var(--em-red);
  display: block;
}

.em-hero__subtitle {
  font-size: var(--em-text-lg);
  color: rgba(255, 255, 255, 0.65);
  max-width: 45ch;
  line-height: 1.6;
  margin-bottom: var(--em-space-10);
}

.em-hero__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--em-space-4);
}

.em-hero__scroll {
  position: absolute;
  bottom: var(--em-space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--em-space-2);
  color: rgba(255,255,255,0.3);
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ==========================================================================
   Stat Counter Bar
   ========================================================================== */

.em-stats {
  background: var(--em-red);
  padding: var(--em-space-6) 0;
}

.em-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--em-space-4);
}

.em-stat {
  text-align: center;
  position: relative;
}

.em-stat + .em-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: rgba(255,255,255,0.2);
}

.em-stat__number {
  font-family: var(--em-font-display);
  font-size: clamp(var(--em-text-3xl), 4vw, var(--em-text-5xl));
  font-weight: 800;
  line-height: 1;
  color: var(--em-white);
  display: block;
}

.em-stat__label {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-top: var(--em-space-1);
}

/* ==========================================================================
   Services Grid
   ========================================================================== */

.em-services {
  background: var(--em-black-soft);
}

.em-services__header {
  margin-bottom: var(--em-space-16);
}

.em-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
}

.em-service-card {
  background: var(--em-black-soft);
  padding: var(--em-space-10) var(--em-space-8);
  position: relative;
  overflow: hidden;
  transition: background var(--em-transition);
}

.em-service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 100%;
  height: 2px;
  background: var(--em-red);
  transition: right var(--em-transition-slow);
}

.em-service-card:hover {
  background: var(--em-black-mid);
}

.em-service-card:hover::before {
  right: 0;
}

.em-service-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--em-space-6);
  color: var(--em-red);
}

.em-service-card__title {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xl);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--em-white);
  margin-bottom: var(--em-space-3);
}

.em-service-card__desc {
  font-size: var(--em-text-sm);
  color: var(--em-silver-dark);
  line-height: 1.7;
}

/* ==========================================================================
   Gallery Grid
   ========================================================================== */

.em-gallery {
  background: var(--em-black);
}

.em-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 4px;
}

.em-gallery__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--em-black-mid);
}

.em-gallery__item--featured {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.em-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--em-transition-slow);
}

.em-gallery__item:hover img {
  transform: scale(1.04);
}

.em-gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--em-transition);
  display: flex;
  align-items: flex-end;
  padding: var(--em-space-4);
}

.em-gallery__item:hover .em-gallery__item-overlay {
  opacity: 1;
}

.em-gallery__item-label {
  font-family: var(--em-font-display);
  font-size: var(--em-text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--em-white);
}

/* ==========================================================================
   About Section
   ========================================================================== */

.em-about {
  background: var(--em-black-soft);
}

.em-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--em-space-16);
  align-items: center;
}

.em-about__image-wrap {
  position: relative;
}

.em-about__image-wrap::after {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 70%;
  height: 70%;
  border: 2px solid var(--em-red);
  z-index: 0;
}

.em-about__image {
  position: relative;
  z-index: 1;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
}

.em-about__content {
  padding: var(--em-space-8) 0;
}

.em-about__title {
  margin-bottom: var(--em-space-6);
}

.em-about__body {
  margin-bottom: var(--em-space-8);
}

.em-about__body p + p {
  margin-top: var(--em-space-4);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.em-testimonials {
  background: var(--em-black);
}

.em-testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--em-space-6);
}

.em-testimonial-card {
  background: var(--em-black-mid);
  border: var(--em-border);
  padding: var(--em-space-8);
  position: relative;
  transition: border-color var(--em-transition);
}

.em-testimonial-card:hover {
  border-color: rgba(204, 17, 34, 0.3);
}

.em-testimonial-card__quote-mark {
  font-family: var(--em-font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--em-red);
  opacity: 0.4;
  display: block;
  margin-bottom: var(--em-space-4);
}

.em-testimonial-card__body {
  font-size: var(--em-text-base);
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: var(--em-space-6);
  font-style: italic;
}

.em-testimonial-card__author {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: var(--em-space-4);
}

.em-testimonial-card__name {
  font-family: var(--em-font-display);
  font-size: var(--em-text-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--em-white);
}

.em-testimonial-card__vehicle {
  font-size: var(--em-text-xs);
  color: var(--em-silver-dark);
  margin-top: var(--em-space-1);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.em-contact {
  background: var(--em-black-soft);
}

.em-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--em-space-16);
  align-items: start;
}

.em-contact__info-item {
  display: flex;
  gap: var(--em-space-4);
  align-items: flex-start;
  margin-bottom: var(--em-space-8);
}

.em-contact__info-icon {
  width: 40px;
  height: 40px;
  background: var(--em-red-glow);
  border: var(--em-border-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--em-red);
}

.em-contact__info-label {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--em-silver-dark);
  margin-bottom: var(--em-space-1);
}

.em-contact__info-value {
  font-size: var(--em-text-lg);
  color: var(--em-white);
  font-weight: 500;
}

.em-contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-4);
}

.em-contact__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--em-space-4);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.em-footer {
  background: var(--em-black-deep);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.em-footer__top {
  padding: var(--em-space-16) 0;
}

.em-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--em-space-12);
}

.em-footer__brand-name {
  font-family: var(--em-font-display);
  font-size: var(--em-text-2xl);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--em-white);
  margin-bottom: var(--em-space-4);
}

.em-footer__brand-name span {
  color: var(--em-red);
}

.em-footer__tagline {
  font-size: var(--em-text-sm);
  color: var(--em-silver-dark);
  line-height: 1.7;
  max-width: 32ch;
}

.em-footer__col-title {
  font-family: var(--em-font-display);
  font-size: var(--em-text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--em-silver-dark);
  margin-bottom: var(--em-space-6);
}

.em-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--em-space-3);
}

.em-footer__link {
  font-size: var(--em-text-sm);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--em-transition-fast);
}

.em-footer__link:hover {
  color: var(--em-white);
}

.em-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: var(--em-space-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.em-footer__copy {
  font-size: var(--em-text-xs);
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
}

.em-footer__phone {
  font-family: var(--em-font-display);
  font-size: var(--em-text-sm);
  font-weight: 700;
  color: var(--em-red);
  letter-spacing: 0.1em;
  text-decoration: none;
}

/* ==========================================================================
   Dividers & Decorative Elements
   ========================================================================== */

.em-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(204,17,34,0.4), transparent);
  border: none;
  margin: 0;
}

.em-red-bar {
  width: 48px;
  height: 3px;
  background: var(--em-red);
  margin-bottom: var(--em-space-4);
}

.em-red-bar--center {
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.em-text-red    { color: var(--em-red); }
.em-text-white  { color: var(--em-white); }
.em-text-silver { color: var(--em-silver); }
.em-text-dim    { color: var(--em-silver-dark); }

.em-bg-black    { background: var(--em-black); }
.em-bg-soft     { background: var(--em-black-soft); }
.em-bg-mid      { background: var(--em-black-mid); }
.em-bg-red      { background: var(--em-red); }

.em-text-center { text-align: center; }
.em-text-left   { text-align: left; }
.em-text-right  { text-align: right; }

.em-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ==========================================================================
   WordPress Core Alignment Classes
   ========================================================================== */

.alignleft  { float: left; margin-right: var(--em-space-4); }
.alignright { float: right; margin-left: var(--em-space-4); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; margin-left: calc(-1 * var(--em-space-6)); margin-right: calc(-1 * var(--em-space-6)); }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .em-services__grid     { grid-template-columns: repeat(2, 1fr); }
  .em-gallery__grid      { grid-template-columns: repeat(2, 1fr); }
  .em-gallery__item--featured { grid-column: span 2; }
  .em-about__grid        { grid-template-columns: 1fr; gap: var(--em-space-10); }
  .em-about__image-wrap  { max-width: 540px; margin: 0 auto; }
  .em-testimonials__grid { grid-template-columns: repeat(2, 1fr); }
  .em-footer__grid       { grid-template-columns: 1fr 1fr; }
  .em-stats__grid        { grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,0.15); }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --em-space-24: 4rem;
    --em-space-16: 3rem;
  }

  .em-container { padding-left: var(--em-space-4); padding-right: var(--em-space-4); }

  .em-nav__links  { display: none; }

  .em-services__grid     { grid-template-columns: 1fr; }
  .em-gallery__grid      { grid-template-columns: 1fr; }
  .em-gallery__item--featured { grid-column: span 1; }
  .em-testimonials__grid { grid-template-columns: 1fr; }
  .em-contact__grid      { grid-template-columns: 1fr; gap: var(--em-space-10); }
  .em-contact__form-row  { grid-template-columns: 1fr; }
  .em-footer__grid       { grid-template-columns: 1fr; gap: var(--em-space-8); }
  .em-footer__bottom     { flex-direction: column; gap: var(--em-space-4); text-align: center; }
  .em-stats__grid        { grid-template-columns: repeat(2, 1fr); }

  .em-hero__title {
    font-size: clamp(var(--em-text-4xl), 10vw, var(--em-text-6xl));
  }
}

@media (max-width: 480px) {
  .em-stats__grid { grid-template-columns: 1fr 1fr; }
}
/**
 * Envision Motorsports — Lightbox & Scroll Reveal Styles
 * Loaded as part of the theme stylesheet supplement.
 * These styles are appended to style.css via the theme build.
 */

/* ==========================================================================
   Scroll Reveal
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].em-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

#em-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#em-lightbox.em-lightbox--open {
  opacity: 1;
  pointer-events: all;
}

.em-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
}

.em-lb__content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.em-lb__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 8px 60px rgba(0,0,0,0.8);
}

.em-lb__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.em-lb__close:hover {
  background: #CC1122;
  border-color: #CC1122;
}

.em-lb__prev,
.em-lb__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.25rem;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.em-lb__prev { left: 16px; }
.em-lb__next { right: 16px; }

.em-lb__prev:hover,
.em-lb__next:hover {
  background: #CC1122;
  border-color: #CC1122;
}

.em-lb__caption {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ==========================================================================
   Form Feedback Messages
   ========================================================================== */

.em-form-message {
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 2px;
  display: none;
}

.em-form-message--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.em-form-message--error {
  background: rgba(204, 17, 34, 0.1);
  border: 1px solid rgba(204, 17, 34, 0.3);
  color: #fca5a5;
}

/* ==========================================================================
   Mobile Nav Open State
   ========================================================================== */

@media (max-width: 768px) {
  .em-nav__links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 9000;
  }

  .em-nav__links--open {
    display: flex;
  }

  .em-nav__link {
    font-size: 1rem;
  }
}
