/* ===================================================
   DF Auto Services — Home Page Design A
   "Two Doors" — split-screen hero with two paths:
   Online Store / Servicing
   =================================================== */

/* Visually hidden — readable to screen readers, invisible on screen.
   Used for the SEO H1 above the two-doors hero. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Two-Doors Hero --- */
.twodoors {
  position: relative;
  display: flex;
  width: 100%;
  /* Fill viewport below sticky 80px nav */
  min-height: calc(100vh - 80px);
  overflow: hidden;
  background: var(--black);
}

.twodoors-half {
  position: relative;
  /* Explicit basis so panel widths are predictable. flex-grow:0 / shrink:0
     means the panel is exactly the basis we set — no ratio rounding. */
  flex: 0 0 50%;
  /* Override default min-width: auto so explicit basis isn't overruled by
     intrinsic content min-width on the shrunken side. */
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px 64px 72px;
  color: var(--white);
  text-decoration: none;
  isolation: isolate;
  transition: flex-basis 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Hover/focus drives flex-basis directly. Both halves' bases are
   controlled by :has() at the parent so they stay in lockstep with the
   divider, which uses the same percentages. */
.twodoors:has(.twodoors-half--store:hover) .twodoors-half--store,
.twodoors:has(.twodoors-half--store:focus-visible) .twodoors-half--store,
.twodoors:has(.twodoors-half--service:hover) .twodoors-half--service,
.twodoors:has(.twodoors-half--service:focus-visible) .twodoors-half--service {
  flex-basis: 65%;
}
.twodoors:has(.twodoors-half--store:hover) .twodoors-half--service,
.twodoors:has(.twodoors-half--store:focus-visible) .twodoors-half--service,
.twodoors:has(.twodoors-half--service:hover) .twodoors-half--store,
.twodoors:has(.twodoors-half--service:focus-visible) .twodoors-half--store {
  flex-basis: 35%;
}

.twodoors-half:hover,
.twodoors-half:focus-visible {
  text-decoration: none;
}

.twodoors-half:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: -6px;
}

/* Background image — fills the half, slowly zooms in on hover */
.twodoors-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 1.4s ease, filter 0.5s ease;
  z-index: 0;
}

.twodoors-half:hover .twodoors-bg,
.twodoors-half:focus-visible .twodoors-bg {
  transform: scale(1.10);
}

/* Tinted overlay — different per half so the choice reads visually */
.twodoors-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.5s ease;
}

/* LEFT — Online Store: cooler, near-black wash, colour photo */
.twodoors-half--store .twodoors-bg {
  background-image: url('../assets/images/night lights Scott.jpeg');
  /* Slight grade — keep it punchy */
  filter: saturate(1.05) contrast(1.05);
}
.twodoors-half--store .twodoors-overlay {
  background:
    linear-gradient(to top,
      rgba(0,0,0,0.92) 0%,
      rgba(0,0,0,0.65) 35%,
      rgba(0,0,0,0.35) 65%,
      rgba(0,0,0,0.20) 100%),
    linear-gradient(120deg,
      rgba(20,20,30,0.40) 0%,
      rgba(0,0,0,0.10) 100%);
}
.twodoors-half--store:hover .twodoors-overlay,
.twodoors-half--store:focus-visible .twodoors-overlay {
  opacity: 0.82;
}

/* RIGHT — Servicing: warm red wash, B&W image */
.twodoors-half--service .twodoors-bg {
  background-image: url('../assets/images/DFAS_BW21.jpg');
  filter: grayscale(100%) contrast(1.05);
  transition: transform 1.4s ease, filter 0.6s ease;
}
.twodoors-half--service:hover .twodoors-bg,
.twodoors-half--service:focus-visible .twodoors-bg {
  filter: grayscale(40%) contrast(1.05);
}
.twodoors-half--service .twodoors-overlay {
  background:
    linear-gradient(to top,
      rgba(80,20,20,0.92) 0%,
      rgba(120,40,40,0.55) 40%,
      rgba(183,78,78,0.32) 75%,
      rgba(183,78,78,0.18) 100%);
}
.twodoors-half--service:hover .twodoors-overlay,
.twodoors-half--service:focus-visible .twodoors-overlay {
  opacity: 0.88;
}

/* Big chapter numeral — top-left of each half */
.twodoors-numeral {
  position: absolute;
  top: 36px;
  left: 64px;
  z-index: 2;
  font-size: clamp(4.5rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.18);
  user-select: none;
  pointer-events: none;
  transition: color 0.4s ease, transform 0.6s ease;
}
.twodoors-half:hover .twodoors-numeral,
.twodoors-half:focus-visible .twodoors-numeral {
  color: rgba(255, 255, 255, 0.32);
  transform: translateY(-4px);
}

/* Arrow icon — top-right, nudges on hover */
.twodoors-arrow {
  position: absolute;
  top: 48px;
  right: 64px;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.3s ease,
              background 0.3s ease;
}
.twodoors-arrow svg {
  width: 22px;
  height: 22px;
  stroke: var(--white);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.twodoors-half:hover .twodoors-arrow,
.twodoors-half:focus-visible .twodoors-arrow {
  transform: translateX(6px);
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.10);
}
.twodoors-half:hover .twodoors-arrow svg,
.twodoors-half:focus-visible .twodoors-arrow svg {
  transform: translateX(2px);
}

