/*
Theme Name: Harrisburg Copier
Theme URI: https://harrisburgcopier.com
Author: Marketing Gardens
Description: Block theme for a local copier dealer lead-gen site. Core blocks only, no page builder, no plugin dependencies. Design tokens live in theme.json; this file carries only what block supports cannot express.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: harrisburgcopier
*/

/* Hallmark · macrostructure: Split Studio · genre: modern-minimal
 * theme: custom (tuned) · vibe: "local trade, plain-spoken, unfussy"
 * paper: oklch(97% 0.006 85) · accent: oklch(45% 0.075 180) teal
 * display: Bricolage Grotesque · body: Public Sans
 * axes: paper-band=light · display-style=grotesk-sans · accent-hue=chromatic-other
 * nav: N1b canonical three-section · footer: Ft1 mast-headed
 * enrichment: none (typography only) · motion: marquee · sweep-CTA
 * audience: office manager sourcing a copier · use: phone call or quote request
 * tone: utilitarian
 * DEVIATION: Split Studio normally alternates the diptych down the whole page. Here only
 * the hero (copy | quote form) and the FAQ (heading | answers) split; the middle sections
 * run full width. The hero diptych sets the shape because the form must share the fold.
 * pre-emit critique: P4 H5 E4 S4 R5 V4
 */

/* Everything below is intentionally small. If a rule can be expressed in theme.json or
   a block support, it belongs there, not here — otherwise the client edits a block in
   the site editor and the change silently does nothing because CSS overrides it. */

/* Sticky call bar. There is no core block for "fixed to the bottom of the viewport on
   mobile only", and a copier lead is a phone call far more often than a form fill. */
.hbg-sticky-call {
  position: fixed;
  inset-inline: .7rem;
  bottom: .7rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--paper);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(20,24,29,.08), 0 12px 32px rgba(20,24,29,.09);
}
.hbg-sticky-call small { font-weight: 400; opacity: .75; }
@media (min-width: 900px) { .hbg-sticky-call { display: none; } }
@media (max-width: 899px) { body { padding-bottom: 5rem; } }

/* Eyebrow. A styled paragraph variation so the client picks it from the block styles
   menu instead of hand-setting size, colour and letter-spacing on every section. */
.is-style-hbg-eyebrow {
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
  margin-bottom: .9rem;
}

/* Brand marquee. Core has no marquee; the doubled list is in the template part so the
   loop has no visible seam at the wrap point. */
.hbg-marquee { overflow: hidden; border-block: 1px solid var(--wp--preset--color--line); }
.hbg-marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  padding: 1rem 0;
  animation: hbg-slide 38s linear infinite;
  color: var(--wp--preset--color--muted);
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--large);
}
.hbg-marquee:hover .hbg-marquee__track { animation-play-state: paused; }
@keyframes hbg-slide { to { transform: translateX(-50%); } }

/* Service list ticks. core/list cannot set a marker shape, and a square marker in the
   accent colour is the one place the brand shows up inside body copy. */
.is-style-hbg-ticks { list-style: none; padding-left: 0; }
.is-style-hbg-ticks li {
  position: relative;
  padding-inline-start: 1.5rem;
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--ink-3);
  margin-bottom: .5rem;
}
.is-style-hbg-ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--wp--preset--color--accent);
}

/* core/details, restyled to match. Native disclosure, so it works with JS off and is
   keyboard accessible without writing any of it. */
.wp-block-details {
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding-block: .3rem;
}
.wp-block-details summary {
  padding-block: 1.15rem;
  cursor: pointer;
  font-family: var(--wp--preset--font-family--display);
  font-size: var(--wp--preset--font-size--large);
  font-weight: 500;
}
.wp-block-details > :not(summary) {
  color: var(--wp--preset--color--ink-3);
  max-width: 68ch;
  padding-bottom: .6rem;
}

/* Numbered process rail. core/list with a rule between items; the counter is drawn from
   the list itself so the client can reorder steps and the numbers follow. */
.is-style-hbg-steps { list-style: none; padding-left: 0; counter-reset: step; }
.is-style-hbg-steps > li {
  counter-increment: step;
  position: relative;
  padding: 1.6rem 0 1.6rem 3.4rem;
  border-top: 1px solid var(--wp--preset--color--line);
}
.is-style-hbg-steps > li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.is-style-hbg-steps > li strong { display: block; margin-bottom: .3rem; font-size: var(--wp--preset--font-size--large); font-family: var(--wp--preset--font-family--display); font-weight: 500; }
.is-style-hbg-steps > li br { display: none; }
.is-style-hbg-steps > li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 1.6rem;
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: var(--wp--preset--font-size--large);
  color: var(--wp--preset--color--accent);
  font-variant-numeric: tabular-nums;
}

/* Quote form. Posts to the same shared forms service the Astro build uses, so both
   prototypes inherit the honeypot, Turnstile, spam flagging and the health monitor. */
.hbg-form, .hbg-form * { box-sizing: border-box; }
.hbg-form { display: grid; gap: .85rem; }
.hbg-form__row { display: grid; gap: .85rem; grid-template-columns: 1fr 1fr; }
.hbg-form label {
  display: grid;
  gap: .4rem;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  color: var(--wp--preset--color--ink-2);
}
.hbg-form :is(input, select, textarea) {
  /* THE bug behind "the form fields are broken". WordPress ships no global border-box
     reset for form controls, so width:100% + .8rem side padding + a 1px border made each
     half-width field 244px inside a 447px form: 2 x 244 + gap overflowed, and the Company
     and Email fields were clipped off the right edge of the card. The Astro build has a
     global `*{box-sizing:border-box}` and never showed it. Measure the WIDTH, not just the
     padding. */
  box-sizing: border-box;
  width: 100%;
  padding: .7rem .8rem;
  /* NOT `font: inherit`. These controls sit inside their <label>, so inherit picked up the
     LABEL's small size and the field text rendered at 14px inside a 47px box — same size as
     its own label, which reads as an unstyled, unpadded field. The control carries body
     size; the label stays small. That size difference IS the hierarchy. */
  font-family: var(--wp--preset--font-family--text);
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.4;
  font-weight: 400;
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 6px;
}
.hbg-form :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--wp--preset--color--accent);
  box-shadow: 0 0 0 3px var(--wp--preset--color--accent-wash);
}
.hbg-form__field { display: grid; gap: .35rem; }
.hbg-form__field > label { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--wp--preset--color--ink-2); }
.hbg-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hbg-form button {
  width: 100%;
  padding: .95rem 1.5rem;
  font: 600 var(--wp--preset--font-size--medium)/1 var(--wp--preset--font-family--text);
  color: #fff;
  background: var(--wp--preset--color--accent);
  border: 0; border-radius: 10px; cursor: pointer;
}
@media (max-width: 520px) { .hbg-form__row { grid-template-columns: 1fr; } }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hbg-marquee__track { animation: none; }
}

/* Footer link hit area. Core renders these as inline <a> inside a paragraph, which came
   out 16px tall on a phone, under the WCAG 2.5.8 minimum of 24px. They are a list of
   destinations rather than links inside a sentence, so they do not get the inline
   exemption. inline-block plus vertical padding fixes the target without altering the look. */
.wp-block-site-footer a,
footer .wp-block-column p a {
  display: inline-block;
  padding-block: .35rem;
}
