/*
Theme Name: WCP Signal
Theme URI: https://wcprotech.com/
Author: West Coast Protech
Description: Lead-generation theme for West Coast Protech. Two lanes: remote help anywhere in the US (cobalt) and on-site installs in Santa Barbara County (acid lime). Includes a built-in lead form, a Leads inbox in wp-admin, LocalBusiness + FAQ schema, and phone/email settings in the Customizer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: wcp-signal
*/

:root {
  --midnight: #05060b;
  --surface: #0b0f1e;
  --surface-2: #11172b;
  --line: #1d2542;
  --cobalt: #2f5bff;
  --cobalt-text: #7d96ff;
  --lime: #c8ff2e;
  --text: #eef1f8;
  --muted: #9ba4be;
  --danger: #ff6b6b;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::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(--midnight);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
::selection { background: var(--cobalt); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto; clip: auto; padding: 10px 14px; background: var(--lime); color: var(--midnight); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; font-variation-settings: "wdth" 125; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.4vw, 5.2rem); line-height: .98; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.25rem; line-height: 1.2; font-variation-settings: "wdth" 112; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40em; }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75em 1.35em;
  border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-variation-settings: "wdth" 110; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-lime { background: var(--lime); color: var(--midnight); }
.btn-lime:hover { background: #dcff7a; color: var(--midnight); }
.btn-cobalt { background: var(--cobalt); color: #fff; }
.btn-cobalt:hover { background: #4a70ff; color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

/* ---------- Header ---------- */
.statusline { border-bottom: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.statusline a { color: var(--text); text-decoration: none; font-weight: 600; }
.statusline a:hover { color: var(--lime); }
@media (max-width: 640px) { .statusline { display: none; } }
.statusline .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; padding-top: .5rem; padding-bottom: .5rem; }
.statusline span { display: inline-flex; align-items: center; gap: .5em; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-cobalt { background: var(--cobalt); box-shadow: 0 0 0 3px rgba(47,91,255,.25); }
.dot-lime { background: var(--lime); box-shadow: 0 0 0 3px rgba(200,255,46,.2); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5,6,11,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { max-height: 44px; width: auto; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1; font-variation-settings: "wdth" 125; letter-spacing: -.01em; }
.brand-name small { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); margin-top: .3em; font-variation-settings: "wdth" 100; letter-spacing: 0; }

.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.primary-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; padding: .5em 0; border-bottom: 2px solid transparent; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { border-bottom-color: var(--lime); }
.primary-nav .sub-menu { display: none; }
.header-actions { display: flex; gap: .6rem; align-items: center; }
.header-actions .btn { min-height: 42px; padding: .55em 1em; font-size: .95rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); width: 44px; height: 44px; cursor: pointer; }
.nav-toggle svg { margin: auto; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .header-actions .btn-ghost { display: none; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--midnight); border-bottom: 1px solid var(--line); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .primary-nav a { display: block; padding: .8em 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .header-actions .btn-lime { display: none; }
  .brand-name small { display: none; }
}

/* ---------- Hero: the two lanes ---------- */
.hero { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.hero::before { /* faint wiring grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .35;
  mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 0%, #000 0%, transparent 70%);
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 17ch; font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
.hero .lede { margin-bottom: 2.25rem; }

.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lane { padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--surface); display: flex; flex-direction: column; position: relative; }
.lane + .lane { border-left: 1px solid var(--line); }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.lane-remote::before { background: var(--cobalt); }
.lane-onsite::before { background: var(--lime); }
.lane-where { display: flex; align-items: center; gap: .55em; font-size: .95rem; color: var(--muted); margin-bottom: .9rem; }
.lane h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .6rem; }
.lane > p { color: var(--muted); }
.lane ul { list-style: none; margin: .5rem 0 1.75rem; padding: 0; display: grid; gap: .55rem; }
.lane li { display: flex; gap: .7em; align-items: baseline; }
.lane li::before { content: ""; width: 10px; height: 2px; flex: none; transform: translateY(-.3em); }
.lane-remote li::before { background: var(--cobalt); }
.lane-onsite li::before { background: var(--lime); }
.lane .btn { margin-top: auto; align-self: flex-start; }
.lane-note { font-size: .9rem; color: var(--muted); margin: .9rem 0 0; }

.proof { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; margin-top: 2rem; color: var(--muted); font-size: .95rem; }
.proof strong { color: var(--text); font-weight: 700; }

@media (max-width: 820px) {
  .lanes { grid-template-columns: 1fr; }
  .lane + .lane { border-left: 0; border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; border-top: 1px solid var(--line); }
.section-tinted { background: var(--surface); }

.svc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 3rem; margin: 0; padding: 0; list-style: none; }
.svc-list li { padding: 1.4rem 0 1.4rem 1.25rem; border-top: 1px solid var(--line); position: relative; }
.svc-list li::before { content: ""; position: absolute; left: 0; top: 1.65rem; width: 3px; height: 1.2rem; }
.svc-remote li::before { background: var(--cobalt); }
.svc-onsite li::before { background: var(--lime); }
.svc-list h3 { margin-bottom: .35rem; }
.svc-list h3 a { color: var(--text); text-decoration: none; }
.svc-list h3 a:hover { text-decoration: underline; text-decoration-color: var(--lime); }
.svc-list p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .svc-list { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.25rem 1fr; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--cobalt-text); font-variation-settings: "wdth" 125; }
.steps-lime li::before { color: var(--lime); }
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--muted); }

.towns { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.towns a, .towns span { display: inline-block; padding: .45em .9em; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: .95rem; }
.towns a:hover { border-color: var(--lime); }
.towns .town-remote { border-color: rgba(47,91,255,.6); color: var(--cobalt-text); }

.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.quotes blockquote { margin: 0; padding-left: 1.25rem; border-left: 3px solid var(--lime); }
.quotes p { font-size: 1.15rem; }
.quotes cite { font-style: normal; color: var(--muted); font-size: .95rem; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 2.5rem 1.2rem 0; font-weight: 700; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--lime); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); max-width: 44em; padding-bottom: 1.2rem; margin: 0; }

/* ---------- Lead form ---------- */
.lead { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 900px) { .lead { grid-template-columns: 1fr; } }
.contact-lines { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.contact-lines a { color: var(--text); font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.contact-lines a:hover { color: var(--lime); }
.contact-lines span { display: block; color: var(--muted); font-size: .9rem; }

.lead-form { --accent: var(--cobalt); background: var(--surface-2); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); transition: border-color .2s; }
.lead-form[data-mode="onsite"] { --accent: var(--lime); }
.mode-switch { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.mode-switch legend { padding: 0; margin-bottom: .6rem; font-weight: 700; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.mode-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mode-switch label { text-align: center; padding: .7em .5em; border-radius: 3px; cursor: pointer; font-weight: 700; color: var(--muted); line-height: 1.25; }
.mode-switch label small { display: block; font-weight: 400; font-size: .8rem; }
.mode-switch input:checked + label { background: var(--accent); color: var(--midnight); }
#mode-remote:checked + label { color: #fff; }
.mode-switch input:focus-visible + label { outline: 2px solid var(--lime); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7em .85em;
  background: var(--midnight); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 1rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(125,150,255,.2); }
.lead-form[data-mode="onsite"] .field :is(input,select,textarea):focus { box-shadow: 0 0 0 3px rgba(200,255,46,.18); }
.onsite-only { display: none; }
.lead-form[data-mode="remote"] .row-when { grid-template-columns: 1fr; }
.lead-form[data-mode="onsite"] .onsite-only { display: block; }
.lead-form .btn { width: 100%; margin-top: .5rem; background: var(--accent); color: var(--midnight); }
.lead-form[data-mode="remote"] .btn { color: #fff; }
.form-fine { color: var(--muted); font-size: .85rem; margin: .9rem 0 0; }
.hp { position: absolute !important; left: -9999px; }

.notice { padding: 1rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.5rem; border: 1px solid; }
.notice-ok { border-color: var(--lime); background: rgba(200,255,46,.08); }
.notice-err { border-color: var(--danger); background: rgba(255,107,107,.08); }
.notice strong { display: block; }

/* ---------- Page templates ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 18ch; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

.entry { max-width: 46rem; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.entry h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 2rem; }
.entry h3 { margin-top: 1.75rem; }
.entry ul, .entry ol { padding-left: 1.25rem; }
.entry li { margin-bottom: .4em; }
.entry li::marker { color: var(--lime); }
.entry img { border-radius: var(--radius); }
.entry blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 3px solid var(--cobalt); color: var(--muted); }
.entry table { width: 100%; border-collapse: collapse; }
.entry th, .entry td { border-bottom: 1px solid var(--line); padding: .6em; text-align: left; }
.entry .wp-block-button__link { background: var(--lime); color: var(--midnight); border-radius: var(--radius); font-weight: 700; }
.alignwide { max-width: var(--wrap); }

.cta-band { border-top: 1px solid var(--line); background: var(--surface); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.cta-band h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0; max-width: 22ch; }
.cta-band .btns { display: flex; flex-wrap: wrap; gap: .75rem; }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.posts h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.posts h2 a { color: var(--text); text-decoration: none; }
.pagination { padding: 2rem 0; display: flex; gap: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 6rem; color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: var(--text); font-size: 1rem; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }
@media (max-width: 760px) {
  .action-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--midnight); border-top: 1px solid var(--line); padding: 8px; gap: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .action-bar .btn { min-height: 46px; padding: .5em; font-size: .95rem; }
}
