/* ============================================================
   AFTERHOURS — ONE-PAGE LAYOUT + MOBILE FIXES
   Loaded LAST so it wins the cascade (doron.css's .btn rule
   was re-showing the nav CTA on mobile after base.css hid it).
   ============================================================ */

/* ── Smooth in-page scrolling with room for the fixed nav ── */
html { scroll-behavior: smooth; }
section[id], div[id="teardown"] { scroll-margin-top: 5.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── MOBILE NAV FIX ──
   The CTA button was staying visible at phone widths and pushing
   the burger button ~180px off the right edge of the screen,
   making the menu unusable. */
@media (max-width: 768px) {
  .nav .nav__links { display: none !important; }
  .nav .nav__cta   { display: none !important; }
  .nav .nav__burger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
  }
  .nav .nav__mega { display: none !important; }
  .nav__inner { gap: var(--s3); }
  .nav__logo { flex-shrink: 1; min-width: 0; }
}

/* ── About section (ported from pages/about.html) ── */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--rule);
  margin-top: var(--s6);
}
.about-stats__cell {
  padding: var(--s6) var(--s5);
  border-right: var(--rule);
}
.about-stats__cell:last-child { border-right: none; }
.about-stats__num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
  display: block;
}
@media (max-width: 900px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .about-stats__cell:nth-child(2n) { border-right: none; }
  .about-stats__cell:nth-child(-n+2) { border-bottom: var(--rule); }
}

/* ── Contact section (ported from pages/contact.html) ── */
#contact { text-align: left; }
.btn-full { width: 100%; justify-content: center; }

/* ── HERO SLOGAN ──
   Was transparent text with a thin purple outline — it washed out
   under the headline's neon glow and read as "hidden". Now solid,
   larger, and sized so its two lines span roughly the same width
   as the AfterHours Automation title. */
.hero__tagline-major {
  font-size: clamp(1.55rem, 4vw, 3.5rem) !important;
  color: var(--paper) !important;
  -webkit-text-stroke: 0 !important;
  letter-spacing: 0.04em !important;
  line-height: 1.15 !important;
  max-width: 100% !important;
  margin: 2.5rem auto 0 !important;
  text-wrap: balance;
  text-shadow:
    0 0 12px rgba(89, 0, 255, 0.45),
    0 0 30px rgba(89, 0, 255, 0.2) !important;
}
.hero__tagline-major .hollow-orange {
  color: #FF6600;
  -webkit-text-stroke: 0;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.8), 0 0 24px rgba(255, 102, 0, 0.4);
}

/* ── SHARED SECTION HEADLINES — big, wide, horizontal.
   One style for every major section title so the page reads
   consistently and titles use the full width instead of stacking. ── */
.section-headline,
#services .services-headline {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--paper);
  margin: var(--s4) 0;
}
.section-intro,
#services .services-intro {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--body-muted);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: var(--s7);
}

/* ── HERO CTA spacing — buttons were touching the slogan ── */
.hero__cta {
  margin-top: 3rem !important;
  gap: var(--s5) !important;
}

/* ── SIMULATOR HEADER — copy left, ringing rotary phone right ── */
.sim-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s7);
  flex-wrap: wrap;
  margin-bottom: var(--s7);
}
.sim-header__copy { flex: 1 1 480px; min-width: 0; }
.sim-header__copy .section-intro { margin-bottom: 0; }

/* Tron-orange rotary phone, ringing */
.rotary-phone {
  flex: 0 0 auto;
  margin: 0 var(--s6);
}
.rotary-phone svg {
  overflow: visible;
  display: block;
  /* two shadows, not three — each drop-shadow re-renders with the
     ring animation every frame */
  filter:
    drop-shadow(0 0 6px rgba(255, 102, 0, 0.9))
    drop-shadow(0 0 22px rgba(255, 102, 0, 0.45));
}
/* handset hops in ring bursts */
.rp-handset {
  transform-origin: 120px 60px;
  animation: rpRing 2.4s ease-in-out infinite;
}
@keyframes rpRing {
  0%, 40%, 100% { transform: rotate(0deg) translateY(0); }
  44% { transform: rotate(-4deg) translateY(-6px); }
  50% { transform: rotate(4deg) translateY(-8px); }
  56% { transform: rotate(-3deg) translateY(-6px); }
  62% { transform: rotate(3deg) translateY(-7px); }
  68% { transform: rotate(-2deg) translateY(-4px); }
  74% { transform: rotate(0deg) translateY(0); }
}
/* ring waves pulse outward in the same rhythm */
.rp-wave { opacity: 0; }
.rp-wave--l1, .rp-wave--r1 { animation: rpWave 2.4s ease-out infinite; }
.rp-wave--l2, .rp-wave--r2 { animation: rpWave 2.4s ease-out infinite 0.15s; }
.rp-wave--l1, .rp-wave--l2 { transform-origin: 46px 42px; }
.rp-wave--r1, .rp-wave--r2 { transform-origin: 194px 42px; }
@keyframes rpWave {
  0%, 40% { opacity: 0; transform: scale(0.7); }
  50% { opacity: 1; }
  74% { opacity: 0; transform: scale(1.25); }
  100% { opacity: 0; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .rp-handset, .rp-wave { animation: none; }
  .rp-wave { opacity: 0.6; }
}
@media (max-width: 768px) {
  .rotary-phone { margin: 0 auto; }
  .rotary-phone svg { width: 160px; height: auto; }
}

/* ── CONTACT — numbered next-steps list (replaces the sys-window) ── */
.contact-steps {
  list-style: none;
  padding: 0;
  margin: var(--s5) 0 0;
  border-top: var(--rule);
}
.contact-steps li {
  display: flex;
  align-items: baseline;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-bottom: var(--rule);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--body-muted);
  line-height: 1.5;
}
.contact-steps__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: #FF6600;
  flex-shrink: 0;
}
#services .service-card__headline {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.05;
}

/* Risk-reversal reassurance line under pricing grid */
.pricing-reassurance {
  margin-top: var(--s5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--body-muted);
  text-align: center;
}
.pricing-reassurance strong { color: #FF6600; font-weight: 400; }
