/*
Theme Name: HG Mobile Welding
Theme URI: https://hgmobilewelding.com
Author: HG Welding LLC
Description: Custom industrial theme for HG Mobile Welding LLC — Ponca City, OK.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: hg-welding
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --charcoal:     #16181b;
  --charcoal-2:   #1c1f23;   /* raised panel on dark */
  --steel:        #3d434a;
  --steel-light:  #6b7278;
  --bone:         #f2efe7;
  --bone-dim:     #cbc9c2;
  --spark:        #d11313;   /* logo red — fills, buttons, weld seam */
  --spark-bright: #f4453c;   /* lifted red — small text/labels on dark (AA) */
  --spark-deep:   #a30f0f;   /* hover / pressed */
  --arc:          #cfeaff;

  --maxw: 1180px;
  --gap: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;

  --ff-head: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --ff-body: 'Work Sans', system-ui, sans-serif;
  --ff-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--bone);
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--spark-bright); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--bone); }

:focus-visible {
  outline: 2px solid var(--arc);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--ff-head);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: .01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--ff-mono);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 500;
  color: var(--spark-bright);
  margin: 0 0 1rem;
  display: block;
}
.eyebrow--cool { color: var(--arc); }
.lead { font-size: 1.2rem; color: var(--bone-dim); max-width: 60ch; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--light { background: var(--bone); color: var(--charcoal); }
.section--light .lead { color: var(--steel); }
.section--panel { background: var(--charcoal-2); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.center { text-align: center; margin-inline: auto; }

/* ============================================================
   WELD SEAM DIVIDER
   ============================================================ */
.weld-seam {
  width: 100%;
  height: 28px;
  border: 0;
  margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28' viewBox='0 0 24 28'%3E%3Cline x1='0' y1='18' x2='24' y2='18' stroke='%233d434a' stroke-width='1'/%3E%3Cpath d='M0 18 Q12 6 24 18' fill='none' stroke='%236b7278' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M0 18 Q12 6 24 18' fill='none' stroke='%23d11313' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M0 18 Q12 8 24 18' fill='none' stroke='%23f2efe7' stroke-width='1' opacity='0.45'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 24px 28px;
}
.section--light + .weld-seam,
.weld-seam + .section--light { background-color: var(--bone); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--ff-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  padding: .95rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-spark { background: var(--spark); color: var(--bone); }
.btn-spark, a.btn-spark { color: var(--bone) !important; text-decoration: none !important; }
.btn-spark:hover { background: var(--spark-deep); color: var(--bone); }
.btn-outline { border-color: var(--steel-light); color: var(--bone); }
.btn-outline:hover { border-color: var(--spark-bright); color: var(--spark-bright); }
.section--light .btn-outline { border-color: var(--steel); color: var(--charcoal); }
.section--light .btn-outline:hover { border-color: var(--spark); color: var(--spark-deep); }
.btn-lg { padding: 1.1rem 2rem; font-size: .88rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 24, 27, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: .7rem;
}
.site-branding .custom-logo,
.site-branding img { max-height: 68px; width: auto; }
.site-title-text {
  font-family: var(--ff-head); text-transform: uppercase; font-weight: 900;
  font-size: 1.6rem; color: var(--bone); line-height: 1;
}
.site-title-text span { color: var(--spark-bright); }

.primary-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.primary-nav a {
  font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .1em;
  font-size: .78rem; font-weight: 500; color: var(--bone-dim); padding-block: .4rem;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--spark-bright); }

.header-actions { display: flex; align-items: center; gap: .8rem; }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--bone); margin: 5px 0; transition: .2s; }

@media (max-width: 900px) {
  .nav-toggle { display: block; order: 3; }
  .header-actions { order: 2; margin-left: auto; } /* pushes call+toggle together to the right */
  .header-inner { gap: .5rem; }              /* tighten so logo | call | toggle group nicely */
  .primary-nav {
    position: absolute; inset: 100% 0 auto 0;
    background: var(--charcoal-2); border-bottom: 1px solid var(--steel);
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
    z-index: 40;
  }
  .primary-nav.is-open { max-height: 80vh; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .primary-nav li { border-bottom: 1px solid var(--steel); }
  .primary-nav a { display: block; padding: .9rem 0; font-size: .9rem; }

  /* Call button becomes a clean, properly-sized icon button on mobile */
  .header-actions .btn span.btn-label { display: none; }
  .header-actions .btn-spark {
    padding: 0;
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem;                       /* the phone glyph, now legible */
    line-height: 1;
  }
  .nav-toggle { padding: .5rem; margin-left: .1rem; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background-color: var(--charcoal);
  background-size: cover; background-position: center;
  color: var(--bone);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,24,27,.72) 0%, rgba(22,24,27,.82) 55%, rgba(22,24,27,.95) 100%);
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(4.5rem, 12vw, 9rem); }
.hero h1 { max-width: 16ch; }
.hero h1 .accent { color: var(--spark-bright); }
.hero .lead { color: var(--bone-dim); margin-top: 1.25rem; }
.hero .btn-group { margin-top: 2.25rem; }
.hero-meta {
  margin-top: 2.5rem; font-family: var(--ff-mono); font-size: .78rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--steel-light);
}
.hero-meta strong { color: var(--arc); font-weight: 500; }

