/* Electrician On Point Markham — site styles
   Editorial, airy, light. Cream page, near-white "paper" mats around every photograph (the framed-print
   device is the signature), forest green for type accents, buttons and one mid-page band, slate body text.
   Display type is a soft serif (Fraunces); everything else is a quiet grotesk (Hanken Grotesk). */
:root {
  --cream: #F5F2E9;
  --cream-2: #EDE8DA;
  --paper: #FBFAF6;
  --forest: #285743;
  --forest-deep: #1F4634;
  --forest-tint: #DCE8DF;
  --slate: #333D37;
  --slate-2: #5A655E;
  --on-forest: #F5F2E9;
  --on-forest-2: #CFE0D3;
  --line: rgba(40, 87, 67, 0.22);
  --line-strong: rgba(40, 87, 67, 0.45);
  --line-light: rgba(245, 242, 233, 0.28);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --wrap: 1200px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--slate);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--cream); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
strong { font-weight: 650; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.12; text-wrap: balance; letter-spacing: -0.01em; font-variation-settings: "opsz" 96, "SOFT" 40; }
h2 { font-size: clamp(30px, 3.2vw, 40px); }
h3 { font-size: clamp(22px, 2vw, 26px); }
h4 { font-size: 20px; }
.kicker { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; color: var(--forest); margin: 0 0 14px; font-variation-settings: "opsz" 48, "SOFT" 60; }
.lead { font-size: 20px; line-height: 1.5; max-width: var(--measure); }
.measure { max-width: var(--measure); }
.muted { color: var(--slate-2); }
.small { font-size: 15px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--forest); color: var(--on-forest); padding: 8px 12px; z-index: 100; border-radius: 999px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Wrappers */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 40px); row-gap: 32px; }
.grid > * { min-width: 0; }
.band { padding-block: clamp(64px, 8vw, 120px); }
.band-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-forest { background: var(--forest-deep); color: var(--on-forest); color-scheme: dark; }
.band-forest h2, .band-forest h3 { color: var(--on-forest); }
.band-forest p { color: var(--on-forest-2); }
.band-head { max-width: 60ch; margin-bottom: clamp(32px, 4vw, 56px); }
.band-head h2 { margin-bottom: 12px; }
.band-head p { margin: 0; font-size: 18px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--cream); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.005em; color: var(--forest); font-variation-settings: "opsz" 48, "SOFT" 40; }
.brand-area { font-size: 13px; color: var(--slate-2); letter-spacing: 0.04em; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--slate); text-decoration: none; padding: 10px 10px; font-size: 15px; font-weight: 500; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--forest); }
.nav a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--forest); }
.nav .nav-cta { margin-left: 10px; border-bottom: 0; }
.menu-btn { display: none; background: none; border: 1px solid var(--forest); color: var(--forest); padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 999px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 24px; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; border-radius: 999px; line-height: 1.2; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.btn-primary { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.btn-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.nav .btn-primary { color: var(--on-forest); padding: 10px 20px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--forest); background: var(--forest-tint); }
.band-forest .btn-ghost { color: var(--on-forest); border-color: var(--line-light); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Framed photographs */
.photo { margin: 0; }
.frame { background: var(--paper); padding: clamp(8px, 1vw, 14px); border: 1px solid var(--line-strong); }
.frame img { width: 100%; background: var(--cream-2); }
.r-43 img { aspect-ratio: 4 / 3; object-fit: cover; }
.r-34 img { aspect-ratio: 3 / 4; object-fit: cover; }
.r-45 img { aspect-ratio: 4 / 5; object-fit: cover; }
figcaption { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 15.5px; line-height: 1.5; padding-top: 12px; color: var(--slate-2); max-width: 56ch; font-variation-settings: "opsz" 14, "SOFT" 60; }
.status { display: inline-block; font-family: var(--sans); font-style: normal; font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; padding: 2px 10px; border-radius: 999px; background: var(--forest-tint); color: var(--forest); vertical-align: 2px; }

/* Hero (home) */
.hero { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(40px, 5vw, 72px); }
.hero h1 { font-size: clamp(40px, 6vw, 80px); line-height: 1.02; letter-spacing: -0.02em; max-width: 20ch; font-variation-settings: "opsz" 144, "SOFT" 50; }
.hero-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-top: clamp(24px, 3vw, 40px); }
.hero-sub { font-size: clamp(18px, 1.5vw, 21px); color: var(--slate-2); max-width: 40ch; margin: 0; }
.hero-media { margin-top: clamp(36px, 5vw, 64px); }
.hero-media .frame { padding: clamp(10px, 1.4vw, 18px); }
.hero-media figcaption { max-width: 70ch; }

/* Alternating features */
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 40px); row-gap: 28px; align-items: center; }
.feature > * { min-width: 0; }
.feature + .feature { margin-top: clamp(64px, 9vw, 128px); }
.feature-media { grid-column: 1 / span 5; }
.feature-copy { grid-column: 7 / span 6; }
.feature-flip .feature-media { grid-column: 8 / span 5; order: 2; }
.feature-flip .feature-copy { grid-column: 1 / span 6; }
.feature-copy h2 { margin-bottom: 18px; }
.feature-copy p { max-width: 54ch; }

