/* ==========================================================================
   PREMIUM CLIENT TEMPLATE — layout & components.
   Uses tokens.css exclusively for colour/type decisions.
   Mobile-first: base styles = phone, min-width queries up.

   Progressive enhancement contract (same as the standard template):
   - Everything is VISIBLE and readable with no JS / no GSAP / reduced motion.
   - JS adds .is-gsap to <html> only when GSAP loaded AND motion allowed;
     scroll choreography styles hang off that class. Nothing is hidden in CSS.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-ink);
  font-family: var(--p-font-body);
  font-size: var(--p-fs-4);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--p-font-display);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
p { margin: 0 0 1rem; }
a { color: var(--p-ink); }
img { max-width: 100%; height: auto; display: block; }

.p-container { width: min(var(--p-maxw), 100% - 2 * var(--p-pad)); margin-inline: auto; }
.p-section { padding-block: var(--p-space-section); position: relative; }

.p-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--p-font-display);
  font-size: var(--p-fs-5);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--p-accent);
  margin-bottom: 1.2rem;
}
.p-kicker::before { content: ""; width: 2rem; height: 1px; background: var(--p-accent); }

.p-heading { font-size: var(--p-fs-1); font-weight: 700; max-width: 20ch; }
.p-lead { font-size: var(--p-fs-3); color: var(--p-ink-dim); max-width: 52ch; }

/* ----- Buttons ----- */
.p-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--p-font-display);
  font-weight: 700;
  font-size: var(--p-fs-4);
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  border: 1px solid var(--p-line);
  color: var(--p-ink);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.15s;
}
.p-btn:active { transform: scale(0.97); }
.p-btn--solid { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-ink); }
.p-btn--solid:hover { background: var(--p-accent-hi); }
.p-btn--ghost:hover { border-color: var(--p-accent); color: var(--p-accent); }

/* ----- Header ----- */
.p-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  backdrop-filter: blur(14px);
  background: linear-gradient(rgba(8, 9, 11, 0.88), rgba(8, 9, 11, 0.55));
  border-bottom: 1px solid var(--p-line);
}
.p-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}
.p-brand {
  font-family: var(--p-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--p-ink);
  line-height: 1.2;
}
.p-brand em { font-style: normal; color: var(--p-accent); }
.p-brand small {
  display: block;
  font-family: var(--p-font-body);
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--p-ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  margin-top: 0.15rem;
}
.p-nav { display: none; gap: 2rem; }
.p-nav a { text-decoration: none; color: var(--p-ink-dim); font-size: var(--p-fs-5); letter-spacing: 0.04em; }
.p-nav a:hover { color: var(--p-ink); }
/* The call button stays in the header at every width — on a trades site the
   phone number is the product. The nav links are what collapse on mobile. */
.p-header .p-btn { padding: 0.5rem 1.1rem; font-size: var(--p-fs-5); }
@media (min-width: 56rem) { .p-nav { display: flex; } }

/* ----- Hero ----- */
.p-hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.p-hero__bg {
  position: absolute;
  inset: -6% 0;
  z-index: -2;
  background-image:
    linear-gradient(100deg, var(--p-bg) 28%, rgba(8, 9, 11, 0.82) 58%, rgba(8, 9, 11, 0.6)),
    var(--p-hero-photo);
  background-size: cover, cover;
  background-position: center, center right;
}
.p-hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 40% at 74% 20%, rgba(245, 179, 1, 0.10), transparent 66%),
    radial-gradient(45% 38% at 10% 88%, rgba(245, 179, 1, 0.05), transparent 60%);
}
.p-hero__grid {
  position: absolute;
  inset: -2px;
  z-index: -1;
  background-image:
    linear-gradient(var(--p-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--p-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(72% 62% at 40% 40%, rgba(0,0,0,0.5), transparent 78%);
  -webkit-mask-image: radial-gradient(72% 62% at 40% 40%, rgba(0,0,0,0.5), transparent 78%);
}
.p-hero__inner { padding-block: 7.5rem 4rem; }
.p-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--p-font-display);
  font-size: var(--p-fs-5);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--p-ink-dim);
  margin-bottom: 1.5rem;
}
.p-hero__eyebrow b { color: var(--p-accent); font-weight: 500; }
/* Live "we're open" dot — the one animated flourish outside GSAP */
.p-dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--p-accent);
  box-shadow: 0 0 0 0 rgba(245, 179, 1, 0.6);
  animation: p-pulse 2.4s infinite;
}
@keyframes p-pulse {
  70% { box-shadow: 0 0 0 9px rgba(245, 179, 1, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 179, 1, 0); }
}
.p-hero__title {
  font-size: var(--p-fs-mega);
  font-weight: 700;
  max-width: 15ch;
  margin-bottom: 1.5rem;
}
/* Words pre-wrapped in .p-w spans for the GSAP line-mask reveal.
   Visible by default — the animation only ever animates FROM hidden. */
