/* ================================================================
   PRETORIA PLUMBING & DRAINS — Demo 2
   Palette: #0D0D0D / #1A1A1A / #FF5A00 / #C24400 / #FAFAFA / #9E9E9E / #2E2E2E
   Fonts: Archivo Black (headings) · Barlow (body)
   ================================================================ */

:root {
  --steel: #0D0D0D;
  --panel: #1A1A1A;
  --orange: #FF5A00;
  --orange-dim: #C24400;
  --white: #FAFAFA;
  --grey: #9E9E9E;
  --hairline: #2E2E2E;
  --motion: 200ms;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--steel);
  /* subtle concrete noise at 3% */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  color: var(--grey);
  font-family: 'Barlow', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .stat-num, .big-phone, .logo, .nav-call, .marquee, .tag, .wa-copy strong {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--orange); color: #000; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.section { padding: 88px 0; position: relative; }

/* hazard stripe section-edge divider */
.section + .section::before {
  content: "";
  display: block;
  position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(-45deg,
    var(--orange) 0 8px, var(--steel) 8px 16px);
  opacity: 0.22;
}

.label {
  font-family: 'Barlow', sans-serif; font-weight: 600;
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--orange); margin-bottom: 10px;
}
.section-h {
  color: var(--white); font-size: 48px; line-height: 1.05;
  text-transform: uppercase; margin-bottom: 40px;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  width: min(1140px, 92%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.logo {
  color: var(--white); font-size: 22px; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.logo-glyph { color: var(--orange); display: flex; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--grey); text-decoration: none; font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: color var(--motion);
}
.nav-links a:hover { color: var(--orange); }
.nav-call {
  color: var(--white) !important;
  border: 2px solid var(--orange); padding: 8px 14px;
}
.nav-call:hover { background: var(--orange); color: #000 !important; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--hairline);
  padding: 10px; cursor: pointer; flex-direction: column; gap: 4px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--white); display: block; }

/* ============ HERO ============ */
.hazard-top {
  height: 8px;
  background: repeating-linear-gradient(-45deg,
    var(--orange) 0 12px, var(--steel) 12px 24px);
}
.hero-inner {
  width: min(1140px, 92%); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center; padding: 80px 0 72px;
}
.hero-h { font-size: 72px; line-height: 0.98; text-transform: uppercase; }
.hero-line { display: block; color: var(--white); }
.hero-line.l2 { color: var(--orange); }
/* slam-in */
.hero-line {
  transform: translateY(20px); opacity: 0;
  animation: slam 350ms cubic-bezier(.2,1.4,.4,1) forwards;
}
.hero-line.l1:nth-child(2) { animation-delay: 120ms; }
.hero-line.l2 { animation-delay: 240ms; }
@keyframes slam { to { transform: translateY(0); opacity: 1; } }

.hero-sub { font-size: 20px; max-width: 44ch; margin: 24px 0 32px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* hero visual: gradient placeholder photo + orange glow */
.hero-visual { position: relative; }
.hero-glow {
  position: absolute; inset: -12% -8%;
  background: radial-gradient(closest-side, rgba(255,90,0,0.28), transparent 70%);
  filter: blur(8px); pointer-events: none;
}
.hero-photo {
  position: relative; aspect-ratio: 4/5;
  background:
    radial-gradient(120% 90% at 80% 10%, #3a3a3a 0%, transparent 55%),
    repeating-linear-gradient(90deg, #232323 0 34px, #1c1c1c 34px 70px),
    linear-gradient(160deg, #2b2b2b, #151515);
  border: 1px solid var(--hairline);
  display: grid; place-items: center; overflow: hidden;
}
.hero-pipes { width: 65%; color: var(--orange); opacity: 0.5; }
.photo-label {
  position: absolute; bottom: 14px; left: 14px; right: 14px;
  font-family: 'Barlow', sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: 0.08em; color: var(--grey);
  background: rgba(13,13,13,0.75); border: 1px solid var(--hairline);
  padding: 6px 10px; text-align: center;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Archivo Black', sans-serif; font-size: 16px;
  text-decoration: none; cursor: pointer; position: relative; overflow: hidden;
  padding: 16px 26px; border: none;
  transition: background var(--motion), color var(--motion), transform var(--motion);
}
.btn-solid { background: var(--orange); color: #000; }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-big { font-size: 18px; padding: 18px 32px; }
/* hazard stripe slides across on hover + invert */
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, #000 0 10px, var(--orange) 10px 20px);
  transform: translateX(-101%); transition: transform 200ms ease;
}
.btn:hover::before { transform: translateX(0); }
.btn span, .btn svg { position: relative; z-index: 1; }
.btn-solid:hover { color: var(--orange); }
.btn-outline:hover { color: var(--orange); border-color: var(--orange); }
.btn:active { background: var(--orange-dim); }

/* ============ EMERGENCY MARQUEE ============ */
.emergency-bar { background: var(--orange); overflow: hidden; }
.marquee { overflow: hidden; }
.marquee-track {
  display: flex; width: max-content;
  animation: scroll-left 40s linear infinite;
}
.marquee-track span {
  font-family: 'Archivo Black', sans-serif;
  color: #000; font-size: 22px; padding: 14px 0; white-space: nowrap;
}
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ============ SERVICES ============ */
.cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  background: var(--panel); border: 1px solid var(--hairline);
  border-left: 4px solid var(--orange);
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: border-left-width var(--motion), transform var(--motion);
}
.card h3 { color: var(--white); font-size: 24px; }
.card p { font-size: 16px; }
.card:hover {
  border-left-width: 8px; transform: translateY(-4px);
}
.card:hover h3 { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 6px; }
.card-link {
  margin-top: auto; color: var(--orange); font-weight: 600;
  text-decoration: none; text-transform: uppercase; font-size: 14px; letter-spacing: 0.06em;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============ WHY US ============ */
.pipe-stage { margin: 0 0 48px; }
.pipe-svg { width: 100%; height: 120px; }
.pipe-base { stroke: var(--hairline); stroke-width: 10; fill: none; }
.pipe-lit {
  stroke: var(--orange); stroke-width: 10; fill: none;
  stroke-dasharray: 1; stroke-dashoffset: 1; /* normalized via JS pathLength */
  pathLength: 1;
}
.pipe-dot { fill: var(--white); opacity: 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { color: var(--orange); font-size: 56px; line-height: 1; }
.stat-cap {
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px;
}
.trust {
  list-style: none; display: flex; justify-content: center; gap: 40px;
  margin-top: 44px; flex-wrap: wrap;
}
.trust li {
  color: var(--white); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 15px;
  padding-left: 26px; position: relative;
}
.trust li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; background: var(--orange);
}

/* ============ REVIEWS ============ */
.cards-grid.three { grid-template-columns: repeat(3, 1fr); }
.quote { position: relative; padding-top: 44px; }
.qmark {
  position: absolute; top: 4px; left: 20px;
  font-family: 'Archivo Black', sans-serif; font-size: 72px; color: var(--orange); line-height: 1;
}
.quote p:first-of-type { color: var(--grey); font-size: 17px; margin-top: 8px; }
.qname { color: var(--white); font-weight: 600; margin-top: 16px !important; }
.tag {
  position: absolute; top: -14px; right: 16px;
  background: var(--orange); color: #000; font-size: 12px;
  padding: 6px 10px; letter-spacing: 0.08em;
}
.emergency-quote { border-color: var(--orange); }

/* ============ CONTACT ============ */
.contact { background: var(--panel); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start;
}
.big-phone {
  display: inline-block; color: var(--white); font-size: 64px;
  text-decoration: none; margin: 4px 0 20px; letter-spacing: 0.02em;
  transition: color var(--motion);
}
.big-phone:hover { color: var(--orange); }
.contact-meta { margin-bottom: 28px; }
.map-ph {
  aspect-ratio: 16/9; border: 1px solid var(--hairline);
  background:
    linear-gradient(rgba(255,90,0,0.06), rgba(255,90,0,0.02)),
    repeating-linear-gradient(0deg, #1e1e1e 0 30px, #191919 30px 60px),
    repeating-linear-gradient(90deg, #1e1e1e 0 30px, #191919 30px 60px);
  display: grid; place-items: center; position: relative;
}
.wa-card {
  background: var(--orange); color: #000; padding: 28px; margin-bottom: 24px;
}
.wa-copy { font-size: 19px; line-height: 1.4; margin-bottom: 18px; }
.wa-card .btn { background: #000; color: var(--orange); }
.wa-card .btn::before {
  background: repeating-linear-gradient(-45deg, var(--orange) 0 10px, #000 10px 20px);
}
.wa-card .btn:hover { color: #000; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label {
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 14px; color: var(--white); display: flex; flex-direction: column; gap: 8px;
}
.form input, .form select, .form textarea {
  background: var(--steel); border: 1px solid var(--hairline); color: var(--white);
  font-family: 'Barlow', sans-serif; font-size: 16px; padding: 12px 14px;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--orange); outline: none; }
.form .btn { align-self: flex-start; }
.form-note { color: var(--orange); font-weight: 600; min-height: 1.4em; }

/* ============ FOOTER / STICKY ============ */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 40px; text-align: center; font-size: 15px;
}
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { color: var(--orange); }
.fine { color: var(--grey); font-size: 13px; margin-top: 8px; }

.sticky-wa { display: none; }

/* ============ SCROLL REVEALS ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 350ms ease-out, transform 350ms ease-out; }
.reveal.in { opacity: 1; transform: none; }
/* stagger via transition-delay set inline by JS */

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-line { animation: none; transform: none; opacity: 1; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn::before { transition: none; }
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-h { font-size: 34px; }
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0; gap: 32px; }
  .hero-h { font-size: 44px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { justify-content: center; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--panel); border-bottom: 1px solid var(--hairline);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0;
  }
  .nav-links.open { display: flex; animation: slide-down 300ms ease-out; }
  @keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--hairline); }
  .nav-call { border: none; text-align: center; }

  .marquee-track span { font-size: 28px; }

  .cards-grid, .cards-grid.three { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .stat-num { font-size: 44px; }
  .trust { flex-direction: column; gap: 14px; align-items: flex-start; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .big-phone { font-size: 44px; }

  .form .btn { align-self: stretch; }

  .sticky-wa {
    display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    background: var(--orange);
  }
  .sticky-wa a {
    display: block; text-align: center; padding: 16px;
    font-family: 'Archivo Black', sans-serif; color: #000; text-decoration: none; font-size: 17px;
  }
  .footer { padding-bottom: 88px; }
}