/* Body content — sits at bottom of each half */
.twodoors-content {
  position: relative;
  z-index: 2;
  max-width: 460px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.twodoors-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 18px;
}
.twodoors-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  display: inline-block;
}

.twodoors-half h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--white);
}
.twodoors-half h2 em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.twodoors-sub {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 30px;
  max-width: 420px;
}

.twodoors-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--near-black);
  text-decoration: none;
  border: 2px solid var(--white);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.twodoors-half:hover .twodoors-cta,
.twodoors-half:focus-visible .twodoors-cta {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
/* Servicing side: invert — primary CTA reads as call action */
.twodoors-half--service .twodoors-cta {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}
.twodoors-half--service:hover .twodoors-cta,
.twodoors-half--service:focus-visible .twodoors-cta {
  background: var(--white);
  color: var(--red);
  border-color: var(--white);
}

.twodoors-meta {
  display: block;
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.03em;
}

/* Centre vertical divider with brand monogram.
   `left` is animated to follow the actual seam between the two halves
   when one expands on hover (see :has() rules below). */
.twodoors-divider {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 1px;
  height: 64%;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(255,255,255,0.0) 5%,
    rgba(255,255,255,0.35) 30%,
    rgba(255,255,255,0.35) 70%,
    rgba(255,255,255,0.0) 95%,
    transparent 100%);
  pointer-events: none;
  transition: left 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.twodoors-monogram {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--near-black);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--white);
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  transition: left 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Track the seam: when store expands to 65%, divider moves to 65%.
   When service expands, store shrinks to 35%, divider moves to 35%. */
.twodoors:has(.twodoors-half--store:hover) .twodoors-divider,
.twodoors:has(.twodoors-half--store:focus-visible) .twodoors-divider,
.twodoors:has(.twodoors-half--store:hover) .twodoors-monogram,
.twodoors:has(.twodoors-half--store:focus-visible) .twodoors-monogram {
  left: 65%;
}
.twodoors:has(.twodoors-half--service:hover) .twodoors-divider,
.twodoors:has(.twodoors-half--service:focus-visible) .twodoors-divider,
.twodoors:has(.twodoors-half--service:hover) .twodoors-monogram,
.twodoors:has(.twodoors-half--service:focus-visible) .twodoors-monogram {
  left: 35%;
}

/* --- Mobile: stack vertically --- */
@media (max-width: 760px) {
  .twodoors {
    flex-direction: column;
    min-height: auto;
  }
  .twodoors-half {
    flex: 0 0 auto;
    min-height: 60vh;
    padding: 48px 28px 56px;
  }
  .twodoors-half:hover,
  .twodoors-half:focus-visible { flex-grow: 1; }
  .twodoors-numeral {
    top: 24px;
    left: 28px;
    font-size: 4.5rem;
  }
  .twodoors-arrow {
    top: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
  }
  .twodoors-divider,
  .twodoors-monogram { display: none; }
  .twodoors-half h2 { font-size: clamp(2rem, 8vw, 2.8rem); }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .twodoors-half,
  .twodoors-bg,
  .twodoors-arrow,
  .twodoors-arrow svg,
  .twodoors-numeral,
  .twodoors-overlay,
  .twodoors-divider,
  .twodoors-monogram {
    transition: none !important;
  }
  /* No panel resize for reduced motion users */
  .twodoors:has(.twodoors-half:hover) .twodoors-half,
  .twodoors:has(.twodoors-half:focus-visible) .twodoors-half {
    flex-basis: 50%;
  }
  .twodoors:has(.twodoors-half:hover) .twodoors-divider,
  .twodoors:has(.twodoors-half:focus-visible) .twodoors-divider,
  .twodoors:has(.twodoors-half:hover) .twodoors-monogram,
  .twodoors:has(.twodoors-half:focus-visible) .twodoors-monogram {
    left: 50%;
  }
  .twodoors-half:hover .twodoors-bg,
  .twodoors-half:focus-visible .twodoors-bg {
    transform: scale(1.04);
  }
}

/* --- Below-the-fold: condensed brand strip + condensed why-us --- */
.brand-strip {
  background: var(--white);
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--border);
}
.brand-strip-header {
  text-align: center;
  margin-bottom: 36px;
}
.brand-strip-header .section-label { color: var(--mid-grey); }
.brand-strip-header h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--near-black);
  letter-spacing: -0.01em;
}

.brand-strip-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 36px;
  max-width: 980px;
  margin: 0 auto;
}
.brand-strip-list span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--mid-grey);
  letter-spacing: 0.02em;
  padding: 6px 4px;
  transition: color 0.2s ease;
}
.brand-strip-list span:hover { color: var(--near-black); }

@media (max-width: 540px) {
  .brand-strip-list { gap: 10px 24px; font-size: 0.9rem; }
}

/* Why DFAS — compact 3-up */
.why-dfas {
  background: var(--off-white);
  padding: 80px 0 96px;
}
.why-dfas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  max-width: 1080px;
  margin: 0 auto;
}
.why-card {
  background: var(--white);
  padding: 36px 32px;
  border-radius: var(--radius-md);
  border-top: 4px solid var(--red);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  text-align: left;
}
.why-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.why-card-icon svg { width: 22px; height: 22px; stroke: var(--white); }
.why-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--near-black);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.why-card p {
  font-size: 0.94rem;
  color: var(--mid-grey);
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 800px) {
  .why-dfas-grid { grid-template-columns: 1fr; gap: 18px; }
  .why-dfas { padding: 56px 0 64px; }
}
