/* Favourite Electricians of Woodbridge — site styles
   Mood: quiet luxury, photography first. Pale stone page, espresso for the hero, the gallery and the
   footer, champagne only for the wordmark, rules, focus and the primary action.
   Type: Cormorant Garamond (display, light weights) with Jost (body, captions, interface). */
:root {
  --espresso: #29231E;
  --espresso-2: #352E27;
  --espresso-3: #433A31;
  --champagne: #D7B77A;
  --champagne-2: #E3CB97;
  --champagne-text: #7E6128;   /* champagne for text on stone (AA) */
  --stone: #F7F2EC;
  --stone-2: #EDE5DA;
  --ink: #29231E;
  --ink-2: #5E554C;
  --linen: #C9BBA7;            /* muted text on espresso */
  --linen-2: #B8AC9C;
  --hair: rgba(41, 35, 30, 0.16);
  --hair-dark: rgba(215, 183, 122, 0.28);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --measure: 62ch;
  --wrap: 1320px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --gap: clamp(16px, 2.5vw, 40px);
  --header-h: 76px;
  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(--stone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -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(--espresso); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--champagne-text); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.1; text-wrap: balance; letter-spacing: 0; }
h2 { font-size: clamp(32px, 3.4vw, 48px); }
h3 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; }
h4 { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.3; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--champagne); color: var(--espresso); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Layout */
.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: var(--gap); row-gap: 32px; }
.grid > * { min-width: 0; }
.band { padding-block: clamp(64px, 9vw, 128px); }
.band-stone2 { background: var(--stone-2); }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--espresso); color: var(--stone); border-bottom: 1px solid var(--hair-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: inherit; line-height: 1; white-space: nowrap; }
.brand-name { font-family: var(--serif); font-size: 25px; font-weight: 500; color: var(--stone); }
.brand-area { font-family: var(--serif); font-style: italic; font-size: 20px; font-weight: 400; color: var(--champagne); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--linen); text-decoration: none; padding: 10px 12px; font-size: 15px; position: relative; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 1px; background: var(--champagne); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
.nav a:hover { color: var(--stone); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--stone); }
.nav .nav-cta { margin-left: 14px; padding: 11px 20px; color: var(--champagne); }
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { color: var(--stone); }
.menu-btn { display: none; background: none; border: 1px solid var(--champagne); color: var(--champagne); padding: 9px 16px; font: inherit; font-size: 14px; letter-spacing: 0.03em; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.03em; line-height: 1.2; text-decoration: none; border: 1px solid transparent; border-radius: 0; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn-primary { background: var(--champagne); color: var(--espresso); border-color: var(--champagne); }
.btn-primary:hover { background: var(--champagne-2); border-color: var(--champagne-2); color: var(--espresso); }
.btn-outline { background: transparent; color: var(--champagne); border-color: var(--champagne); }
.btn-outline:hover { background: rgba(215, 183, 122, 0.12); color: var(--stone); }
.section .btn-outline { color: var(--espresso); border-color: var(--espresso); }
.section .btn-outline:hover { background: transparent; color: var(--champagne-text); border-color: var(--champagne-text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.quiet-link { color: var(--stone); font-size: 15px; text-decoration: underline; text-decoration-color: var(--champagne); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.quiet-link:hover { color: var(--champagne); }

/* Figures */
figure { margin: 0; }
figure img { width: 100%; background: var(--espresso-3); }
figcaption { font-size: 14px; line-height: 1.55; padding-top: 10px; color: var(--ink-2); max-width: 58ch; }
figure.natural img { max-width: 406px; }   /* the one small original: never upscale it */
figure.natural figcaption { max-width: 406px; }
.status { display: inline-block; font-size: 12px; font-weight: 500; letter-spacing: 0.03em; padding: 2px 8px; border: 1px solid currentColor; color: var(--champagne-text); margin-right: 6px; vertical-align: 2px; line-height: 1.4; }
.address { font-style: normal; line-height: 1.5; margin: 0 0 1em; }
.phone-big { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); font-weight: 500; text-decoration: none; color: var(--ink); }
.phone-big:hover { color: var(--champagne-text); }
.plain-list { list-style: none; margin: 0 0 1em; padding: 0; }
.plain-list:empty { display: none; }

/* Hero: full-bleed dusk photo, type set bottom-left */
.hero { position: relative; background: var(--espresso); color: var(--stone); color-scheme: dark; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); max-height: 960px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(41, 35, 30, 0.95) 0%, rgba(41, 35, 30, 0.6) 28%, rgba(41, 35, 30, 0) 60%); }
.hero-copy { position: relative; width: 100%; padding-block: clamp(40px, 6vw, 80px); display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 92px); font-weight: 300; line-height: 1.02; max-width: 14ch; letter-spacing: -0.005em; }
.hero-sub { font-size: clamp(17px, 1.4vw, 20px); font-weight: 300; color: var(--linen); max-width: 44ch; margin: 0; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 10px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.12s; }
.hero-copy > :nth-child(3) { animation-delay: 0.24s; }

