/* ==========================================================================
   ARCWELL ELECTRIC — ELEVATION SUITE
   Progressive enhancement for award-tier visual depth & motion
   ========================================================================== */

/* -----------------------------------------------------------
   ELEVATION TOKENS (extends root)
   ----------------------------------------------------------- */
:root {
  /* Enhanced depth & layering */
  --shadow-volt-soft: 0 4px 16px -4px rgba(217, 164, 65, 0.25);
  --shadow-volt-medium: 0 12px 32px -8px rgba(217, 164, 65, 0.35);
  --shadow-depth-1: 0 2px 4px rgba(11, 14, 18, 0.04), 0 1px 2px rgba(11, 14, 18, 0.08);
  --shadow-depth-2: 0 6px 16px -4px rgba(11, 14, 18, 0.1), 0 3px 8px -3px rgba(11, 14, 18, 0.06);
  --shadow-lift: 0 20px 48px -12px rgba(11, 14, 18, 0.15), 0 8px 16px -8px rgba(11, 14, 18, 0.08);

  /* Motion easing for liveliness */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.4, 0.0, 0.2, 1);
  --ease-snappy: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Animation timings */
  --t-instant: 80ms;
  --t-micro: 140ms;
  --t-subtle: 200ms;
}

/* -----------------------------------------------------------
   FILM GRAIN OVERLAY
   ----------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' result='noise' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='%23F5F5F5' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  mix-blend-mode: overlay;
}

/* -----------------------------------------------------------
   TYPOGRAPHY ENHANCEMENTS
   ----------------------------------------------------------- */

/* Display headings: add italic accent for resonant word */
h1 em, h2 em, h3 em, .display em {
  font-style: italic;
  color: var(--volt);
  font-weight: 600;
}

/* -----------------------------------------------------------
   HERO SIGNATURE: LAYERED + GRAIN + STAGGERED ENTRANCE
   ----------------------------------------------------------- */

.hero {
  position: relative;
}

/* Enhanced hero background with layered overlay */
.hero__bg::after {
  background:
    linear-gradient(180deg, rgba(11, 14, 18, 0.55) 0%, rgba(11, 14, 18, 0.35) 40%, rgba(11, 14, 18, 0.92) 92%, rgba(11, 14, 18, 1) 100%),
    linear-gradient(90deg, rgba(217, 164, 65, 0.08) 0%, rgba(11, 14, 18, 0.1) 60%),
    linear-gradient(135deg, rgba(217, 164, 65, 0.04) 0%, transparent 100%);
  z-index: 0;
}

/* Subtle animated current line in hero (thin gold line from top) */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 5%;
  width: 2px;
  height: 40%;
  background: linear-gradient(180deg, var(--volt) 0%, rgba(217, 164, 65, 0.6) 50%, transparent 100%);
  z-index: 2;
  animation: currentFlow 3s ease-in-out infinite;
  opacity: 0;
  animation-delay: 0.6s;
}

@keyframes currentFlow {
  0% { height: 0%; opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { height: 80%; opacity: 0; }
}

/* Staggered entrance for hero content */
.hero__content.reveal {
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out) forwards;
}

.hero__chips {
  animation: revealDown 0.6s var(--ease-out) 0.1s forwards;
  opacity: 0;
}

.eyebrow--inv {
  animation: revealDown 0.6s var(--ease-out) 0.15s forwards;
  opacity: 0;
}

.hero__title {
  animation: revealUp 0.8s var(--ease-out) 0.25s forwards;
  opacity: 0;
}

.hero__sub {
  animation: revealUp 0.7s var(--ease-out) 0.35s forwards;
  opacity: 0;
}

.hero__actions {
  animation: revealUp 0.7s var(--ease-out) 0.45s forwards;
  opacity: 0;
}

.hero__meta {
  animation: revealUp 0.7s var(--ease-out) 0.55s forwards;
  opacity: 0;
}

@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero image slight saturation boost for grading */
.hero__bg img {
  filter: saturate(1.08) contrast(1.05);
}