/* ============================================================
   CARDS / GRIDS
   ============================================================ */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--charcoal-2); border: 1px solid var(--steel);
  border-radius: var(--radius); padding: 1.75rem; height: 100%;
}
.section--light .card { background: #fff; border-color: #e2ddd0; color: var(--charcoal); }
.card .num {
  font-family: var(--ff-mono); color: var(--spark-bright); font-size: .8rem;
  letter-spacing: .15em; display: block; margin-bottom: .75rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--bone-dim); font-size: .98rem; }
.section--light .card p { color: var(--steel); }

/* Featured project teaser cards */
.project-teaser { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--steel); display: block; }
.project-teaser img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .4s ease; }
.project-teaser:hover img { transform: scale(1.04); }
.project-teaser .caption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.25rem 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(22,24,27,.92));
}
.project-teaser .caption .place {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--spark-bright);
}
.project-teaser .caption h3 { font-size: 1.35rem; margin: .2rem 0 0; color: var(--bone); }

/* ============================================================
   TRUST / STATS
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat .big {
  font-family: var(--ff-head); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--spark); line-height: 1;
}
.stat .label {
  font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--bone-dim); margin-top: .5rem;
}
.section--light .stat .label { color: var(--steel); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band { background: var(--spark); color: var(--bone); text-align: center; }
.cta-band h2 { color: var(--bone); }
.cta-band .btn-outline { border-color: var(--bone); color: var(--bone); }
.cta-band .btn-outline:hover { background: var(--bone); color: var(--spark); border-color: var(--bone); }
.cta-band .btn-spark { background: var(--charcoal); color: var(--bone); }
.cta-band .btn-spark:hover { background: #000; color: var(--bone); }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer { background: #101215; border-top: 1px solid var(--steel); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-col h4 { font-size: 1.1rem; color: var(--bone); margin-bottom: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: var(--bone-dim); font-size: .95rem; }
.footer-col a:hover { color: var(--spark-bright); }
.footer-brand .site-title-text { font-size: 1.4rem; margin-bottom: .75rem; }
.footer-brand p { color: var(--steel-light); font-size: .95rem; max-width: 34ch; }
.social-links { display: flex; gap: .9rem; margin-top: 1.1rem; }
.social-links a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--steel); border-radius: var(--radius); color: var(--bone-dim); }
.social-links a:hover { border-color: var(--spark-bright); color: var(--spark-bright); }
.social-links svg { width: 18px; height: 18px; fill: currentColor; }
.payment-line { font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--steel-light); margin-top: 1.5rem; }
.footer-bottom { border-top: 1px solid var(--steel); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
  font-size: .82rem; color: var(--steel-light); }
.footer-bottom a { color: var(--steel-light); }
.footer-bottom a:hover { color: var(--spark-bright); }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--spark);
  color: var(--bone); padding: .6rem 1rem; border-radius: var(--radius); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   EDITABLE PAGE BODY (WordPress editor content)
   Styles native block-editor output to match the theme so
   anything typed in the standard editor looks on-brand.
   ============================================================ */