/* Opening: two-column editorial */
.opening .grid { align-items: start; }
.opening-head { grid-column: 1 / span 5; }
.opening-head h2 { font-size: clamp(34px, 3.8vw, 56px); font-weight: 300; max-width: 14ch; }
.opening-head h2::after { content: ""; display: block; width: 56px; height: 1px; background: var(--champagne-text); margin-top: 28px; }
.opening-body { grid-column: 7 / span 6; }
.opening-body p { font-size: 18px; max-width: 58ch; }
.links-row { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 4px; }

/* Gallery: one photo per screen on espresso, caption set to the photo's base line */
.gallery { background: var(--espresso); color: var(--stone); color-scheme: dark; }
.gallery a { color: var(--stone); }
.slide { min-height: 100vh; min-height: 100svh; max-width: var(--wrap); margin-inline: auto; padding: clamp(48px, 7vh, 96px) var(--gutter-r) clamp(48px, 7vh, 96px) var(--gutter); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-content: center; align-items: end; }
.slide > * { min-width: 0; }
.slide-media { grid-column: 1 / span 7; }
.slide-media img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); background: var(--espresso-2); }
.slide-small .slide-media img { max-height: 540px; }
.slide-copy { grid-column: 9 / span 4; padding-bottom: 6px; }
.slide-copy h3 { font-size: clamp(32px, 3.2vw, 46px); font-weight: 300; margin-bottom: 14px; }
.slide-copy p { color: var(--linen); font-size: 16px; line-height: 1.6; max-width: 36ch; margin: 0; }
.slide-copy .status { color: var(--champagne); }

/* Services: three curated rows */
.service { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 24px; align-items: center; padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--hair); }
.service > * { min-width: 0; }
.service:first-child { border-top: 0; padding-top: 0; }
.service:last-child { padding-bottom: 0; }
.service-media { grid-column: 1 / span 4; }
.service-media img { aspect-ratio: 4 / 5; object-fit: cover; }
.service-copy { grid-column: 6 / span 6; }
.service-copy h2 { margin-bottom: 16px; }
.service-copy p { max-width: 54ch; }
.service-copy p:last-child { margin-bottom: 0; }

/* Before the walls close */
.story { border-top: 1px solid var(--hair); }
.story-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 20px; margin-bottom: clamp(36px, 4vw, 56px); }
.story-head > * { min-width: 0; }
.story-head h2 { grid-column: 1 / span 5; font-size: clamp(34px, 3.8vw, 56px); font-weight: 300; }
.story-head p { grid-column: 7 / span 6; font-size: 18px; max-width: 58ch; margin: 0; }
.story-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px var(--gap); align-items: start; }
.story-grid img { aspect-ratio: 4 / 5; object-fit: cover; }
.inline-cta { margin: 36px 0 0; }

/* Contact + FAQs */
.contact-faq .grid { align-items: start; }
.contact-col { grid-column: 1 / span 5; }
.faq-col { grid-column: 7 / span 6; }
.contact-col h2, .faq-title { margin-bottom: 16px; }
.contact-col p { max-width: 48ch; }
details { border-top: 1px solid var(--hair); }
details:last-of-type { border-bottom: 1px solid var(--hair); }
summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.25; padding: 18px 44px 18px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 8px; top: 50%; font-family: var(--sans); font-weight: 300; font-size: 28px; line-height: 1; color: var(--champagne-text); transform: translateY(-50%); transition: transform 0.25s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details > div { padding-bottom: 16px; }
details p { max-width: 58ch; margin: 0 0 0.8em; }
details p:last-child { margin-bottom: 0; }