/* -----------------------------------------------------------
   BUTTON ENHANCEMENTS: MAGNETIC CTA + GOLD→COPPER GRADIENT
   ----------------------------------------------------------- */

/* Primary button signature: gold base, hover with gradient + micro-scale + glow */
.btn--primary {
  position: relative;
  transition:
    background var(--t-micro) var(--ease-out),
    box-shadow var(--t-micro) var(--ease-out),
    transform var(--t-micro) var(--ease-out),
    color var(--t-micro) var(--ease-out);
}

.btn--primary:hover {
  background: linear-gradient(90deg, var(--volt) 0%, var(--copper) 100%);
  transform: scale(1.04) translateY(-2px);
  box-shadow:
    var(--shadow-volt-medium),
    0 0 20px -4px rgba(217, 164, 65, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.btn--primary:active {
  transform: scale(1.01) translateY(0);
}

/* Magnetic effect for pointer-fine (hover to proximity) */
@media (pointer: fine) and (hover: hover) {
  .btn--primary {
    cursor: pointer;
    transition:
      background var(--t-subtle) var(--ease-soft),
      box-shadow var(--t-subtle) var(--ease-soft),
      transform var(--t-subtle) var(--ease-soft);
  }
}

/* Other button styles refined */
.btn--dark:hover {
  box-shadow:
    var(--shadow-lift),
    0 0 16px -4px rgba(11, 14, 18, 0.3);
  transform: translateY(-2px) scale(1.02);
}

.btn--ghost-inv:hover {
  box-shadow:
    var(--shadow-lift),
    0 0 12px -3px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.02);
}

/* Emergency button glow enhancement */
.btn--emergency:hover {
  box-shadow:
    0 12px 32px -8px rgba(217, 69, 30, 0.45),
    0 0 16px -2px rgba(217, 69, 30, 0.35);
  transform: translateY(-2px) scale(1.02);
}

/* -----------------------------------------------------------
   CARD ENHANCEMENTS: DEPTH + HOVER LIFT
   ----------------------------------------------------------- */

.card, .card--feature, .svc-card, .quote {
  transition:
    transform var(--t-subtle) var(--ease-out),
    box-shadow var(--t-subtle) var(--ease-out),
    border-color var(--t-subtle) var(--ease-out),
    background var(--t-subtle) var(--ease-out);
}

/* Refined card hover: lift + enhanced shadow + subtle accent edge */
.card--hover:hover,
.svc-card:hover {
  transform: translateY(-6px);
  box-shadow:
    var(--shadow-lift),
    0 1px 0 var(--volt);
  border-color: var(--volt-deep);
}

.card--ink.card--hover:hover {
  box-shadow:
    var(--shadow-ink),
    0 1px 0 var(--volt-bright);
  border-color: var(--volt-bright);
}

/* Service card: enhanced top accent bar on hover */
.svc-card::before {
  background: linear-gradient(90deg, var(--volt) 0%, var(--copper) 100%);
  transform: scaleX(0.2);
  opacity: 0;
}

.svc-card:hover::before {
  opacity: 1;
  transform: scaleX(1);
  transition: opacity var(--t-micro) var(--ease-out), transform var(--t-slow) var(--ease-out);
}

/* -----------------------------------------------------------
   SECTION SPACING & BREATHING ROOM
   ----------------------------------------------------------- */

/* Increase card grid gap for better density management */
.grid { gap: var(--s-7); }
.grid--3 { gap: var(--s-8); }
.svc-card { min-height: 340px; padding: var(--s-8); }

/* Refined dividers */
.divider {
  background: linear-gradient(90deg, var(--line) 0%, transparent 50%, var(--line) 100%);
  height: 1px;
  opacity: 0.6;
}

/* Footer top divider in accent color */
footer { border-top: 1px solid var(--volt-deep); }

/* -----------------------------------------------------------
   SCROLL REVEAL STAGGER
   ----------------------------------------------------------- */

/* Add data-stagger attribute to enable nth-child staggered reveals */
[data-stagger] > * {
  opacity: 0;
  animation: revealUp 0.6s var(--ease-out) forwards;
}

[data-stagger] > :nth-child(1) { animation-delay: 0s; }
[data-stagger] > :nth-child(2) { animation-delay: 0.08s; }
[data-stagger] > :nth-child(3) { animation-delay: 0.16s; }
[data-stagger] > :nth-child(4) { animation-delay: 0.24s; }
[data-stagger] > :nth-child(5) { animation-delay: 0.32s; }
[data-stagger] > :nth-child(6) { animation-delay: 0.4s; }

/* When revealed, disable stagger animation */
[data-stagger].is-visible > * {
  opacity: 1;
  animation: none;
}

/* -----------------------------------------------------------
   SUBTLE PARALLAX FOR IMAGES
   ----------------------------------------------------------- */

[data-parallax] {
  position: relative;
  overflow: hidden;
}

[data-parallax] img {
  will-change: transform;
}

/* Motion preference respect */
@media (prefers-reduced-motion: reduce) {
  /* Disable all animations */
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Force revealed states */
  .reveal, [data-stagger] > * {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  /* Remove parallax */
  [data-parallax] img {
    transform: none !important;
  }

  /* Keep buttons interactive but without motion */
  .btn--primary:hover {
    background: linear-gradient(90deg, var(--volt) 0%, var(--copper) 100%);
    box-shadow: var(--shadow-volt-medium);
    transform: none;
  }

  .card--hover:hover, .svc-card:hover {
    transform: none;
    box-shadow: var(--shadow-lift), 0 1px 0 var(--volt);
  }
}

/* -----------------------------------------------------------
   FOCUS RING REFINEMENT
   ----------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
  border-radius: var(--r-2);
}

a:focus-visible {
  border-radius: var(--r-1);
}

button:focus-visible {
  outline-offset: 4px;
}

/* -----------------------------------------------------------
   LINK UNDERLINE & HOVER STATES
   ----------------------------------------------------------- */

.link-underline {
  position: relative;
  padding-bottom: 1px;
  background: linear-gradient(currentColor, currentColor) bottom left / 100% 1px no-repeat;
  transition: background-size var(--t-subtle) var(--ease-out);
}

.link-underline:hover {
  background-size: 100% 2px;
  color: var(--volt-deep);
}

.link-arrow {
  transition: gap var(--t-subtle) var(--ease-out);
}

.link-arrow:hover::after {
  animation: arrowSlide var(--t-subtle) var(--ease-snappy);
}

@keyframes arrowSlide {
  0% { transform: translateX(0); }
  50% { transform: translateX(6px); }
  100% { transform: translateX(4px); }
}

/* -----------------------------------------------------------
   FORM FIELD ENHANCEMENTS
   ----------------------------------------------------------- */

.input, .select, .textarea {
  transition:
    border-color var(--t-subtle) var(--ease-out),
    box-shadow var(--t-subtle) var(--ease-out),
    background var(--t-subtle) var(--ease-out);
  position: relative;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--volt);
  box-shadow:
    0 0 0 4px rgba(217, 164, 65, 0.15),
    inset 0 1px 0 rgba(217, 164, 65, 0.1);
}

/* Radio chips enhanced */
.radio-chip {
  transition: all var(--t-subtle) var(--ease-out);
}

.radio-chip:has(input:checked) {
  box-shadow: 0 2px 8px rgba(11, 14, 18, 0.1);
}

/* -----------------------------------------------------------
   STAT BANDS & TRUST STRIP REFINEMENT
   ----------------------------------------------------------- */

.stat-band, .trust-strip {
  position: relative;
}

.stat-band {
  box-shadow: var(--shadow-depth-2);
}

.stat-band__item {
  transition: background var(--t-subtle) var(--ease-out);
}

@media (hover: hover) {
  .stat-band__item:hover {
    background: rgba(217, 164, 65, 0.04);
  }
}

/* -----------------------------------------------------------
   CTA BAND REFINEMENT
   ----------------------------------------------------------- */

.cta-band {
  position: relative;
  box-shadow: inset 0 1px 0 var(--line-ink);
}

.cta-band::before {
  background: radial-gradient(ellipse at 80% 20%, rgba(217, 164, 65, 0.15), transparent 60%);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1.2; }
}

