/* ========================================================================
   Patterson Electrical — Base
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@400;500;600;700;800&family=Inter+Tight:wght@300;400;500;600;700&display=swap');

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.65;
  font-weight: 400;
  font-feature-settings: 'kern', 'liga', 'calt';
  overflow-x: hidden;
}

/* ---------- Reset ---------- */
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--d-base) var(--ease-out);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ---------- Type styles ---------- */
.serif { font-family: var(--serif); }
.sans  { font-family: var(--sans); }

.h-hero {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--t-hero);
  line-height: 1.04;
  letter-spacing: var(--track-tight);
  margin: 0;
}

.h-1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--t-h1);
  line-height: 1.08;
  letter-spacing: var(--track-tight);
}

.h-2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.h-3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--t-h3);
  line-height: 1.2;
}

.h-display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--t-display);
  line-height: 1;
  letter-spacing: -0.025em;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--t-eyebrow);
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--stone);
  display: inline-block;
}

.eyebrow--dark { color: var(--graphite); }
.eyebrow--light { color: var(--owner-text); }

.tagline {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-tag);
  letter-spacing: 0.01em;
  text-transform: none;
}

/* Inline em accents in titles — no italic, just light-weight differential */
h1 em, h2 em, h3 em, .enquire__title em, .hero-page__title em {
  font-style: normal;
  font-weight: 500;
  color: inherit;
}

.body-lg {
  font-size: var(--t-body-lg);
  line-height: 1.6;
  color: var(--slate);
}

.caption {
  font-size: var(--t-caption);
  letter-spacing: 0.02em;
  color: var(--stone);
  line-height: 1.5;
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.container--md { max-width: var(--container-md); }
.container--sm { max-width: var(--container-sm); }

.section {
  padding-block: clamp(4rem, 9vw, 9rem);
}
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--loose { padding-block: clamp(6rem, 12vw, 12rem); }

/* ---------- Bolt divider (logo motif) ---------- */
.bolt-divider {
  display: flex;
  justify-content: center;
  margin-block: var(--s-7);
}
.bolt-divider svg {
  width: 14px;
  height: 24px;
  color: var(--hairline);
}
.bolt-divider--dark svg { color: rgba(255,255,255,0.25); }

/* ---------- Hairline separator ---------- */
.hairline {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

/* ---------- Links ---------- */
.link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--d-base) var(--ease-out), color var(--d-base) var(--ease-out);
}
.link-underline:hover {
  color: var(--cyan-jewel);
}

/* Tracked-caps text-link CTA — the Aman pattern */
.link-cta {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--t-button);
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  color: var(--graphite);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  position: relative;
  padding-bottom: 6px;
  transition: color var(--d-base) var(--ease-out);
}
.link-cta::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right center;
  transform: scaleX(1);
  transition: transform var(--d-base) var(--ease-out), background var(--d-base) var(--ease-out);
}
.link-cta:hover {
  color: var(--cyan-jewel);
}
.link-cta:hover::after {
  transform-origin: left center;
  transform: scaleX(1);
  background: var(--cyan-jewel);
}
.link-cta .arrow {
  display: inline-block;
  transition: transform var(--d-base) var(--ease-out);
}
.link-cta:hover .arrow { transform: translateX(4px); }

.link-cta--light { color: var(--owner-text); }
.link-cta--light:hover { color: var(--cyan-jewel); }

/* Ghost button — for primary CTAs only (rare) */
.btn-ghost {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--t-button);
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  color: var(--graphite);
  background: transparent;
  border: 1px solid var(--graphite);
  padding: 0.95em 1.6em;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  transition: background var(--d-base) var(--ease-out), color var(--d-base) var(--ease-out), border-color var(--d-base) var(--ease-out);
  text-decoration: none;
}
.btn-ghost:hover {
  background: var(--graphite);
  color: var(--paper);
}
.btn-ghost--light {
  color: var(--owner-text);
  border-color: var(--owner-text);
}
.btn-ghost--light:hover {
  background: var(--owner-text);
  color: var(--owner-dark);
}

/* ---------- Reveal (fade-up once) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Selection ---------- */
::selection { background: var(--owner-dark); color: var(--paper); }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--cyan-jewel);
  outline-offset: 3px;
}

/* ---------- Image cover helpers ---------- */
.cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Hairline frame on photography (Lürssen pattern) */
.framed-photo {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ivory);
}
.framed-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0,0,0,0.06);
  pointer-events: none;
}