/* Inner page opening */
.page-head { position: relative; background: var(--espresso); color: var(--stone); color-scheme: dark; display: flex; align-items: flex-end; padding-top: clamp(32px, 5vw, 64px); }
.page-head.has-media { min-height: min(64vh, 660px); overflow: hidden; }
.page-head a { color: var(--stone); }
.ph-media { position: absolute; inset: 0; }
.ph-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.ph-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(41, 35, 30, 0.96) 0%, rgba(41, 35, 30, 0.62) 34%, rgba(41, 35, 30, 0.08) 70%); }
.ph-copy { position: relative; width: 100%; padding-block: clamp(36px, 5vw, 64px); display: flex; flex-direction: column; gap: 14px; }
.page-head h1 { font-size: clamp(38px, 4.8vw, 68px); font-weight: 300; line-height: 1.04; max-width: 18ch; }
.ph-sub { color: var(--linen); font-size: 18px; font-weight: 300; max-width: 58ch; margin: 0; }
.ph-note { font-size: 13px; color: var(--linen-2); margin: 0; }
.crumbs { font-size: 14px; color: var(--linen-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(--linen-2); }
.crumbs a { color: var(--linen); text-decoration: none; }
.crumbs a:hover { color: var(--champagne); }

/* Inner page content */
.section { padding-block: clamp(48px, 6vw, 96px); border-top: 1px solid var(--hair); }
.section:first-child { border-top: 0; }
.section h2 { margin-bottom: 18px; }
.section h3 { margin: 32px 0 10px; }
.prose { max-width: var(--measure); }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 8px; }
.prose p:last-child { margin-bottom: 0; }
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row dense; column-gap: var(--gap); row-gap: 32px; align-items: start; }
.feature > * { min-width: 0; }
.feature-copy { grid-column: 1 / span 6; }
.feature-media { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 36px; }
.feature.flip .feature-copy { grid-column: 7 / span 6; }
.feature.flip .feature-media { grid-column: 1 / span 5; }
.feature.pair .feature-copy:nth-child(1) { grid-column: 1 / span 5; }
.feature.pair .feature-copy:nth-child(2) { grid-column: 7 / span 6; }
.aside { border-left: 1px solid var(--champagne-text); padding: 4px 0 4px 20px; font-size: 16px; }
.aside h4 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin-bottom: 8px; }
.aside p:last-child { margin-bottom: 0; }
.group-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 12px; margin-bottom: clamp(28px, 3vw, 44px); }
.group-head > * { min-width: 0; }
.group-head h2 { grid-column: 1 / span 5; margin: 0; }
.group-head p { grid-column: 7 / span 6; margin: 0; max-width: 56ch; color: var(--ink-2); font-size: 18px; }
.masonry { columns: 3; column-gap: var(--gap); }
.masonry figure { break-inside: avoid; margin-bottom: 36px; }
.faq h2 { margin-bottom: 20px; }
.callout { background: var(--espresso); color: var(--stone); color-scheme: dark; padding: clamp(28px, 3.5vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.callout h3 { font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); margin: 0; }
.callout p { margin: 8px 0 0; color: var(--linen); max-width: 52ch; }

/* Footer */
.site-footer { background: var(--espresso); color: var(--linen); color-scheme: dark; border-top: 1px solid var(--hair-dark); padding-block: 64px 36px; font-size: 15px; }
.site-footer .grid { row-gap: 32px; }
.site-footer a { color: var(--linen); text-decoration: none; }
.site-footer a:hover { color: var(--champagne); }
.foot-brand { grid-column: 1 / span 4; }
.foot-brand .brand-name, .foot-brand .brand-area { display: block; line-height: 1.15; }
.foot-brand p { max-width: 32ch; margin: 14px 0 0; }
.foot-col { grid-column: span 2; }
.foot-col h4, .foot-contact h4 { font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--stone); margin-bottom: 10px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 6px; }
.foot-contact { grid-column: span 4; }
.foot-contact p { margin-bottom: 0.6em; }
.foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--hair-dark); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: var(--linen-2); }
.foot-legal a { color: var(--linen-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 h1 { font-size: clamp(80px, 16vw, 160px); font-weight: 300; line-height: 0.9; color: var(--champagne-text); }
.notfound p { max-width: 50ch; }

/* Breakpoints */
@media (max-width: 1080px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--espresso-2); border-bottom: 1px solid var(--hair-dark); padding: 8px var(--gutter-r) 16px var(--gutter); gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid rgba(247, 242, 236, 0.08); font-size: 18px; white-space: normal; }
  .nav a::after { display: none; }
  .nav .nav-cta { margin: 14px 0 0; padding: 13px 20px; border-bottom: 1px solid var(--champagne); justify-content: center; }
  .menu-btn { display: inline-block; }
  .site-header .wrap { position: relative; }
  .opening-head { grid-column: 1 / span 12; }
  .opening-body { grid-column: 1 / span 12; }
  .slide-media { grid-column: 1 / span 7; }
  .slide-copy { grid-column: 8 / span 5; }
  .story-head h2, .story-head p, .group-head h2, .group-head p { grid-column: 1 / span 12; }
  .contact-col { grid-column: 1 / span 12; }
  .faq-col { grid-column: 1 / span 12; }
  .feature-copy, .feature.flip .feature-copy { grid-column: 1 / span 7; }
  .feature-media, .feature.flip .feature-media { grid-column: 8 / span 5; }
  .feature.pair .feature-copy:nth-child(1) { grid-column: 1 / span 6; }
  .feature.pair .feature-copy:nth-child(2) { grid-column: 7 / span 6; }
  .masonry { columns: 2; }
  .foot-brand { grid-column: 1 / span 12; }
  .foot-col { grid-column: span 3; }
  .foot-contact { grid-column: span 6; }
}
@media (max-width: 860px) {
  .hero { display: block; min-height: 0; max-height: none; }
  .hero-media { position: relative; aspect-ratio: 4 / 3; }
  .hero-media::after { background: linear-gradient(to top, var(--espresso) 0%, rgba(41, 35, 30, 0) 30%); }
  .hero-copy { padding-block: 8px 44px; }
  .hero h1 { max-width: none; }
  .slide { grid-template-columns: 1fr; min-height: 0; row-gap: 20px; padding-block: 40px; align-items: start; }
  .slide-media, .slide-copy { grid-column: 1; }
  .slide-media img { max-height: none; width: 100%; }
  .slide-small .slide-media img { max-height: none; }
  .service { grid-template-columns: 1fr; }
  .service-media, .service-copy { grid-column: 1; }
  .service-media img { aspect-ratio: 5 / 4; }
  .story-grid { grid-template-columns: 1fr; }
  .feature-copy, .feature.flip .feature-copy, .feature-media, .feature.flip .feature-media,
  .feature.pair .feature-copy:nth-child(1), .feature.pair .feature-copy:nth-child(2) { grid-column: 1 / span 12; }
  .callout { grid-template-columns: 1fr; }
  .foot-col { grid-column: span 6; }
  .foot-contact { grid-column: span 12; }
  .sticky-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--espresso); border-top: 1px solid var(--hair-dark); padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter); gap: 10px; }
  .sticky-cta .btn { flex: 1 1 0; padding-inline: 12px; white-space: nowrap; }
  body { padding-bottom: 72px; }
}
@media (max-width: 600px) {
  .site-header .wrap { gap: 12px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
  .brand-name { font-size: 21px; }
  .brand-area { font-size: 16px; }
  .menu-btn { flex-shrink: 0; }
  .masonry { columns: 1; }
  .page-head.has-media { min-height: 0; }
  .page-head.has-media .ph-copy { padding-top: 44vw; }
  .ph-media::after { background: linear-gradient(to top, rgba(41, 35, 30, 0.97) 0%, rgba(41, 35, 30, 0.8) 40%, rgba(41, 35, 30, 0.3) 72%, rgba(41, 35, 30, 0.05) 100%); }
  summary { font-size: 20px; }
  .foot-col { grid-column: span 12; }
}
/* --- 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; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { color: var(--champagne); border-color: var(--champagne); }
.section .btn-ghost:hover, .band .btn-ghost:hover { color: var(--champagne-text); border-color: var(--champagne-text); }
.sticky-cta .btn-ghost { color: var(--stone); border-color: var(--champagne); flex: 1 1 0; }
/* More recent work grid: tiles never wider than the small originals */
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 32px var(--gap); align-items: start; }
.recent-grid figure { max-width: 400px; }
