/* ============================================================
   WILKINS PLUMBING — Design tokens
   Concept: dependable steel-blue trade brand + warm copper CTA
   ============================================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f3f6f7;
  --color-surface: #ffffff;
  --color-surface-2: #eef2f4;
  --color-surface-offset: #e7edef;
  --color-surface-offset-2: #dde5e8;
  --color-divider: #d8e0e3;
  --color-border: #cad5d9;

  /* Text */
  --color-text: #101f28;
  --color-text-muted: #52646f;
  --color-text-faint: #93a3ab;
  --color-text-inverse: #f3f6f7;

  /* Primary accent — Steel Blue (trust, water) */
  --color-primary: #0d3b53;
  --color-primary-hover: #0a2c3e;
  --color-primary-active: #071f2c;
  --color-primary-highlight: #cddce3;

  /* Action accent — Copper (call to action, warmth) */
  --color-accent: #bd5f13;
  --color-accent-hover: #9c4d0d;
  --color-accent-active: #7a3c09;
  --color-accent-highlight: #f0dcc4;

  /* Gold — star ratings */
  --color-gold: #c8912a;
  --color-gold-highlight: #f1e2c4;

  /* Success / Error (system) */
  --color-success: #3f7a3a;
  --color-error: #a1352c;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.15 0.02 220 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.15 0.02 220 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.15 0.02 220 / 0.16);

  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1220px;
  --content-full: 100%;

  --font-display: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0a1620;
  --color-surface: #101f2a;
  --color-surface-2: #142631;
  --color-surface-offset: #17303c;
  --color-surface-offset-2: #1c3a47;
  --color-divider: #1d3540;
  --color-border: #294452;

  --color-text: #dce7ea;
  --color-text-muted: #93a9b2;
  --color-text-faint: #5d7883;
  --color-text-inverse: #0a1620;

  --color-primary: #6ea9bd;
  --color-primary-hover: #8fc0d1;
  --color-primary-active: #a9d0de;
  --color-primary-highlight: #1c3843;

  --color-accent: #e8893f;
  --color-accent-hover: #f0a15f;
  --color-accent-active: #f5b47c;
  --color-accent-highlight: #3a2818;

  --color-gold: #e0ac47;
  --color-gold-highlight: #3a2f18;

  --color-success: #6fae63;
  --color-error: #d16a5e;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.5);
}

/* Type scale */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.1rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.5vw, 3.25rem);
  --text-hero: clamp(2.6rem, 1.4rem + 4.5vw, 4.6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

body {
  background-image:
    radial-gradient(ellipse 800px 500px at 100% -10%, oklch(from var(--color-primary) l c h / 0.08), transparent),
    radial-gradient(ellipse 700px 500px at -10% 20%, oklch(from var(--color-accent) l c h / 0.05), transparent);
  background-attachment: fixed;
}

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-12));
}

section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin-top: var(--space-3);
  max-width: 20ch;
}

.section-lede {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  max-width: 58ch;
  margin-top: var(--space-4);
}

.section-head {
  margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.95em 1.6em;
  border-radius: var(--radius-full);
  white-space: nowrap;
  min-height: 48px;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-primary:active {
  transform: translateY(0);
  background: var(--color-accent-active);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-2);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
  flex-shrink: 0;
}
.btn-icon:hover {
  color: var(--color-text);
  border-color: var(--color-primary);
}
.btn-icon svg {
  width: 19px;
  height: 19px;
}

/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header--hidden {
  transform: translateY(-100%);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
}
.brand-mark {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}
.brand-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-links {
  display: flex;
  gap: var(--space-6);
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.nav-links a:hover {
  color: var(--color-text);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nav-toggle {
  display: none;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .header-actions .btn-primary span.long {
    display: none;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-24)) clamp(var(--space-12), 8vw, var(--space-20));
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.05;
}
.hero h1 em {
  font-style: normal;
  color: var(--color-primary);
}
[data-theme='dark'] .hero h1 em {
  color: var(--color-primary);
}

.hero-lede {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.trust-item svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.trust-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.trust-item-value {
  font-weight: 700;
  font-size: var(--text-sm);
  font-family: var(--font-display);
}
.trust-item-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-gold);
}
.stars svg {
  width: 14px;
  height: 14px;
}

/* Hero visual panel */
.hero-panel {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--color-primary), var(--color-primary-active));
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-divider);
}
.hero-panel svg.blueprint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
.hero-panel-card {
  position: absolute;
  left: var(--space-6);
  right: var(--space-6);
  bottom: var(--space-6);
  background: oklch(from var(--color-surface) l c h / 0.94);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-md);
}
.hero-panel-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.hero-panel-card-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ============================================================
   Services
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-icon svg {
  width: 24px;
  height: 24px;
}
.service-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
.service-card p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ============================================================
   Service area
   ============================================================ */
.area-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
}
@media (max-width: 900px) {
  .area-layout {
    grid-template-columns: 1fr;
  }
}

.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.chip {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.55em 1.1em;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}
.chip.chip-home {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.area-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.area-visual svg {
  width: 82%;
  height: 82%;
}

/* ============================================================
   About
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
}
@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-layout.reverse .about-visual {
    order: -1;
  }
}

.about-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
}
.about-visual svg {
  width: 100%;
  height: 100%;
}

.about-copy p {
  color: var(--color-text-muted);
  margin-top: var(--space-5);
  max-width: 56ch;
}
.about-copy p + p {
  margin-top: var(--space-4);
}

.about-list {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.about-list-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.about-list-item svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.about-list-item strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  display: block;
}
.about-list-item span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   Reviews
   ============================================================ */
.reviews-bar {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}
.reviews-score {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
}
.reviews-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.reviews-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 900px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
}
.review-quote {
  color: var(--color-text);
  font-size: var(--text-base);
}
.review-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  flex-shrink: 0;
}
.review-author-name {
  font-size: var(--text-sm);
  font-weight: 600;
}
.review-author-source {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  background: linear-gradient(150deg, var(--color-primary), var(--color-primary-active));
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 7vw, var(--space-16));
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 {
  color: #fff;
  font-size: var(--text-2xl);
  font-weight: 600;
  max-width: 24ch;
  margin-inline: auto;
}
.cta-band p {
  color: oklch(from #fff l c h / 0.82);
  margin-top: var(--space-4);
  font-size: var(--text-base);
}
.cta-band-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
.cta-band .btn-ghost {
  border-color: oklch(from #fff l c h / 0.3);
  color: #fff;
}
.cta-band .btn-ghost:hover {
  background: oklch(from #fff l c h / 0.1);
  border-color: #fff;
}
.cta-phone {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: clamp(var(--space-10), 6vw, var(--space-16));
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-10);
  flex-wrap: wrap;
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-divider);
}
.footer-brand {
  max-width: 320px;
}
.footer-brand .brand {
  margin-bottom: var(--space-4);
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.footer-cols {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.footer-col a,
.footer-col span {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.footer-col a:hover {
  color: var(--color-text);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  clip-path: inset(12% 0 0 0);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    clip-path 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    clip-path: none;
  }
}