.page-body { max-width: 72ch; }
.page-body > *:first-child { margin-top: 0; }
.page-body h2 { font-family: var(--ff-head); text-transform: uppercase; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 2.5rem 0 1rem; color: var(--bone); }
.page-body h3 { font-family: var(--ff-head); text-transform: uppercase; font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 2rem 0 .75rem; color: var(--bone); }
.page-body h4 { font-family: var(--ff-head); text-transform: uppercase; font-size: 1.2rem; margin: 1.75rem 0 .6rem; color: var(--bone); }
.page-body p { margin: 0 0 1.2rem; color: var(--bone-dim); }
.page-body a { color: var(--spark-bright); text-decoration: underline; text-underline-offset: 3px; }
.page-body a:hover { color: var(--bone); }
.page-body strong { color: var(--bone); }
.page-body ul, .page-body ol { color: var(--bone-dim); margin: 0 0 1.2rem; padding-left: 1.3rem; }
.page-body li { margin-bottom: .5rem; }
.page-body img { border-radius: var(--radius); border: 1px solid var(--steel); margin: 1.5rem 0; }
.page-body blockquote { border-left: 3px solid var(--spark); margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem; font-size: 1.15rem; color: var(--bone); }
.page-body hr { border: 0; height: 1px; background: var(--steel); margin: 2.5rem 0; }
.page-body figure { margin: 1.5rem 0; }
.page-body figcaption { font-family: var(--ff-mono); font-size: .78rem; color: var(--steel-light); margin-top: .5rem; }

/* WordPress core block / alignment support */
.page-body .aligncenter { text-align: center; margin-inline: auto; }
.page-body .alignright { float: right; margin: 0 0 1rem 1.5rem; max-width: 50%; }
.page-body .alignleft { float: left; margin: 0 1.5rem 1rem 0; max-width: 50%; }
.page-body .wp-block-image { margin: 1.5rem 0; }
.page-body .wp-block-image img { width: 100%; }
.page-body .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .9rem; margin: 1.5rem 0; }
.page-body .wp-block-button__link {
  display: inline-block; background: var(--spark); color: var(--charcoal);
  font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: .82rem; font-weight: 600; padding: .95rem 1.6rem; border-radius: var(--radius); text-decoration: none;
}
.page-body .wp-block-columns { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem 0; }
.page-body .wp-block-column { flex: 1; min-width: 240px; }
.page-body .wp-block-list { color: var(--bone-dim); }

/* When the editable body sits on a light section */
.section--light .page-body h2,
.section--light .page-body h3,
.section--light .page-body h4,
.section--light .page-body strong,
.section--light .page-body blockquote { color: var(--charcoal); }
.section--light .page-body p,
.section--light .page-body ul,
.section--light .page-body ol { color: var(--steel); }
.section--light .page-body a { color: var(--spark-deep); }
.section--light .page-body a:hover { color: var(--charcoal); }

/* ============================================================
   BLOCK EDITOR BRIDGE
   Maps native WordPress block markup (Group / Columns / Cover /
   Buttons / Separator) onto the theme's designed components, so
   sections built in the editor look right on the front end AND
   inside the editor canvas.
   ============================================================ */

/* Page content wrapper (page.php) — full-bleed sections escape,
   loose blocks stay readable and centered. */
.page-content > * { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.page-content > .alignfull,
.page-content > .weld-seam { width: 100%; max-width: none; margin-inline: 0; }
.page-content > .alignwide { width: min(100% - 2.5rem, 1320px); }

/* Loose typed text on a page reads on the dark theme */
.page-content p { color: var(--bone-dim); }
.page-content a { color: var(--spark-bright); text-decoration: underline; text-underline-offset: 3px; }
.page-content a:hover { color: var(--bone); }

/* Group-based sections reuse .section / .container / .section-head */
.wp-block-group.section { display: block; }
.wp-block-group.container { display: block; }

/* Card rows built from Columns */
.wp-block-group.section .wp-block-columns { gap: 1.5rem; margin-top: 2rem; align-items: stretch; }
.wp-block-column.card { margin: 0; }
.wp-block-column.card > *:first-child { margin-top: 0; }
.wp-block-column.card .wp-block-heading { margin: 0 0 .5rem; }
.wp-block-column.card p { color: var(--bone-dim); font-size: .98rem; }
.section--light .wp-block-column.card p { color: var(--steel); }

/* Stats row built from Columns */
.wp-block-columns.stats { text-align: center; gap: 1.5rem; }
.wp-block-column.stat { margin: 0; }
.wp-block-column.stat .big { font-family: var(--ff-head); font-weight: 900; text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 3.6rem); color: var(--spark); line-height: 1; margin: 0; }
.wp-block-column.stat .label { font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-dim); margin: .5rem 0 0; }
.section--light .wp-block-column.stat .label { color: var(--steel); }

