/*
Theme Name: Clean Finish
Theme URI: https://cleanfinishelectrical.com
Author: netMethods
Author URI: https://netmethods.com
Description: Marketing site for Clean Finish Electrical, Lake Forest CA. No plugins, no JavaScript, self-hosted fonts.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.1
License: Proprietary
Text Domain: clean-finish
*/

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("fonts/Fraunces.woff2") format("woff2"); }
@font-face { font-family: "Inter";    font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/Inter.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --cream: #F6F1E8; --charcoal: #1F1D1A; --copper: #B5602E; --copper-dark: #8F4A22; --copper-deep: #6F3718;
  --warm-white: #F2EDE4; --brass: #C8A96A; --sand: #E4DCCE; --ink-soft: #5B5650; --ink-mute: #8A847B;
  --sand-light: #E7DCCB; --sand-deep: #CBB9A0; --charcoal-deep: #15140F; --paper: #FFFFFF;
  --charcoal-line: #2A2926; --charcoal-raise: #26231F; --form-border: #3A3631; --error: #F2B8A0;
  --warm-mute: #B8B2A8;
  --bg: var(--cream); --fg: var(--charcoal); --accent: var(--copper);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 62ch; --radius: 10px; --gutter: clamp(16px, 4vw, 48px);
  --step--1: 0.9rem; --step-0: 1rem; --step-1: 1.25rem; --step-2: 1.6rem; --step-3: 2.1rem; --step-4: clamp(2.4rem, 5vw, 3.6rem);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); line-height: 1.55; text-wrap: pretty; }
/* overflow-wrap: anywhere, not break-word: only "anywhere" feeds the break opportunity
   into the min-content size, which is what a grid item measures itself by. Without it a
   single long word in a display heading ("dispatcher.") sets a floor wider than a 320px
   phone once text is zoomed to 200%, and the whole page scrolls sideways. It never
   breaks a word that fits on a line of its own, so nothing changes at normal sizes. */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; overflow-wrap: anywhere; }
h1 { font-size: var(--step-4); } h2 { font-size: var(--step-3); } h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1em; max-width: var(--measure); }
/* Hover goes darker, not lighter: --copper is 3.99:1 on cream, below the 4.5:1 that body-copy links need. */
a { color: var(--copper-dark); } a:hover { color: var(--copper-deep); }
img { max-width: 100%; height: auto; display: block; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* Skip links: off-screen until focused, then a real, visible control at the top-left of the
   viewport. Cream on charcoal with a brass ring, so they read against whatever is behind them. */
.cfe-skip { position: absolute; left: -9999px; top: 0; z-index: 100; }
.cfe-skip:focus { left: 0; display: inline-block; margin: .5rem; padding: .75rem 1rem; min-height: 44px; background: var(--charcoal); color: var(--cream); border-radius: 8px; font-weight: 600; text-decoration: underline; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
/* Copper is 3.75:1 on charcoal -- over the 3:1 bar but thin. Brass is 7.5:1 on every dark
   ground the site uses, so the dark runs get the brass ring instead. */
.cfe-header :focus-visible, .cfe-hero :focus-visible, .cfe-section--dark :focus-visible,
.cfe-footer :focus-visible, .cfe-sticky :focus-visible, .cfe-card-page__legal :focus-visible { outline-color: var(--brass); }
.cfe-wrap { width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }
.cfe-btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .75rem 1.25rem; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1.5px solid transparent; }
/* copper-dark, not --accent: white on --copper is 4.49:1, a hair under the 4.5:1 a button label needs. */
.cfe-btn--primary { background: var(--copper-dark); color: var(--paper); } .cfe-btn--primary:hover { background: var(--copper-deep); color: var(--paper); }
.cfe-btn--ghost { border-color: var(--fg); color: var(--fg); } .cfe-btn--ghost:hover { background: var(--fg); color: var(--cream); }
.cfe-eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-dark); font-weight: 600; }