/* -----------------------------------------------------------
   PROCESS STEPS REFINEMENT
   ----------------------------------------------------------- */

.process__step {
  position: relative;
  transition: background var(--t-subtle) var(--ease-out);
}

@media (hover: hover) {
  .process__step:hover {
    background: rgba(217, 164, 65, 0.03);
  }
}

.process__num {
  color: var(--volt);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* -----------------------------------------------------------
   PAGE HEAD (service pages) ENHANCEMENT
   ----------------------------------------------------------- */

.page-head {
  position: relative;
  overflow: hidden;
}

.page-head__title em {
  color: var(--volt);
  font-style: italic;
  font-weight: 600;
}

.page-head__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(217, 164, 65, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 164, 65, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* -----------------------------------------------------------
   RESPONSIVE MOTION ADJUSTMENTS
   ----------------------------------------------------------- */

@media (max-width: 640px) {
  /* Reduce motion on mobile for better performance */
  .btn--primary:hover {
    transform: scale(1.02) translateY(-1px);
  }

  .card--hover:hover, .svc-card:hover {
    transform: translateY(-3px);
  }

  /* Simpler stagger on mobile */
  [data-stagger] > :nth-child(n) { animation-delay: 0s !important; }
}

/* -----------------------------------------------------------
   ACCESSIBILITY: OUTLINE & CONTRAST ENHANCEMENTS
   ----------------------------------------------------------- */

/* Stronger focus states for keyboard navigation */
.btn:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .card, .card--feature, .svc-card {
    border-width: 2px;
  }

  .btn--primary {
    border: 2px solid var(--volt);
  }
}

/* ============================================================
   ARCWELL — v3 DE-DENSIFY: breathing room, calmer rhythm
   Pure spacing/whitespace overrides. No structural changes.
   ============================================================ */

/* More generous vertical rhythm between sections */
.section { padding-top: clamp(72px, 9vw, 140px); padding-bottom: clamp(72px, 9vw, 140px); }
.section--lg { padding-top: clamp(96px, 11vw, 168px); padding-bottom: clamp(96px, 11vw, 168px); }
.section--compact { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); }