/* Three categories */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.cats > * { min-width: 0; }
.cat { display: block; color: inherit; text-decoration: none; }
.cat .frame { transition: border-color 120ms ease; }
.cat:hover .frame { border-color: var(--forest); }
.cat h3 { margin: 20px 0 8px; }
.cat p { color: var(--slate-2); font-size: 16px; margin-bottom: 10px; }
.cat-link { color: var(--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 500; }
.cat:hover .cat-link { text-decoration-thickness: 2px; }

/* Photo narrative */
.story { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 40px); row-gap: clamp(40px, 5vw, 72px); }
.story > * { min-width: 0; }
.story-item h3 { margin: 18px 0 8px; }
.story-item p { margin: 0; max-width: 46ch; color: var(--slate-2); }
.s1 { grid-column: 1 / span 5; }
.s2 { grid-column: 8 / span 3; align-self: end; }
.s3 { grid-column: 3 / span 4; }
.s4 { grid-column: 8 / span 5; }
.story-small { max-width: 360px; }

/* Timeline (a real sequence) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.timeline li { counter-increment: step; position: relative; padding-top: 52px; min-width: 0; }
.timeline li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); color: var(--forest-deep); font-weight: 700; font-size: 15px; line-height: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.timeline li::after { content: ""; position: absolute; top: 17px; left: 44px; right: -40px; height: 1px; background: var(--line-light); }
.timeline li:last-child::after { display: none; }
.timeline h3 { margin-bottom: 8px; }
.timeline p { margin: 0; font-size: 16px; }

/* Local + FAQ */
.local { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.5vw, 40px); row-gap: 40px; margin-bottom: clamp(48px, 6vw, 88px); }
.local > * { min-width: 0; }
.local-copy { grid-column: 1 / span 5; }
.local-copy h2 { margin-bottom: 18px; }
.local-faq { grid-column: 7 / span 6; }
.local-faq h3 { margin-bottom: 10px; }
details { border-top: 1px solid var(--line); padding: 2px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; font-size: 17px; padding: 14px 36px 14px 0; position: relative; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--forest); font-weight: 400; }
details[open] summary::after { content: "\2013"; }
details p { max-width: 58ch; }
details > div { padding-bottom: 14px; }

/* Contact panel (cream) */
.contact-panel { background: var(--cream-2); border: 1px solid var(--line); padding: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 72px); }
.contact-panel h2 { margin-bottom: 14px; }
.cp-copy p { max-width: 52ch; }
.cp-copy .btn-row { margin: 8px 0 18px; }
.cp-side h3 { font-size: 18px; margin: 0 0 6px; }
.cp-side h3 + * { margin-bottom: 22px; }
.address { font-style: normal; line-height: 1.5; }
.phone-big { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; color: var(--slate); }
.phone-big:hover { color: var(--forest); }
.plain-list { list-style: none; margin: 12px 0 0; padding: 0; }

/* Page header for inner pages */
.page-head { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.page-head .grid { align-items: center; row-gap: 28px; }
.page-head .ph-copy { grid-column: 1 / span 7; display: flex; flex-direction: column; gap: 18px; padding-right: clamp(0px, 2vw, 32px); }
.page-head h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.08; letter-spacing: -0.015em; max-width: 18ch; font-variation-settings: "opsz" 144, "SOFT" 50; }
.page-head .ph-sub { color: var(--slate-2); font-size: 19px; max-width: 50ch; margin: 0; }
.page-head .ph-media { grid-column: 8 / span 5; }
.crumbs { font-size: 14px; color: var(--slate-2); margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--slate-2); text-decoration: none; }
.crumbs a:hover { color: var(--forest); text-decoration: underline; }

