/*
Theme Name: Buck's Cutting Edge - Bricks Child
Description: Local-only child theme for the approved Buck's Cutting Edge V4.18 design.
Author: Buck's Cutting Edge
Template: bricks
Version: 1.0.0
Text Domain: bucks-bricks-child
*/

/*
 * Bricks stores the page design in native global classes. This small shim
 * preserves the source order of the approved hero breakpoints; Bricks 2.4's
 * converter groups imported media rules and otherwise lets the 1150px value
 * override the narrower V4.18 values.
 */

/*
 * Hero video: fill the whole hero. The imported img/video reset sets
 * height:auto, which left the video in a 16:9 strip at the top of the hero
 * with the still poster showing below it.
 */
#brx-content .hero-video video { height: 100%; object-fit: cover; }

/*
 * Arrow icons. iPhones draw the ↗ character as a blue emoji, so every arrow
 * in a button or link is a .arrow-icon span drawn with a CSS mask instead.
 * The character stays in the markup (with a text-style selector) as the
 * fallback for browsers without mask support.
 */
html { font-variant-emoji: text; }
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
  .arrow-icon {
    --arrow-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='square'%3E%3Cpath d='M2.4 9.6 9.4 2.6M4 2.4h5.6V8'/%3E%3C/svg%3E");
    display: inline-block;
    flex: none;
    width: .72em;
    height: .72em;
    overflow: hidden;
    text-indent: 120%;
    white-space: nowrap;
    line-height: 1;
    background-color: currentColor;
    -webkit-mask: var(--arrow-icon) center / contain no-repeat;
    mask: var(--arrow-icon) center / contain no-repeat;
  }
  /* Button arrows sit in a larger font box; size them to the 15px label. */
  .button > .arrow-icon {
    width: 13px;
    height: 13px;
  }
}

/* Silent page loops (site-v4-18.js): sit exactly over the photo and fade in once playing. */
.loop-video {
  position: absolute;
  display: block;
  max-width: none;
  margin: 0;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.loop-video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .loop-video { display: none; }
}
@media (max-width: 800px) {
  #brx-content .hero { height: 86svh; min-height: 730px; max-height: 900px; }
  #brx-content .hero h1 { font-size: clamp(70px, 11vw, 90px); }
  #brx-content .hero-secondary { font-size: 34px; margin-top: 17px; }
  #brx-content .hero-copy { padding-block: 162px 112px; }
  #brx-content .hero .eyebrow { font-size: 12px; letter-spacing: .07em; margin-bottom: 23px; }
  #brx-content .hero-description { font-size: 19px; }
  #brx-content .hero .actions { gap: 23px; }
  #brx-content .hero .button { font-size: 15px; padding-inline: 22px; gap: 24px; }
  #brx-content .hero-phone { font-size: 21px; }
  #brx-content .hero-video video, #brx-content .hero-poster { object-position: 70% center; }
  #brx-content .hero-shade { background: linear-gradient(90deg,#080909c9,#08090961 75%,#08090936),linear-gradient(0deg,#080909f2 0%,transparent 65%,#08090955); }
}

@media (max-width: 560px) {
  #brx-content .hero { height: 88svh; min-height: 730px; max-height: 850px; }
  #brx-content .hero-copy { padding-block: 182px 114px; }
  #brx-content .hero h1 { font-size: clamp(42px, 13.1vw, 70px); line-height: .89; letter-spacing: -.058em; }
  #brx-content .hero-secondary { font-size: clamp(25px, 6.9vw, 36px); margin-top: 17px; }
  #brx-content .hero .eyebrow { max-width: 285px; font-size: 11px; line-height: 1.5; margin: 0 0 23px; letter-spacing: .065em; }
  #brx-content .hero-description { font-size: 18px; margin: 22px 0 25px; max-width: 320px; }
  #brx-content .hero .actions { align-items: flex-start; gap: 19px; }
  #brx-content .hero .button { min-height: 55px; gap: 26px; font-size: 15px; }
  #brx-content .hero-phone { font-size: 22px; }
  #brx-content .hero-bottom p { font-size: 12px; max-width: 170px; }
  #brx-content .hero-video video, #brx-content .hero-poster { object-position: 68% center; }
  #brx-content .hero-shade { background: linear-gradient(90deg,#080909b5,#08090938),linear-gradient(0deg,#080909fa 0%,#08090996 28%,#0809090d 90%); }
}

/*
 * Phones: more room (Nov 2026).
 * The header rail and the 104px masthead took 148px at the top, and the call
 * bar takes 57px at the bottom; in Safari that left about 460px for the page.
 * The rail's phone number is already in the hero and the call bar, and the
 * social links are in the footer, so phones drop the rail and get a compact
 * masthead that stays the same size when scrolled.
 */