/* Section headers breathe more before their content */
.section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.section-head__body, .section-head p { line-height: 1.7; }

/* Card grids: wider gaps, airier cards */
.grid { gap: clamp(20px, 2.4vw, 36px); }
.grid--3 { gap: clamp(20px, 2.2vw, 32px); }

/* Service cards: more internal room + calmer type */
.svc-card { padding: clamp(28px, 2.6vw, 40px) clamp(24px, 2.2vw, 34px); }
.svc-card__body { line-height: 1.72; }
.svc-card__icon { margin-bottom: 22px; }

/* "The difference" lanes (the densest 6-up): give each item air + scale up text */
.lanes { gap: clamp(28px, 3vw, 52px) clamp(36px, 4vw, 64px); }
.lanes__item { padding-right: clamp(8px, 1vw, 20px); }
.lanes__title { font-size: 1.0625rem; margin-bottom: 10px; }
.lanes__body, .lanes__item p { line-height: 1.74; font-size: 0.95rem; }
.lanes__num { margin-bottom: 14px; }

/* Service-area grid: fewer, larger tiles with more space (was 16 tight tiles) */
.area-grid { gap: 14px; }
.area-tile { padding: 18px 20px; }
@media (min-width: 900px) { .area-grid { grid-template-columns: repeat(4, 1fr) !important; } }

/* Process lanes / checklist breathing */
.checklist__item { line-height: 1.7; }

/* Calmer dividers — reduce competing hairlines */
.section + .section { border-top: none; }

/* Tighten the measure on long body copy for readability */
.section-head__body { max-width: 46ch; }

/* Reviews: a touch more room between cards */
.reviews .grid, .reviews-grid { gap: clamp(20px, 2.4vw, 32px); }