/* ---------- Brand lockup ---------- */
.cfe-brand { display: inline-flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; --brand-accent: var(--brass); }
.cfe-brand .cfe-logo { flex: none; }
.cfe-wordmark { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.cfe-wordmark__name { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; }
.cfe-wordmark__rule { display: flex; align-items: center; align-self: stretch; gap: .3rem; margin-top: .3rem; color: var(--brand-accent); }
.cfe-wordmark__rule i { flex: 1; height: 2px; background: currentColor; border-radius: 1px; }
.cfe-wordmark__rule .cfe-bolt { height: 14px; width: auto; }
.cfe-wordmark__trade { font-family: var(--sans); font-weight: 600; font-size: .5rem; letter-spacing: .3em; text-transform: uppercase; margin-top: .25rem; padding-left: .3em; }
/* Unused on the site by design: this is the light/print inversion of the lockup that brand.md specifies for the print lockups. */
.cfe-brand--light { --brand-accent: var(--copper); color: var(--charcoal); }

/* ---------- Header (dark) ---------- */
.cfe-header { position: sticky; top: 0; z-index: 10; background: var(--charcoal); color: var(--warm-white); border-bottom: 0; backdrop-filter: none; }
/* wrap, so that at 200% text zoom the phone number drops to its own line instead of
   pushing the page into a sideways scroll. */
.cfe-header__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 64px; padding-block: .5rem; gap: 1rem; }
.cfe-header__phone { display: inline-flex; align-items: center; gap: .5rem; color: var(--warm-white); text-decoration: none; font-weight: 600; }
.cfe-header__phone:hover { color: var(--brass); }
.cfe-header__phone span { white-space: nowrap; }
/* Under 600px the full wordmark stays (plate, name, rule with the bolt, ELECTRICAL),
   scaled so the phone number still fits whole at 360px and 320px. Jason 2026-09-15:
   the phone reduction to name-only was not wanted; the lockup reads better complete. */
@media (max-width: 600px) {
  .cfe-brand { gap: .5rem; }
  .cfe-brand .cfe-logo { width: 34px; height: 34px; }
  .cfe-wordmark__name { font-size: 1rem; }
  .cfe-wordmark__rule { margin-top: .2rem; gap: .2rem; }
  .cfe-wordmark__rule .cfe-bolt { height: 10px; }
  .cfe-wordmark__trade { font-size: .38rem; margin-top: .18rem; }
}
@media (max-width: 400px) {
  .cfe-header__row { gap: .5rem; }
  .cfe-brand .cfe-logo { width: 30px; height: 30px; }
  .cfe-wordmark__name { font-size: .9rem; }
  .cfe-wordmark__trade { font-size: .35rem; }
}

/* ---------- Hero (dark, T1) ---------- */
.cfe-hero { padding-block: clamp(2.5rem, 8vw, 6rem) clamp(2rem, 6vw, 4rem); background: var(--charcoal); color: var(--warm-white); --fg: var(--warm-white); --accent: var(--brass); }
.cfe-hero .cfe-eyebrow { color: var(--brass); }
.cfe-hero .cfe-btn--primary { background: var(--brass); color: var(--charcoal); }
.cfe-hero .cfe-btn--primary:hover { background: var(--warm-white); color: var(--charcoal); }
.cfe-hero .cfe-btn--ghost { border-color: var(--warm-white); color: var(--warm-white); }
.cfe-hero .cfe-btn--ghost:hover { background: var(--warm-white); color: var(--charcoal); }
.cfe-hero__grid { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .cfe-hero__grid { grid-template-columns: 1.25fr 1fr; gap: 3rem; } }
@media (max-width: 819px) { .cfe-hero__media { max-width: 480px; } }
.cfe-hero__sub, .cfe-hero__proof { color: var(--warm-mute); }
.cfe-hero__sub { font-size: var(--step-1); max-width: 44ch; }
.cfe-hero__proof { display: flex; align-items: center; gap: .5rem; font-size: var(--step--1); }
.cfe-hero__proof .cfe-icon { color: var(--brass); }
.cfe-hero__portrait, .cfe-hero__placeholder { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.cfe-hero__portrait { background: linear-gradient(160deg, var(--sand-light), var(--sand-deep)); }
.cfe-hero__placeholder { background: linear-gradient(160deg, var(--charcoal-raise), var(--charcoal-line)); }
@media (min-width: 820px) and (max-height: 760px) { .cfe-hero__portrait, .cfe-hero__placeholder { max-height: 70vh; aspect-ratio: auto; height: 70vh; object-fit: cover; } }
.cfe-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem; }
.cfe-cta__note { flex-basis: 100%; margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.cfe-hero .cfe-cta__note, .cfe-section--dark .cfe-cta__note { color: var(--warm-mute); }

/* ---------- Sections ---------- */
.cfe-section { padding-block: clamp(3rem, 8vw, 6rem); }
section[id], #main, #quote-result { scroll-margin-top: 72px; }   /* clears the 64px sticky header for the skip links, #quote and the post-submit panel */
#main:focus { outline: none; }                                   /* the skip link's landing target is not a control */
.cfe-section--alt { background: var(--paper); border-block: 1px solid var(--sand); }
.cfe-section--dark { background: var(--charcoal); color: var(--warm-white); --fg: var(--warm-white); --accent: var(--brass); }
.cfe-section--dark a { color: var(--brass); }
.cfe-section--dark .cfe-eyebrow { color: var(--brass); }
.cfe-section--dark .cfe-btn--primary { background: var(--brass); color: var(--charcoal); }
.cfe-section--dark .cfe-btn--ghost { border-color: var(--warm-white); color: var(--warm-white); }

/* ---------- Proof points ---------- */
.cfe-proof { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cfe-proof li { border-top: 2px solid var(--accent); padding-top: 1rem; }
.cfe-proof h3 { font-size: var(--step-1); }
.cfe-proof q { display: block; font-family: var(--serif); font-style: italic; color: var(--ink-soft); }

/* ---------- Services ---------- */
.cfe-services { list-style: none; margin: 2rem 0 1rem; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cfe-service { display: block; height: 100%; padding: 1.25rem; border: 1px solid var(--sand); border-radius: var(--radius); background: var(--cream); color: var(--fg); text-decoration: none; transition: border-color .15s, transform .15s; }
.cfe-service:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--fg); }
.cfe-service .cfe-icon { color: var(--accent); width: 28px; height: 28px; margin-bottom: .75rem; }
.cfe-service h3 { margin-bottom: .25rem; }
.cfe-service p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
.cfe-services__more { color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- Work grid ---------- */
.cfe-work { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cfe-work figure { margin: 0; }
.cfe-work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); filter: sepia(.08) saturate(.95); }
.cfe-work figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: .5rem; }

