/* Cassady Electric Inc. */

:root {
  --blue: #0c71c3;
  --blue-dark: #0a5a9e;
  --navy: #06335f;
  --navy-deep: #041d38;
  --yellow: #ffd43b;
  --yellow-dark: #f5c000;
  --white: #fff;
  --text: rgba(255, 255, 255, 0.86);
  --muted: rgba(255, 255, 255, 0.8);
  --ink: #0b1f36;

  --font-body: "Roboto", system-ui, sans-serif;
  --font-heading: "Oswald", "Arial Narrow", system-ui, sans-serif;

  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(ellipse 55% 60% at 22% 38%, rgba(12, 113, 195, 0.75), transparent 70%),
    radial-gradient(ellipse 70% 50% at 85% 100%, rgba(12, 113, 195, 0.35), transparent 70%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}

/* The original site's woven-wire pattern, faded toward the edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  --line: rgba(146, 196, 245, 0.07);
  background-image:
    repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 11px, var(--line) 11px 12px, transparent 12px 32px),
    repeating-linear-gradient(45deg, var(--line) 0 1px, transparent 1px 11px, var(--line) 11px 12px, transparent 12px 32px);
  mask-image: radial-gradient(ellipse 90% 80% at 40% 40%, #000 25%, transparent 80%);
}

main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

h1, h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--white);
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 6px; }

::selection { background: var(--yellow); color: var(--ink); }

img { max-width: 100%; height: auto; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hero */

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.mascot {
  position: relative;
  display: flex;
  justify-content: center;
}
/* Warm glow behind the mascot, echoing his lit bulb */
.mascot::before {
  content: "";
  position: absolute;
  inset: 8% 0 4%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 212, 59, 0.28), rgba(255, 212, 59, 0.08) 45%, transparent 70%);
  filter: blur(10px);
}
.mascot img {
  width: min(100%, 340px);
  filter: drop-shadow(0 24px 30px rgba(2, 12, 26, 0.55));
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero h1 {
  font-size: clamp(3.25rem, 1.75rem + 6vw, 6.75rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.hero h1 span { display: block; color: var(--yellow); }

.hero h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.hero h2::before {
  content: "";
  flex: none;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--yellow);
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
/* Wherever three pills fit on a line, break after the third so the rows read 3 + 2
   (skipped from 768-899px, where the hero is two columns and only two fit).
   Row spacing comes from margins so the zero-height break adds no extra gap. */
@media (min-width: 560px) and (max-width: 767px), (min-width: 900px) {
  .services { row-gap: 0; margin-block: -0.3rem; }
  .services li { margin-block: 0.3rem; }
  .services li:nth-child(n+4) { order: 2; }
  .services::after { content: ""; flex-basis: 100%; order: 1; }
}
.services li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
}
.services li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.8);
}

.credentials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  align-self: stretch;
}
.credentials ul { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.credentials li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}
.credentials svg { width: 18px; height: 18px; color: var(--yellow); stroke-width: 3; }
.license {
  padding: 0.3rem 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* Contact */

.contact { padding-bottom: clamp(3rem, 7vw, 5rem); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  font-style: normal;
}

.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(2, 12, 26, 0.1), 0 20px 40px -20px rgba(2, 12, 26, 0.6);
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), background-color 200ms;
}
a.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 2px rgba(2, 12, 26, 0.1), 0 28px 50px -20px rgba(2, 12, 26, 0.75);
}
.contact-card--primary { background: var(--yellow); }
a.contact-card--primary:hover { background: var(--yellow-dark); }

.contact-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(12, 113, 195, 0.1);
  color: var(--blue);
}
.contact-card--primary .contact-icon { background: var(--ink); color: var(--yellow); }
.contact-icon svg { width: 24px; height: 24px; }

.contact-label {
  align-self: end;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.contact-value {
  align-self: start;
  font-size: 1.15rem;
  font-weight: 700;
  overflow-wrap: break-word;
}

/* Inner pages (privacy policy) */

.page-header { padding: 1.25rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}
.brand img { width: 34px; }
.brand:hover { color: var(--yellow); }

.prose {
  max-width: calc(46rem + var(--gutter) * 2);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.prose h1 { font-size: clamp(2.5rem, 2rem + 3vw, 4rem); }
.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.prose p, .prose ul { margin-bottom: 1rem; }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--yellow); }
.prose strong { color: var(--white); }
.prose a { color: var(--yellow); text-underline-offset: 0.2em; }
.prose a:hover { color: var(--white); }
.prose .updated { margin-top: 0.75rem; color: var(--muted); }

/* 404 */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
  text-align: center;
}
.not-found img { width: 160px; }
.not-found h1 { font-size: clamp(2.5rem, 2rem + 3vw, 4rem); }
.not-found a { color: var(--yellow); font-weight: 700; }

/* Footer */

.site-footer {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}
.site-footer a {
  color: var(--text);
  text-underline-offset: 0.2em;
  transition: color 200ms;
}
.site-footer a:hover { color: var(--yellow); }
.site-footer [aria-hidden] { margin: 0 0.85em; opacity: 0.5; }

@media (max-width: 399px) {
  /* Put the link on its own line instead of leaving the divider dangling */
  .site-footer [aria-hidden] { display: none; }
  .site-footer a { display: block; width: fit-content; margin: 0.35rem auto 0; }
}

/* Responsive */

@media (max-width: 1099px) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 699px) {
  .contact-grid { grid-template-columns: 1fr; max-width: 520px; }
  .contact-card { padding: 1rem 1.1rem; column-gap: 0.85rem; }
  .contact-icon { width: 44px; height: 44px; border-radius: 12px; }
  .contact-value { font-size: 1.05rem; }
}

@media (max-width: 767px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .mascot img { width: min(55%, 220px); }
  .hero-text { align-items: center; }
  .hero h2 { flex-direction: column; gap: 1rem; }
  .services, .credentials ul { justify-content: center; }
  .credentials { flex-direction: column; }
}

/* Motion (skipped when the visitor prefers reduced motion) */

@media (prefers-reduced-motion: no-preference) {
  .mascot img { animation: rise 900ms var(--ease) backwards; }
  .hero-text > *, .contact-card { animation: rise 800ms var(--ease) backwards; }
  .hero-text > :nth-child(2) { animation-delay: 80ms; }
  .hero-text > :nth-child(3) { animation-delay: 160ms; }
  .hero-text > :nth-child(4) { animation-delay: 240ms; }
  .contact-card:nth-child(1) { animation-delay: 300ms; }
  .contact-card:nth-child(2) { animation-delay: 380ms; }
  .contact-card:nth-child(3) { animation-delay: 460ms; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
}