/* Cover-based hero (background image is editable via the Cover block) */
.wp-block-cover.hero { min-height: clamp(360px, 55vh, 540px); align-items: center; padding-block: clamp(3.5rem, 9vw, 7rem); color: var(--bone); }
.wp-block-cover.hero .wp-block-cover__inner-container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.wp-block-cover.hero h1 { max-width: 16ch; }
.wp-block-cover.hero .lead { color: var(--bone-dim); margin-top: 1rem; }
.wp-block-cover.hero .wp-block-buttons { margin-top: 1.75rem; }

/* Core Buttons styled as theme buttons */
.wp-block-button__link {
  font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .12em;
  font-weight: 600; font-size: .82rem; padding: .95rem 1.6rem; border-radius: var(--radius);
  background: var(--spark); color: var(--bone); border: 2px solid transparent;
}
.wp-block-button__link:hover { background: var(--spark-deep); color: var(--bone); }
/* Buttons are not body links: never inherit the red underline link styling */
.page-content a.wp-block-button__link,
.wp-block-button__link { color: var(--bone) !important; text-decoration: none !important; }
.wp-block-button.is-style-outline a.wp-block-button__link { color: var(--bone) !important; }
.cta-band a.wp-block-button__link { color: var(--bone) !important; }
.cta-band .wp-block-button.is-style-outline a.wp-block-button__link { color: var(--bone) !important; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border-color: var(--steel-light); color: var(--bone); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--spark-bright); color: var(--spark-bright); }

/* CTA band buttons invert on the orange background */
.cta-band .wp-block-button__link { background: var(--charcoal); color: var(--bone); }
.cta-band .wp-block-button__link:hover { background: #000; color: var(--bone); }
.cta-band .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; border-color: var(--bone); color: var(--bone); }
.cta-band .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--bone); color: var(--spark); }
.cta-band .wp-block-buttons { justify-content: center; margin-top: 1.5rem; }
.cta-band .container { text-align: center; }

/* Weld seam as a raw-HTML divider inside content */
.page-content > .weld-seam { display: block; }

/* Editor-canvas niceties (block editor uses .editor-styles-wrapper) */
.editor-styles-wrapper { background: var(--charcoal); color: var(--bone); }
.editor-styles-wrapper .wp-block-cover.hero { min-height: 360px; }

/* Weld seam when built as a core Separator block (validates cleanly) */
.wp-block-separator.weld-seam {
  height: 28px;
  border: 0 !important;
  max-width: none;
  width: 100%;
  opacity: 1;
  margin: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='28' viewBox='0 0 24 28'%3E%3Cline x1='0' y1='18' x2='24' y2='18' stroke='%233d434a' stroke-width='1'/%3E%3Cpath d='M0 18 Q12 6 24 18' fill='none' stroke='%236b7278' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M0 18 Q12 6 24 18' fill='none' stroke='%23d11313' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M0 18 Q12 8 24 18' fill='none' stroke='%23f2efe7' stroke-width='1' opacity='0.45'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  background-size: 24px 28px;
}
.page-content > .wp-block-separator.weld-seam { width: 100%; max-width: none; margin-inline: 0; }

/* Hero stacking: the Cover overlay must sit BEHIND the text and buttons so the
   content stays bright AND clickable. The overlay never intercepts clicks. */
.wp-block-cover.hero .wp-block-cover__background { z-index: 0; pointer-events: none; }
.wp-block-cover.hero .wp-block-cover__inner-container { position: relative; z-index: 1; }
.wp-block-cover.hero:not(.has-background-image) { background-color: var(--charcoal); }

/* Featured-project cards: image sits flush at the top of the card */
.wp-block-column.card .wp-block-image { margin: -1.75rem -1.75rem 1.25rem; }
.wp-block-column.card .wp-block-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; border: 0; }
.wp-block-column.card .wp-block-image + .eyebrow { margin-top: 0; }

/* ---- Section alignment fix ----
   Make every top-level section span full width so each inner .container lines
   up on the exact same left/right edge, whether or not the section is marked
   alignfull. This removes the slight left-edge drift between sections. */
.page-content > .wp-block-group.section { width: 100%; max-width: none; margin-inline: 0; }

/* ---- Owner / Meet the Owner section ---- */
.owner-section .wp-block-columns { gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.owner-section .wp-block-image.owner-photo { margin: 0; }
.owner-section .wp-block-image.owner-photo img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--steel);
  object-fit: cover; display: block;
}
.owner-section h2 { margin-top: .25rem; }
.owner-section p { color: var(--bone-dim); }
@media (max-width: 782px) {
  .owner-section .wp-block-column { flex-basis: 100% !important; }
  .owner-section .wp-block-image.owner-photo { max-width: 460px; margin: 0 auto 1.5rem; }
}