.p-hero__title .p-w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.p-hero__title .p-w > span { display: inline-block; }
.p-hero__title em { font-style: normal; color: var(--p-accent); }
.p-hero__sub { font-size: var(--p-fs-3); color: var(--p-ink-dim); max-width: 46ch; margin-bottom: 2rem; }
.p-hero__ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.2rem; }
.p-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--p-fs-5);
  color: var(--p-ink-dim);
}
.p-hero__trust li::before { content: "✓ "; color: var(--p-accent); font-weight: 700; }
.p-hero__scrollcue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  translate: -50% 0;
  font-size: var(--p-fs-5);
  color: var(--p-ink-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ----- Proof strip ----- */
.p-proof { border-block: 1px solid var(--p-line); padding-block: clamp(2.5rem, 6vw, 3.5rem); }
.p-proof__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem 1.5rem; }
@media (min-width: 56rem) { .p-proof__grid { grid-template-columns: repeat(4, 1fr); } }
.p-proof dt {
  font-family: var(--p-font-display);
  font-size: var(--p-fs-num);
  font-weight: 700;
  line-height: 1;
}
.p-proof dt sup { font-size: 0.45em; color: var(--p-accent); }
.p-proof dd {
  margin: 0.5rem 0 0;
  color: var(--p-ink-dim);
  font-size: var(--p-fs-5);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ----- Services rail (pinned horizontal scroll on wide screens) ----- */
.p-rail { overflow: hidden; }
.p-rail__head { margin-bottom: 2.5rem; }
.p-rail__viewport { overflow-x: auto; scrollbar-width: thin; padding-bottom: 1rem; }
/* The GSAP pin drives the rail on wide screens only — matches the JS matchMedia.
   Narrow screens keep native touch swiping, which is better on a phone anyway. */
@media (min-width: 896px) {
  .is-gsap .p-rail__viewport { overflow-x: visible; padding-bottom: 0; }
}
.p-rail__track { display: flex; gap: clamp(1rem, 2vw, 1.5rem); width: max-content; }

.p-svc {
  width: clamp(17rem, 30vw, 21rem);
  flex-shrink: 0;
  background: var(--p-bg-raise);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.75rem 1.6rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}
.p-svc:hover { border-color: color-mix(in srgb, var(--p-accent) 45%, transparent); transform: translateY(-4px); }
.p-svc__n {
  font-family: var(--p-font-display);
  font-size: var(--p-fs-5);
  letter-spacing: 0.15em;
  color: var(--p-accent);
  margin-bottom: 1.4rem;
}
.p-svc h3 { font-size: var(--p-fs-2); margin-bottom: 0.6rem; }
.p-svc p { color: var(--p-ink-dim); font-size: var(--p-fs-5); line-height: 1.6; margin: 0 0 1.25rem; }
.p-svc__tag {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-accent);
  border: 1px solid color-mix(in srgb, var(--p-accent) 40%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

/* ----- Work gallery ----- */
.p-work__grid { display: grid; gap: 0.75rem; margin-top: 2.5rem; }
@media (min-width: 40rem) { .p-work__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  .p-work__grid { grid-template-columns: repeat(3, 1fr); }
  /* First tile spans two columns — breaks the grid monotony */
  .p-work__grid figure:first-child { grid-column: span 2; grid-row: span 2; }
}
.p-work__grid figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--p-radius);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--p-line);
}
.p-work__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.p-work__grid figure:hover img { transform: scale(1.04); }
.p-work__grid figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.4rem 1rem 0.85rem;
  font-size: var(--p-fs-5);
  color: var(--p-ink);
  background: linear-gradient(transparent, rgba(8, 9, 11, 0.92));
}
.p-work__grid figcaption span { color: var(--p-accent); }