/* ---------- Reviews ---------- */
.cfe-reviews { columns: 1; column-gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 700px) { .cfe-reviews { columns: 2; } }
@media (min-width: 1100px) { .cfe-reviews { columns: 3; } }
.cfe-review { break-inside: avoid; margin: 0 0 1.5rem; padding: 1.25rem; border: 1px solid var(--sand); border-radius: var(--radius); background: var(--cream); }
.cfe-review blockquote { margin: 0; font-family: var(--serif); font-size: var(--step-0); }
.cfe-review blockquote p:last-child { margin-bottom: .75rem; }
.cfe-review figcaption { font-size: var(--step--1); color: var(--ink-soft); font-weight: 600; }
.cfe-reviews__links { color: var(--ink-soft); }

/* ---------- Area + FAQ ---------- */
.cfe-area { max-width: 70ch; }
.cfe-faq { margin-top: 1rem; max-width: var(--measure); border-top: 1px solid var(--sand); }
.cfe-faq details { border-bottom: 1px solid var(--sand); padding: .25rem 0; }
.cfe-faq summary { cursor: pointer; padding: .75rem 0; font-weight: 600; font-family: var(--serif); font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.cfe-faq summary::-webkit-details-marker { display: none; }
.cfe-faq summary::after { content: "+"; color: var(--accent); }
.cfe-faq details[open] summary::after { content: "–"; }
.cfe-faq details > div { padding-bottom: 1rem; color: var(--ink-soft); }

/* ---------- Quote section ---------- */
/* min-width: 0 on the columns: a grid item's automatic minimum size is its min-content
   width, and the file input inside the form has a fixed intrinsic width the browser will
   not shrink. At 200% text zoom that floor plus the panel's padding is wider than a 320px
   phone, and the whole page scrolls sideways. */
.cfe-quote__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.cfe-quote__grid > * { min-width: 0; }
@media (min-width: 900px) { .cfe-quote__grid { grid-template-columns: 1fr 1.1fr; gap: 3rem; } }

/* ---------- Footer + sticky bar ---------- */
.cfe-footer { background: var(--charcoal-deep); color: var(--warm-white); padding-block: 3rem 5rem; font-size: var(--step--1); }
.cfe-footer a { color: var(--brass); }
.cfe-footer .cfe-brand { margin-bottom: .75rem; }
.cfe-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* inline-block + padding so each footer link is a target of at least 24px in both
   directions, with the 1rem gutter keeping them apart. */
.cfe-footer__links a { display: inline-block; margin-right: 1rem; padding-block: .2rem; min-height: 24px; }
/* The bar's own spacing is in px, not rem: at 200% text zoom rem-sized padding and gaps
   grew faster than the labels and pushed the two buttons past a 320px viewport. The
   labels themselves still scale; only the space around them is pinned. */
.cfe-sticky { position: fixed; inset: auto 0 0 0; display: none; gap: 8px; padding: .75rem 12px; background: color-mix(in srgb, var(--charcoal) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--charcoal-line); z-index: 20; }
.cfe-sticky .cfe-btn { flex: 1; justify-content: center; gap: 6px; padding-inline: 10px; }
.cfe-sticky .cfe-btn--primary { background: var(--brass); color: var(--charcoal); }
.cfe-sticky .cfe-btn--ghost { border-color: var(--warm-white); color: var(--warm-white); }
/* The reserve under the sticky bar is in rem, not px: at 200% text zoom the bar's own
   labels grow with the root font size, and a fixed 76px reserve would let it cover the
   last line of the footer. It lives on the footer, not the body: the body is cream, so
   a body reserve painted a cream band between the footer and the bar. */
@media (max-width: 820px) { .cfe-sticky { display: flex; } body { padding-bottom: 0; } .cfe-footer { padding-bottom: 7rem; } }
.cfe-prose { max-width: var(--measure); }

/* ---------- Quote form ---------- */
.cfe-form { background: var(--charcoal-raise); border: 1px solid var(--form-border); border-radius: var(--radius); padding: 1.5rem; }
.cfe-form label { display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 1rem; }
.cfe-form input:not([type=file]), .cfe-form textarea { display: block; width: 100%; margin-top: .35rem; padding: .7rem .8rem; font: inherit; color: var(--charcoal); background: var(--warm-white); border: 1px solid transparent; border-radius: 6px; }
.cfe-form input:focus, .cfe-form textarea:focus { outline: 3px solid var(--brass); outline-offset: 1px; }
.cfe-form__row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; } @media (min-width: 560px) { .cfe-form__row { grid-template-columns: 1fr 1fr; } }
.cfe-form__file input { margin-top: .35rem; color: var(--warm-white); max-width: 100%; }
.cfe-form__hp { position: absolute; left: -9999px; }
.cfe-form__ok { font-size: var(--step-1); } .cfe-form__err { color: var(--error); }
.cfe-form__err strong { display: block; }   /* the error is named in words, not carried by the colour */
.cfe-form__hint { font-size: var(--step--1); color: var(--warm-mute); }
.cfe-form__req { font-weight: 400; color: var(--warm-mute); }
.cfe-form__legend { font-size: var(--step--1); color: var(--warm-mute); margin: 0 0 1rem; }