/* ---- Brand logos ---- */
.site-logo-link { display: inline-flex; align-items: center; }
.site-logo { height: 56px; width: auto; display: block; }
@media (max-width: 900px) { .site-logo { height: 44px; } }
@media (max-width: 480px) { .site-logo { height: 38px; } }

.footer-logo { width: 92px; height: auto; margin-bottom: .75rem; }
.footer-tagline {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--spark-bright); margin: 0 0 .75rem;
}

/* ---- Process steps (How It Works) ---- */
.process-step { border-top: 1px solid var(--steel); padding-top: 2rem; margin-top: 2rem; }
.process-step:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.process-step .wp-block-columns { gap: clamp(1rem, 3vw, 2.5rem); align-items: flex-start; margin: 0; }
.process-step .step-num {
  font-family: var(--ff-head); font-weight: 900; line-height: .9;
  font-size: clamp(3rem, 7vw, 5rem); color: var(--spark);
  margin: 0; letter-spacing: -.02em;
}
.process-step h3 { margin: 0 0 .6rem; }
.process-step p { color: var(--bone-dim); margin: 0; }
@media (max-width: 782px) {
  .process-step .wp-block-column { flex-basis: 100% !important; }
  .process-step .step-num { font-size: 2.6rem; margin-bottom: .25rem; }
}

/* ---- Contact page ---- */
.contact-methods .wp-block-column.card { text-align: center; }
.contact-method-icon {
  font-size: 2.75rem; line-height: 1; margin: 0 0 .75rem;
  color: var(--spark-bright);
}
.contact-methods .wp-block-buttons { justify-content: center; margin-top: 1rem; }

/* FAQ accordion (native <details>, no JS) */
.faq-item {
  border: 1px solid var(--steel); border-radius: var(--radius);
  background: var(--charcoal-2); margin-bottom: .75rem; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 1.15rem 1.35rem;
  font-family: var(--ff-head); text-transform: uppercase; font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--bone);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: color .18s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--ff-mono); font-size: 1.5rem; font-weight: 400;
  color: var(--spark-bright); flex-shrink: 0; transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary:hover { color: var(--spark-bright); }
.faq-item .faq-answer { padding: 0 1.35rem 1.25rem; color: var(--bone-dim); }
.faq-item .faq-answer p { margin: 0; }

/* Form area (works with any form plugin's shortcode) */
.contact-form-wrap {
  background: var(--charcoal-2); border: 1px solid var(--steel);
  border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem);
}
.contact-form-wrap input[type="text"],
.contact-form-wrap input[type="email"],
.contact-form-wrap input[type="tel"],
.contact-form-wrap textarea,
.contact-form-wrap select {
  width: 100%; background: var(--charcoal); color: var(--bone);
  border: 1px solid var(--steel); border-radius: var(--radius);
  padding: .85rem 1rem; font-family: var(--ff-body); font-size: 1rem;
  margin-bottom: 1rem;
}
.contact-form-wrap input:focus, .contact-form-wrap textarea:focus, .contact-form-wrap select:focus {
  outline: 2px solid var(--arc); outline-offset: 1px; border-color: var(--arc);
}
.contact-form-wrap label { display: block; font-family: var(--ff-mono); font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); margin-bottom: .4rem; }
.contact-form-wrap textarea { min-height: 150px; resize: vertical; }
.contact-form-wrap input[type="submit"],
.contact-form-wrap button[type="submit"] {
  background: var(--spark); color: var(--bone); border: 0; cursor: pointer;
  font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .12em;
  font-weight: 600; font-size: .82rem; padding: 1rem 2rem; border-radius: var(--radius);
  width: auto; transition: background .18s ease;
}
.contact-form-wrap input[type="submit"]:hover,
.contact-form-wrap button[type="submit"]:hover { background: var(--spark-deep); }