/* ----- Reviews ----- */
.p-reviews__grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 56rem) { .p-reviews__grid { grid-template-columns: repeat(3, 1fr); } }
.p-review {
  margin: 0;
  background: var(--p-bg-raise);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.75rem 1.6rem;
  display: flex;
  flex-direction: column;
}
.p-review__stars { color: var(--p-accent); letter-spacing: 0.15em; margin-bottom: 0.9rem; }
.p-review blockquote { margin: 0 0 1.25rem; flex: 1; font-size: var(--p-fs-4); line-height: 1.6; }
.p-review figcaption { font-size: var(--p-fs-5); color: var(--p-ink-dim); }
.p-review figcaption b { color: var(--p-ink); font-weight: 600; }

/* ----- Trust / coverage ----- */
.p-trust__grid { display: grid; gap: 3rem; margin-top: 2.5rem; }
@media (min-width: 60rem) { .p-trust__grid { grid-template-columns: 1.15fr 1fr; gap: 4rem; } }
.p-areas { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.p-areas li {
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: var(--p-fs-5);
  color: var(--p-ink-dim);
}
.p-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.p-badge {
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.4rem 1.1rem;
  background: var(--p-bg-raise);
  text-align: center;
}
.p-badge b {
  display: block;
  font-family: var(--p-font-display);
  font-size: 1.4rem;
  color: var(--p-accent);
  margin-bottom: 0.2rem;
}
.p-badge span { font-size: var(--p-fs-5); color: var(--p-ink-dim); }

/* ----- Contact ----- */
.p-contact__grid { display: grid; gap: 3rem; margin-top: 2.5rem; }
@media (min-width: 60rem) { .p-contact__grid { grid-template-columns: 1fr 1.1fr; } }
.p-contact__phone {
  display: inline-block;
  font-family: var(--p-font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--p-accent);
  text-decoration: none;
  margin-bottom: 0.8rem;
}
.p-form { display: grid; gap: 1.1rem; }
.p-form label { font-size: var(--p-fs-5); color: var(--p-ink-dim); display: block; margin-bottom: 0.35rem; }
.p-form input, .p-form textarea {
  width: 100%;
  font: inherit;
  color: var(--p-ink);
  background: var(--p-bg-raise);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius-sm);
  padding: 0.8rem 0.95rem;
}
.p-form input:focus, .p-form textarea:focus { outline: 2px solid var(--p-accent); outline-offset: 1px; }
.p-form .field--error input, .p-form .field--error textarea { border-color: var(--p-warn); }
.p-form .field__error { display: none; color: var(--p-warn); font-size: var(--p-fs-5); margin: 0.3rem 0 0; }
.p-form .field--error .field__error { display: block; }
.p-form-status { font-weight: 600; margin: 0; }
.p-form-status--ok { color: var(--p-accent); }
.p-form-status--err { color: var(--p-warn); }

/* ----- Footer ----- */
.p-footer { border-top: 1px solid var(--p-line); padding-block: 2.5rem; color: var(--p-ink-dim); font-size: var(--p-fs-5); }
.p-footer__inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.p-footer a { color: var(--p-ink-dim); }
.p-footer a:hover { color: var(--p-ink); }

/* ----- Floating click-to-call (non-negotiable on every build) ----- */
.p-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--p-accent);
  color: var(--p-accent-ink);
  font-family: var(--p-font-display);
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
}
.p-float:hover { background: var(--p-accent-hi); }

/* ----- Cookie banner ----- */
.p-cookie {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 95;
  max-width: 30rem;
  margin-inline: auto;
  background: var(--p-bg-raise);
  border: 1px solid var(--p-line);
  border-radius: var(--p-radius);
  padding: 1.25rem;
  font-size: var(--p-fs-5);
  color: var(--p-ink-dim);
}
.p-cookie[hidden] { display: none; }
.p-cookie__actions { display: flex; gap: 0.6rem; margin-top: 0.9rem; }
.p-cookie .p-btn { padding: 0.45rem 1rem; font-size: var(--p-fs-5); }

/* ----- Privacy page ----- */
.p-prose { max-width: 46rem; }
.p-prose h2 { font-size: var(--p-fs-2); margin-top: 2.4rem; }
.p-prose a { color: var(--p-accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