/* ---------- Service pages ---------- */
.cfe-hero--service { padding-block: clamp(2rem, 6vw, 4rem); border-bottom: 0; }
/* Underlined, and the same colour as the rest of the eyebrow: a link set apart from its
   neighbours by colour alone is the 1.4.1 failure this used to be. */
.cfe-hero--service .cfe-eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cfe-service-page__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cfe-service-page__grid { grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; } }
.cfe-service-page__aside .cfe-work { grid-template-columns: 1fr; margin-top: 0; margin-bottom: 1.5rem; }
.cfe-prices { padding: 1rem 1.25rem; border-left: 3px solid var(--accent); background: var(--paper); margin-bottom: .5rem; }
.cfe-prices p:last-child { margin-bottom: 0; }
.cfe-prices__note { font-size: var(--step--1); color: var(--ink-soft); }
.cfe-prose h2 { font-size: var(--step-2); margin-top: 1.5rem; }

/* ---------- Business-card landing page (/card/) ---------- */
/* Full-bleed so the fine print closes the dark run rather than cutting a cream
   band between the quote section and the footer. margin-block, not margin: the
   shorthand would reset .cfe-wrap's own margin-inline: auto and slam the line
   against the left edge. */
.cfe-card-page__legal { background: var(--charcoal); color: var(--warm-mute); font-size: var(--step--1); padding-block: 0 3rem; }
.cfe-card-page__legal p { max-width: none; margin-block: 0; }

/* ---------- Accessibility statement (/accessibility/) ---------- */
.cfe-a11y__updated { font-size: var(--step--1); color: var(--ink-soft); }
/* The email address is one long unbreakable string; at 200% text zoom on a 320px phone
   it runs off the side unless it is allowed to break mid-word. */
.cfe-a11y a { overflow-wrap: anywhere; }
.cfe-a11y h2 { font-size: var(--step-2); margin-top: 2rem; }
.cfe-a11y h2:first-of-type { margin-top: 0; }
.cfe-a11y ul { max-width: var(--measure); padding-left: 1.25rem; }
.cfe-a11y li { margin-bottom: .5rem; }

/* ---------- Reduced motion ---------- */
/* Everything that moves on this site is decorative: the smooth-scroll to #quote, the
   1px lift on a service card, and the colour fade on its border. Under a reduced-motion
   preference all three are off; nothing is lost but the movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cfe-service:hover { transform: none; }
}