@media (max-width: 560px) {
  #brx-header .header-rail { display: none; }
  #brx-header .site-header .header-masthead.header-masthead {
    width: calc(100% - 20px);
    min-height: 64px;
    padding: 9px 14px 9px 18px;
    border-radius: 0 0 12px 12px;
  }
  #brx-header .site-header .header-masthead.header-masthead:has(.main-nav.is-open) { border-radius: 0; }
  #brx-header .site-header .header-wordmark .wordmark-name { font-size: 26px; }
  #brx-header .site-header .header-wordmark .wordmark-cutting { font-size: 9.5px; margin-top: 4px; }
  #brx-header .site-header .header-wordmark .wordmark-detail { font-size: 6.5px; margin-top: 4px; }
  #brx-header .site-header .menu-toggle.menu-toggle { padding-block: 10px; gap: 12px; font-size: 12px; }
  #brx-header .site-header .menu-toggle.menu-toggle span { font-size: 24px; }

  /* Home hero: fill the visible screen above the call bar, not a fixed 730px. */
  #brx-content .hero { height: auto; min-height: min(calc(100svh - 57px), 720px); max-height: none; }
  #brx-content .hero-copy { padding-block: 104px 104px; }
  #brx-content .hero h1 { font-size: clamp(40px, 12.4vw, 64px); }
  #brx-content .hero .eyebrow { margin-bottom: 20px; }
  #brx-content .hero-description { margin: 20px 0 26px; }
  /* Call button and number side by side; they wrap on very narrow screens. */
  #brx-content .hero .actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
  #brx-content .hero .button { gap: 22px; }

  /* Inner pages: their tops were padded to clear the old 148px header. */
  #brx-content .service-entry.service-entry { padding-top: 96px; }
  /* Eyebrows were a centered 270px box, which read as a stray indent. Line them up with the heading. */
  #brx-content .eyebrow.eyebrow { margin-inline: 0; }
  /* "Residential & commercial · Monmouth County, NJ" needs about 300px; keep it on one line from 360px up. */
  #brx-content .hero .eyebrow.eyebrow { max-width: none; }
}

/* =========================================================================
   Buck's base styles
   -------------------------------------------------------------------------
   Replaces the eight copies of the imported V4.18 stylesheet that the
   Bricks HTML/CSS importer left in element-level Custom CSS:

     Header template   "Skip to content" link   #brxe-dothdt
     Footer template   footer root              #brxe-214b6j
     Home              hero section             #brxe-x2d35m (#top)
     Tree Removal      page root                #brxe-o1s5tc (#main)
     Trimming          page root                #brxe-19ecfj (#main)
     Stump Grinding    page root                #brxe-t0gt9l (#main)
     Storm Cleanup     page root                #brxe-mnepbo (#main)
     Land Clearing     page root                #brxe-6gl4ej (#main)

   Those copies add up to about 1 MB and roughly 98% of the rules match
   nothing on the page they load on. These are the rules that do match,
   kept on the same scopes and at the same specificity, so the site should
   render the same. ":not(:nth-child(0))" is the importer's specificity
   bump; it is kept on purpose so nothing shifts in the cascade.

   Apply on the bucks-debug copy first and compare screenshots of Home,
   one service page, the header and the footer before and after.
   ========================================================================= */

/* Scope roots (these elements keep their IDs and data- attributes) */
#brxe-dothdt,
#brxe-214b6j,
#main,
#top:where([data-bricks-import-scope-x2d35m]) {
  font-family: var(--body);
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]):not(:nth-child(0)),
:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) *:not(:nth-child(0)) {
  box-sizing: border-box;
}

/* Media */
:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) :is(img, video):not(:nth-child(0)) {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Type reset */
:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) :is(h1, h2, h3, h4, p, figure, blockquote):not(:nth-child(0)) {
  margin: 0;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) :is(h1, h2):not(:nth-child(0)) {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 1.04;
  letter-spacing: -.045em;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) h2:not(:nth-child(0)) {
  font-size: clamp(32px, 3.15vw, 47px);
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) :is(h3, h4):not(:nth-child(0)) {
  font-weight: 700;
  line-height: 1.15;
}

/* Links and buttons (the header's skip link is itself a scope root, hence the :is(a) form) */
:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]):is(a):not(:nth-child(0)),
:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) a:not(:nth-child(0)) {
  color: inherit;
  text-underline-offset: 5px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) button:not(:nth-child(0)) {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) button:disabled:not(:nth-child(0)) {
  cursor: not-allowed;
  opacity: .65;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]):is(a):focus-visible:not(:nth-child(0)),
:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) :is(a, button, summary):focus-visible:not(:nth-child(0)) {
  outline: 3px solid #e7a7b8;
  outline-offset: 6px;
}

:where([data-bricks-import-scope-dothdt], #brxe-214b6j, #main, [data-bricks-import-scope-x2d35m]) [hidden]:not(:nth-child(0)) {
  display: none !important;
}

/* Service pages only */
:where(#main):is(main) > section:not(.hero) .button:not(:nth-child(0)) {
  border-radius: 0;
  font-weight: 700;
}

:where(#main):is(main) > section:not(.hero) .button-burgundy:not(:nth-child(0)) {
  background: #742035;
  color: #fff;
}

:where(#main):is(main) > section:not(.hero) .button-burgundy:hover:not(:nth-child(0)) {
  background: #8b2b43;
}

:where(#main):is(main) > section.wrap:not(.hero):not(:nth-child(0)),
:where(#main):is(main) > section:not(.hero) > .wrap:not(:nth-child(0)) {
  max-width: 1280px;
}

/* Home only */
:where([data-bricks-import-scope-x2d35m]):is(main > section.wrap:not(.hero):not(:nth-child(0))) {
  max-width: 1280px;
}

:where([data-bricks-import-scope-x2d35m]) .hero-primary:not(:nth-child(0)) {
  display: block;
}

:where([data-bricks-import-scope-x2d35m]) .hero-secondary:not(:nth-child(0)) {
  display: block;
  font-size: clamp(29px, 3.25vw, 47px);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin-top: 19px;
  color: #e5e1da;
}
