/* Wayco Electrical. Layout: quiet white pages, one large statement per screen,
   the logo's wire sweep as the only graphic. Colours come from the logo. */
:root {
  --paper: #ffffff;
  --mist: #f6f4f2;
  --ink: #231f20;
  --ink-2: #5f5853;
  --rule: #e3dfdb;
  --copper: #cc8133;
  --copper-soft: #e89c5e;
  --brown: #7b6045;
  --wire-grey: #97999c;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --gutter-y: clamp(64px, 9vw, 120px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brown); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band { padding-block: var(--gutter-y); }
.band.mist { background: var(--mist); }

/* header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 32px; padding-block: 14px;
}
.brand img { height: 58px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav a.link {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.nav a.link:hover { border-bottom-color: var(--copper); }
.nav a.link[aria-current="page"] { border-bottom-color: var(--ink); }

/* buttons */
.btn {
  display: inline-block; background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 0.95rem; padding: 12px 22px; border-radius: var(--radius);
  border: 0; cursor: pointer; font-family: inherit; line-height: 1.2;
  transition: background .2s ease;
}
.btn:hover { background: var(--brown); color: #fff; }
.btn.small { padding: 9px 16px; }
.text-link { font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--copper); padding-bottom: 2px; }
.text-link:hover { color: var(--brown); }

/* type */
h1, h2, h3 { font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 36em; }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brown); margin-bottom: 16px;
}

/* hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 10vw, 132px); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 10.5em; }
.hero .lead { margin-top: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 40px; }
.wires {
  position: absolute; z-index: 0; right: -6%; top: 50%; transform: translateY(-50%);
  width: min(48%, 600px); height: auto; pointer-events: none; opacity: 0.9;
}
.hero.page { padding-block: clamp(48px, 7vw, 96px); }
.hero.page h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
.hero.page .wires { width: min(40%, 460px); opacity: 0.55; }

@media (max-width: 760px) {
  .wires { width: 120%; right: -30%; opacity: 0.22; }
  .hero.page .wires { width: 110%; opacity: 0.18; }
}

/* service grid */
.grid { display: grid; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.grid .cell { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.grid .cell p { color: var(--ink-2); margin-top: 10px; font-size: 1rem; }
.grid .cell h3 { max-width: 12em; }
@media (min-width: 561px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.two .cell { padding: 36px 48px 40px 0; } .grid.two .cell h3 { font-size: 1.6rem; max-width: none; } .grid.two .cell p { font-size: 1.1rem; max-width: 30em; } }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid .cell { padding-right: 20px; } }
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 40px; }
.section-head h2 { max-width: 16em; }

/* photo placeholders */
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { min-width: 0; }
.ph {
  aspect-ratio: 4 / 3; background: var(--mist); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--ink-2); font-size: 0.85rem;
  position: relative; overflow: hidden; border: 1px solid var(--rule);
}
.band.mist .ph { background: var(--paper); }
.ph svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.5; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph span { position: relative; background: var(--paper); padding: 4px 10px; border-radius: 99px; border: 1px solid var(--rule); }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles.four { grid-template-columns: minmax(0, 1fr); } }
.tile h3 { margin-top: 16px; font-size: 1.05rem; }
.tile p { color: var(--ink-2); font-size: 0.95rem; margin-top: 2px; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* split (about, services rows) */
.split { display: grid; gap: clamp(28px, 6vw, 88px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.split.flip > :first-child { order: 2; }
.split p + p { margin-top: 16px; }
.split .copy p { color: var(--ink-2); }
.split .copy h2, .split .copy h3 { margin-bottom: 16px; }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } .split.flip > :first-child { order: 0; } }
.list { list-style: none; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--rule); }
.list li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; color: var(--ink); }
.service-row + .service-row { margin-top: clamp(56px, 8vw, 104px); }

/* cta band */
.cta { text-align: left; }
.cta h2 { max-width: 14em; }
.cta p { margin-top: 16px; color: var(--ink-2); max-width: 34em; }
.cta .btn { margin-top: 28px; }

/* contact */
.contact-grid { display: grid; gap: clamp(32px, 6vw, 88px); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.details dt { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brown); margin-top: 28px; }
.details dt:first-child { margin-top: 0; }
.details dd { margin: 4px 0 0; font-size: 1.25rem; font-weight: 500; overflow-wrap: anywhere; }
.details a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--copper); }
form { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.9rem; font-weight: 600; }
label .opt { color: var(--ink-2); font-weight: 400; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid #c9c4bf; border-radius: var(--radius); padding: 12px 14px; width: 100%; min-width: 0;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--copper); outline-offset: 1px; border-color: var(--ink); }
input[type="file"] { padding: 10px; background: var(--mist); }
@media (max-width: 560px) { form { grid-template-columns: minmax(0, 1fr); } }
.notice { grid-column: 1 / -1; padding: 16px 18px; border-radius: var(--radius); background: var(--mist); border: 1px solid var(--rule); color: var(--ink); }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 48px; font-size: 0.95rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 28px 48px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
.site-footer strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 6px; }
.site-footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-footer a:hover { border-bottom-color: var(--copper); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr); } }

.prose { max-width: 40em; }
.prose h2 { font-size: 1.4rem; margin: 40px 0 10px; letter-spacing: -0.01em; }
.prose p { color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .wires path { stroke-dasharray: 1800; stroke-dashoffset: 1800; animation: draw 2.2s ease-out forwards; }
  .wires path:nth-child(2) { animation-delay: .12s; }
  .wires path:nth-child(3) { animation-delay: .24s; }
  .wires path:nth-child(4) { animation-delay: .36s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* one-page additions */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
section[id], .service-row[id] { scroll-margin-top: 24px; }
.svc-title { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.02em; }
.fine { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-2); max-width: 44em; }
#services .section-head { margin-bottom: 48px; }