/* Content sections on inner pages */
.section { padding-block: clamp(44px, 6vw, 80px); border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section h2 { margin-bottom: 18px; }
.section h3 { margin: 28px 0 8px; }
.prose { max-width: var(--measure); }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 8px; }
.two-up { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.two-up.media-first { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.two-up > * { min-width: 0; }
.aside { background: var(--cream-2); padding: 24px 26px; font-size: 16px; }
.aside h4 { margin-bottom: 8px; }
.aside p:last-child { margin-bottom: 0; }
.aside ul { padding-left: 1.1em; margin: 0; }
.aside li { margin-bottom: 8px; }
.side-photo { margin-top: 32px; }
.jump { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 28px; }
.jump a { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 16px; color: var(--forest); text-decoration: none; font-size: 15px; font-weight: 500; }
.jump a:hover { background: var(--forest-tint); border-color: var(--forest); }
.areas { margin: 0; }
.areas dt { font-family: var(--serif); font-weight: 500; font-size: 21px; margin-top: 18px; }
.areas dd { margin: 4px 0 0; max-width: 58ch; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.gallery > * { min-width: 0; }
.cta-panel { background: var(--cream-2); border: 1px solid var(--line); padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 48px; align-items: center; }
.cta-panel h2 { margin-bottom: 10px; }
.cta-panel p { margin: 0; max-width: 52ch; color: var(--slate-2); }
.cta-panel-side { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta-panel-side p { margin: 0; }

/* Footer */
.site-footer { background: var(--forest-deep); color: var(--on-forest-2); color-scheme: dark; padding-block: 56px 40px; font-size: 15px; }
.site-footer .grid { row-gap: 32px; }
.foot-brand { grid-column: 1 / span 4; color: var(--on-forest); }
.foot-brand .brand-name { display: block; color: var(--on-forest); }
.foot-brand .brand-area { color: var(--on-forest-2); }
.foot-brand p { color: var(--on-forest-2); max-width: 32ch; margin-top: 12px; }
.foot-col { grid-column: span 2; }
.foot-col h4, .foot-contact h4 { color: var(--on-forest); font-family: var(--sans); font-size: 14px; font-weight: 600; margin-bottom: 12px; letter-spacing: 0.02em; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 8px; }
.foot-col a, .foot-contact a { color: var(--on-forest-2); text-decoration: none; }
.foot-col a:hover, .foot-contact a:hover { color: var(--on-forest); text-decoration: underline; }
.foot-contact { grid-column: span 4; }
.foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--line-light); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: var(--on-forest-2); }
.foot-legal a { color: var(--on-forest-2); }
.licence:empty { display: none; }

/* Sticky mobile action */
.sticky-cta { display: none; }

/* 404 */
.notfound { min-height: 50vh; display: grid; align-content: center; gap: 16px; }
.notfound .kicker { font-size: clamp(48px, 10vw, 96px); font-style: normal; font-weight: 300; line-height: 1; margin: 0; }
.notfound h1 { font-size: clamp(30px, 4vw, 48px); }

/* Breakpoints */
@media (max-width: 1000px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .nav .nav-cta { margin: 14px 0 0; border: 1px solid var(--forest); }
  .menu-btn { display: inline-block; }
  .site-header .wrap { position: relative; }
  .feature-media { grid-column: 1 / span 6; }
  .feature-copy { grid-column: 7 / span 6; }
  .feature-flip .feature-media { grid-column: 7 / span 6; }
  .feature-flip .feature-copy { grid-column: 1 / span 6; }
  .local-copy { grid-column: 1 / span 12; }
  .local-faq { grid-column: 1 / span 12; }
  .page-head .ph-copy { grid-column: 1 / span 12; padding-right: 0; }
  .page-head .ph-media { grid-column: 1 / span 8; }
  .foot-brand { grid-column: 1 / span 12; }
  .foot-col { grid-column: span 4; }
  .foot-contact { grid-column: span 12; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
  .hero-row { flex-direction: column; align-items: flex-start; }
  .cats { grid-template-columns: 1fr; gap: 40px; }
  .feature { align-items: start; }
  .feature-media, .feature-copy, .feature-flip .feature-media, .feature-flip .feature-copy { grid-column: 1 / span 12; }
  .feature-flip .feature-media { order: 0; }
  .s1, .s3, .s4 { grid-column: 1 / span 12; }
  .s2 { grid-column: 1 / span 7; align-self: start; }
  .contact-panel { grid-template-columns: 1fr; }
  .two-up, .two-up.media-first { grid-template-columns: 1fr; }
  .page-head .ph-media { grid-column: 1 / span 12; }
  .cta-panel { grid-template-columns: 1fr; }
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--cream); border-top: 1px solid var(--line); padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter); gap: 10px; }
  .sticky-cta .btn { flex: 1 1 0; }
  body { padding-bottom: 72px; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 32px; }
  .timeline li { padding-top: 0; padding-left: 52px; }
  .timeline li::before { top: 0; left: 0; }
  .timeline li::after { top: 42px; bottom: -32px; left: 17px; right: auto; width: 1px; height: auto; }
  .timeline li:nth-child(2)::after { display: block; }
  .s2 { grid-column: 1 / span 12; }
  .s2 .frame { max-width: 300px; }
  .story-small { max-width: 300px; }
  .hero-media figcaption { font-size: 14.5px; }
}

/* --- phone / text treatment (append to site.css; uses only inherited colours) --- */
[data-phone-slot]:not([hidden]) { display: block; }
[data-phone-slot]:not([hidden])::before { content: "Call or text"; display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; margin-bottom: 4px; }
.site-footer [data-phone-slot]::before, .site-header [data-phone-slot]::before { display: none; }
.phone-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Recent-work tiles: the newer library photos are small (about 375 px), so tiles stay at or under that width */
.r-11 img { aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-recent { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1120px; }
.photo-small { max-width: 360px; margin-top: 28px; }
@media (max-width: 1000px) { .gallery-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; } }
@media (max-width: 560px) { .gallery-recent { grid-template-columns: 1fr; max-width: 375px; } }
