/*
Theme Name: PavementCalc Pro
Author: Custom Site Theme
Description: A fast, editable WordPress block theme for U.S. asphalt, pavement, parking lot, sealcoating and contractor calculator websites. Built for Full Site Editing and Yoast SEO compatibility.
Version: 1.2.4
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: pavementcalc-pro
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: block-patterns, full-site-editing, custom-colors, custom-logo, editor-style, featured-images, wide-blocks
*/

/* Accessibility */
:where(.wp-site-blocks) * { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent);
  outline-offset: 3px;
}

/* Shared utility classes used by the included templates/patterns. */
.pc-shell { position: relative; overflow: hidden; }
.pc-shell::before {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  right: -12rem;
  top: -20rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,170,35,.18) 0%, rgba(244,170,35,0) 70%);
  pointer-events: none;
}
.pc-eyebrow { letter-spacing: .09em; text-transform: uppercase; font-size: .78rem; font-weight: 750; }
.pc-card {
  height: 100%;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 18px;
  background: var(--wp--preset--color--white);
  box-shadow: 0 12px 34px rgba(18, 31, 43, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pc-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(18,31,43,.10); border-color: #bfd0dc; }
.pc-card a { text-decoration: none; }
.pc-card a:hover { text-decoration: underline; text-underline-offset: .18em; }
.pc-tool-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--wp--preset--color--brand-soft);
  color: var(--wp--preset--color--brand);
  font-weight: 800;
}
.pc-stat { border-left: 3px solid var(--wp--preset--color--accent); padding-left: 1rem; }
.pc-trust-row { border-top: 1px solid rgba(255,255,255,.14); }
.pc-step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wp--preset--color--ink);
  color: white;
  font-weight: 800;
}
.pc-note {
  border-left: 4px solid var(--wp--preset--color--accent);
  background: var(--wp--preset--color--accent-soft);
  padding: 1rem 1.15rem;
  border-radius: 0 12px 12px 0;
}
.pc-calculator-frame {
  border: 1px solid var(--wp--preset--color--border);
  border-radius: 20px;
  background: white;
  box-shadow: 0 14px 42px rgba(18,31,43,.07);
}
.pc-footer a { text-decoration: none; }
.pc-footer a:hover { text-decoration: underline; }

/* Native blocks */
.wp-block-button .wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease; }
.wp-block-button .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: .16em; }
.wp-block-navigation a { text-underline-offset: .18em; }

@media (max-width: 781px) {
  .pc-shell::before { width: 22rem; height: 22rem; top: -11rem; right: -10rem; }
  .pc-mobile-stack { gap: 1rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Brand assets */
.pc-header-logo {
  flex: 0 0 auto;
  margin: 0;
}
.pc-header-logo img {
  display: block;
  width: min(250px, 38vw) !important;
  height: auto !important;
  max-height: 48px;
  object-fit: contain;
}
.pc-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.pc-footer-brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  background: url("assets/images/pavementcalc-pro-icon.png") center / cover no-repeat;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.pc-footer-wordmark {
  letter-spacing: -0.02em;
}
.pc-footer-wordmark .pc-pro {
  color: var(--wp--preset--color--accent);
  margin-left: .12em;
}

/* Remove the WordPress root block-gap around template parts.
 * This keeps the hero flush with the header and the footer flush with
 * the final section instead of leaving a white strip between them.
 */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part,
.wp-site-blocks > main + .wp-block-template-part {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.pc-footer { margin-block-start: 0 !important; }

/* Remove automatic flow gaps between the homepage's full-width sections.
 * WordPress applies block-gap to direct children of flow-layout groups;
 * the homepage main wrapper is one such group, which can create a visible
 * white strip between differently colored sections. Internal block spacing
 * remains untouched because this targets direct children of <main> only.
 */
.wp-site-blocks > main.wp-block-group > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.wp-site-blocks > main.wp-block-group > * + * {
  margin-block-start: 0 !important;
}

@media (max-width: 781px) {
  .pc-header-logo img { width: min(205px, 58vw) !important; max-height: 42px; }
  .pc-footer-brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .pc-footer-wordmark { font-size: 1.55rem !important; }
}

/* Keep the final guides section flush with the dark CTA section.
 * The visible strip here comes from that section's own bottom padding,
 * not from WordPress block-gap. :has() keeps the rule narrowly scoped
 * and also fixes sites whose front-page template was previously saved.
 */
.wp-site-blocks > main.wp-block-group > .has-surface-background-color:has(+ .has-brand-dark-background-color) {
  padding-bottom: 0 !important;
}