/* Map embed */
.map-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--steel); background: var(--charcoal-2); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Service area ---- */
.town-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.town-grid li {
  background: var(--charcoal-2); border: 1px solid var(--steel);
  border-left: 3px solid var(--spark); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin: 0;
  font-family: var(--ff-mono); font-size: .85rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--bone);
  transition: border-color .18s ease, color .18s ease;
}
.town-grid li:hover { border-color: var(--spark-bright); color: var(--spark-bright); }
.section--light .town-grid li { background: #fff; border-color: #e2ddd0; border-left-color: var(--spark); color: var(--charcoal); }
.town-primary {
  background: var(--spark); border: 0; border-radius: var(--radius);
  padding: 1.5rem 1.75rem; margin-bottom: 1.5rem;
}
.town-primary .eyebrow { color: var(--bone); opacity: .85; margin-bottom: .35rem; }
.town-primary h3 { color: var(--bone); margin: 0 0 .35rem; font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.town-primary p { color: var(--bone); opacity: .9; margin: 0; font-size: .98rem; }

/* ============================================================
   PROJECTS PAGE
   ============================================================ */

/* ---- Project section ---- */
.project-section { position: relative; padding-block: clamp(3rem, 7vw, 5.5rem); }
.project-section:nth-of-type(even) { background: var(--charcoal-2); }

.project-index {
  font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--spark-bright); margin: 0 0 .5rem;
}
.project-section h2 { margin-bottom: 1rem; }

/* Meta row: city + services */
.project-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.project-meta li {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--bone-dim);
  border: 1px solid var(--steel); border-radius: 100px;
  padding: .4rem .85rem; margin: 0;
}
.project-meta li.is-city { border-color: var(--spark); color: var(--spark-bright); }

/* Problem / Solution / Result blocks */
.psr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.75rem; }
@media (max-width: 900px) { .psr { grid-template-columns: 1fr; } }
.psr-item { border-left: 3px solid var(--steel); padding: .25rem 0 .25rem 1.1rem; }
.psr-item.is-result { border-left-color: var(--spark); }
.psr-item h3 {
  font-family: var(--ff-mono); font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--steel-light); margin: 0 0 .5rem;
}
.psr-item.is-result h3 { color: var(--spark-bright); }
.psr-item p { color: var(--bone-dim); font-size: .98rem; margin: 0; }

/* ---- Slideshow ----
   The JS replaces the Gallery block with its own markup (.hg-stage), so none of
   this has to fight WordPress core's gallery stylesheet. */
.project-gallery { margin-bottom: 1.75rem; }

.hg-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #0f1114;
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  overflow: hidden;
}
.hg-stage:focus-visible { outline: 2px solid var(--arc); outline-offset: 3px; }
@media (max-width: 700px) { .hg-stage { aspect-ratio: 4 / 3; } }

.hg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease;
}
.hg-slide.is-active { opacity: 1; visibility: visible; }
.hg-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0;
  border: 0;
  border-radius: 0;
}

/* Before JS runs (and if JS is off) the raw Gallery block shows as a grid,
   so the photos are never lost. */
.project-gallery .wp-block-gallery { gap: 4px; }
.project-gallery .wp-block-gallery img { border-radius: var(--radius); }

/* Controls */
.hg-controls { display: flex; align-items: center; gap: 1rem; margin-top: .85rem; }
.hg-nav {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--charcoal-2); color: var(--bone);
  border: 1px solid var(--steel); border-radius: var(--radius);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.hg-nav:hover { border-color: var(--spark); color: var(--spark-bright); background: var(--charcoal); }
.hg-nav:focus-visible { outline: 2px solid var(--arc); outline-offset: 2px; }

.hg-dots { display: flex; flex-wrap: wrap; gap: .45rem; flex: 1; }
.hg-dot {
  width: 9px; height: 9px; padding: 0;
  border-radius: 50%; border: 1px solid var(--steel-light);
  background: transparent; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.hg-dot:hover { border-color: var(--spark-bright); }
.hg-dot.is-current { background: var(--spark); border-color: var(--spark); transform: scale(1.25); }
.hg-dot:focus-visible { outline: 2px solid var(--arc); outline-offset: 2px; }

.hg-counter {
  flex-shrink: 0;
  font-family: var(--ff-mono); font-size: .76rem; letter-spacing: .12em;
  color: var(--steel-light);
}

/* ---- Google review call-to-action ---- */
.review-cta {
  background: var(--charcoal-2);
  border: 1px solid var(--steel);
  border-left: 3px solid var(--spark);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem;
  justify-content: space-between;
}
.review-cta .review-copy { flex: 1 1 320px; }
.review-cta h3 { margin: 0 0 .4rem; }
.review-cta p { color: var(--bone-dim); margin: 0; font-size: .98rem; }
.review-stars {
  color: var(--spark); font-size: 1.35rem; letter-spacing: .15em;
  margin-bottom: .35rem; line-height: 1;
}
