/* High Grade Excavation: page sections (homepage first). Colors and fonts come from the kit globals. */

/* ---- Motion (only with hge-js: not for reduced motion or automated renders) ---- */
@keyframes hge-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes hge-card-in { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes hge-bar-up { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
@keyframes hge-word-up { to { transform: none; } }
@keyframes hge-star-in { from { opacity: .15; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Scroll reveal: elements with hge-rv fade up as they enter the view (assets/js/site.js). */
.hge-js .hge-rv { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .1, 1), transform .9s cubic-bezier(.2, .7, .1, 1); }
.hge-js .hge-rv.is-in { opacity: 1; transform: none; }
.hge-js .hge-rv.hge-d1 { transition-delay: .08s; }
.hge-js .hge-rv.hge-d2 { transition-delay: .16s; }
.hge-js .hge-rv.hge-d3 { transition-delay: .24s; }

/* ---- Shared ---- */
/* Text links with an underline (buttons with hge-more); button arrows nudge on hover. */
.hge-more .elementor-button { border-bottom: 1.5px solid currentColor !important; }
.elementor-button .elementor-button-icon svg { width: 16px; height: 16px; transition: transform .25s cubic-bezier(.2, .7, .1, 1); }
.elementor-button:hover .elementor-button-icon svg { transform: translateX(4px); }
.hge-push-right { margin-left: auto !important; }
.hge-more-line .elementor-icon svg { width: 16px; height: 16px; transition: transform .25s cubic-bezier(.2, .7, .1, 1); }
a:hover .hge-more-line .elementor-icon svg { transform: translateX(4px); }
.hge-q-card .elementor-widget-text-editor p, .hge-pb-body .elementor-widget-text-editor p, .hge-hero-lead p { margin: 0; }

/* Photo cards: the photo fills the card under a dark gradient; the text sits on top. */
.hge-media-card.e-con { position: relative; overflow: hidden; }
.hge-cover { position: absolute !important; inset: 0; width: auto !important; max-width: none !important; margin: 0 !important; z-index: 0; }
.hge-cover > .elementor-widget-container, .hge-cover img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; }
.hge-cover img { transition: transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.hge-media-card:hover .hge-cover img { transform: scale(1.05); }
.hge-media-card.e-con::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(9, 10, 12, .05) 30%, rgba(9, 10, 12, .55) 55%, rgba(9, 10, 12, .92) 100%); }
.hge-media-card > :not(.hge-cover) { position: relative; z-index: 2; }

/* ---- Homepage hero ---- */
.hge-hero.e-con { position: relative; }
.hge-hero-grid.e-con, .hge-hero-bar.e-con { position: relative; z-index: 2; }
.hge-hero-bar.e-con { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (max-width: 1280px) { .hge-sectors li:nth-child(n+4) { display: none !important; } }
@media (min-width: 1025px) and (max-width: 1200px) { .hge-req-card.e-con { --width: 360px; } .hge-hero-grid.e-con { --gap: 48px; --column-gap: 48px; } }
.hge-outline { color: transparent; -webkit-text-stroke: 2px #fff; }
.hge-hero-lead strong { display: block; margin-bottom: 6px; color: #fff; font-weight: 600; font-size: 1.12em; }
@media (max-width: 767px) {
  .hge-hero-lead p { font-size: 0; line-height: 0; }   /* phones show only the bold line */
  .hge-hero-lead strong { font-size: 19px; line-height: 1.4; margin: 0; }
}
.hge-hero-link .elementor-button { border-bottom-color: rgba(255, 255, 255, .4) !important; }
.hge-hero-link .elementor-button:hover { border-bottom-color: #fff !important; }

/* Word-by-word headline (assets/js/site.js wraps each word). */
.hge-words .hge-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .02em; margin-bottom: -.02em; }
.hge-words .hge-w > span { display: inline-block; }
.hge-js .hge-words .elementor-heading-title:not(.is-split) { visibility: hidden; }
.hge-js .hge-words .hge-w > span { transform: translateY(105%); animation: hge-word-up .9s calc(.55s + var(--i) * .06s) cubic-bezier(.2, .7, .1, 1) forwards; }

/* Entrance order: label, headline words, card, intro, buttons, rating, caption bar. */
.hge-js .hge-intro--label { animation: hge-rise .8s .35s cubic-bezier(.2, .7, .1, 1) both; }
.hge-js .hge-intro--card { animation: hge-card-in 1.1s .9s cubic-bezier(.2, .7, .1, 1) both; }
.hge-js .hge-intro--lead { animation: hge-rise .9s 1.05s cubic-bezier(.2, .7, .1, 1) both; }
.hge-js .hge-intro--ctas { animation: hge-rise .9s 1.2s cubic-bezier(.2, .7, .1, 1) both; }
.hge-js .hge-intro--rating { animation: hge-rise .9s 1.35s cubic-bezier(.2, .7, .1, 1) both; }
.hge-js .hge-intro--bar { animation: hge-bar-up 1s 1.45s cubic-bezier(.2, .7, .1, 1) both; }

/* Google rating bar: star-gold edge, a divider before the count, "Read reviews" pushed right. */
.hge-g-rating.e-con { border-left-color: var(--e-global-color-a1c3e08) !important; transition: border-color .25s, background-color .25s; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hge-g-rating.e-con:hover { border-color: rgba(255, 255, 255, .45); background-color: rgba(12, 13, 15, .78); }
.hge-g-count .elementor-heading-title { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .22); }
.hge-g-cta.e-con { margin-left: auto; }
.hge-g-cta .elementor-icon svg { transition: transform .25s; }
.hge-g-rating:hover .hge-g-cta .elementor-icon svg { transform: translateX(4px); }
.hge-g-sub .elementor-heading-title { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }
@media (max-width: 767px) {
  .hge-g-count .elementor-heading-title { padding-left: 8px; }
  .hge-g-sub .elementor-heading-title { padding-top: 10px; font-size: 12.5px; }
}
.hge-js .hge-g-stars .e-icon { animation: hge-star-in .45s calc(1.85s + var(--hge-s, 0) * .09s) cubic-bezier(.3, 1.5, .5, 1) both; }
.hge-g-stars .e-icon:nth-child(2) { --hge-s: 1; }
.hge-g-stars .e-icon:nth-child(3) { --hge-s: 2; }
.hge-g-stars .e-icon:nth-child(4) { --hge-s: 3; }
.hge-g-stars .e-icon:nth-child(5) { --hge-s: 4; }

/* Request card: tabs with a red top edge on the open one; fields in the previews' style. */
.hge-req-tabs .e-n-tab-title { height: 58px; border-top: 4px solid transparent !important; }
.hge-req-tabs .e-n-tab-title[aria-selected="true"] { border-top-color: var(--e-global-color-secondary) !important; }
.hge-form .elementor-field-group input:not([type=file]), .hge-form .elementor-field-group select { height: 50px; padding: 0 14px; }
.hge-form .elementor-field-group input:focus, .hge-form .elementor-field-group select:focus { outline: none; border-color: var(--e-global-color-primary) !important; box-shadow: none; }
.hge-form .elementor-select-wrapper select {
  color: var(--e-global-color-a1c3e03); -webkit-appearance: none; appearance: none; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23596069' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
}
/* Elementor's filled caret (an inline SVG); the thin chevron above replaces it. */
.hge-form .elementor-select-wrapper::before, .hge-form .select-caret-down-wrapper { display: none !important; }
/* Upload: the field's label becomes the dashed "Attach plans & specs" target; the native input is hidden. */
.hge-form .elementor-field-type-upload { position: relative; }
.hge-form .elementor-field-type-upload label.elementor-field-label {
  position: static !important; width: 100% !important; height: 50px !important; clip: auto !important; margin: 0 !important; overflow: hidden;
  display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1.5px dashed #c9cdd2; cursor: pointer;
  font: 500 15px var(--e-global-typography-text-font-family), sans-serif; color: var(--e-global-color-a1c3e03); white-space: nowrap; text-overflow: ellipsis;
  transition: border-color .2s;
}
.hge-form .elementor-field-type-upload label.elementor-field-label::before {
  content: ""; flex: none; width: 20px; height: 20px; background: var(--e-global-color-secondary);
  -webkit-mask: url(../img/icon-upload.svg) center / contain no-repeat; mask: url(../img/icon-upload.svg) center / contain no-repeat;
}
.hge-form .elementor-field-type-upload label.elementor-field-label:hover, .hge-form .elementor-field-type-upload label.has-file { border-color: var(--e-global-color-secondary); }
.hge-form .elementor-field-type-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hge-form .elementor-field-type-upload:focus-within label { outline: 2px solid var(--e-global-color-primary); outline-offset: 2px; }
.hge-form .e-form__buttons { margin-top: 4px; }
/* While sending, the button says so (Elementor adds elementor-form-waiting to the form). */
.hge-form form.elementor-form-waiting .elementor-button-text, .hge-form form.elementor-form-waiting .elementor-button-icon { display: none; }
.hge-form form.elementor-form-waiting .elementor-button-content-wrapper::after { content: "Sending…"; }
.hge-form .elementor-message { margin-top: 12px; font-size: 15px; }

/* ---- Seasonal strip: only the current season's strip shows (class on <html> from functions.php). ---- */
.hge-season.e-con { display: none; --hge-accent: var(--e-global-color-a1c3e18); }
.hge-season--commercial.e-con { --hge-accent: var(--e-global-color-a1c3e13); }
.hge-season--residential.e-con { --hge-accent: var(--e-global-color-a1c3e19); }
.hge-season-snow .hge-season--snow.e-con, .hge-season-commercial .hge-season--commercial.e-con,
.hge-season-residential .hge-season--residential.e-con, body.elementor-editor-active .hge-season.e-con { display: flex; }
.hge-season-img img { width: 128px !important; height: 76px !important; object-fit: cover; border-left: 4px solid var(--hge-accent); }
.hge-season-title .elementor-heading-title::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 12px; vertical-align: 5px; background: var(--hge-accent); }
@media (max-width: 767px) {
  .hge-season.e-con { border-left: 4px solid var(--hge-accent) !important; }
  .hge-season-title .elementor-heading-title::before { display: none; }
  .hge-season-btn .elementor-button { padding: 0 0 4px !important; background: none !important; border: 0 !important; border-bottom: 1.5px solid var(--hge-accent) !important; font-size: 15px !important; }
}

/* ---- Market cards ---- */
.hge-market-title .elementor-heading-title { min-height: 1.96em; display: flex; align-items: flex-end; }
.hge-market-text p { min-height: 4.95em; margin: 0 0 22px; }
@media (max-width: 1024px) { .hge-market-title .elementor-heading-title, .hge-market-text p { min-height: 0; } }

/* ---- Reviews ---- */
.hge-proof-h2 .elementor-heading-title span {
  display: block; margin-top: 14px; text-transform: none; color: var(--e-global-color-a1c3e03);
  font: 500 var(--e-global-typography-b2d4f1d-font-size)/1.3 var(--e-global-typography-text-font-family), sans-serif;
}
.hge-pb-img.e-con::after { background: linear-gradient(180deg, rgba(9, 10, 12, 0) 45%, rgba(9, 10, 12, .65) 100%); }
.hge-pb-img .elementor-heading-title, .hge-pb-img .elementor-icon-list-text { text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.hge-pb-body.e-con { position: relative; overflow: hidden; }
.hge-pb-body.e-con::before { content: ""; position: absolute; inset: 0; background: url(../img/topo-dark.svg) center / cover; pointer-events: none; }
.hge-pb-body > * { position: relative; }
.hge-rating-line.e-con { margin-top: auto !important; }
.hge-rating-line .hge-more .elementor-button { white-space: nowrap; }
.hge-q-card.e-con { border-top-color: var(--e-global-color-secondary) !important; }
.hge-q-row.e-con > .hge-q-card { flex: 1 1 0; }
/* Tablet and phone: the review cards become a sideways swipe row. */
@media (max-width: 980px) {
  .hge-q-row.e-con { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: -28px !important; padding-right: 28px; }
  .hge-q-row.e-con::-webkit-scrollbar { display: none; }
  .hge-q-row.e-con > .hge-q-card { flex: 0 0 82%; scroll-snap-align: start; }
}
@media (max-width: 767px) { .hge-q-row.e-con { margin-right: -20px !important; padding-right: 20px; } }

/* ---- Owner ---- */
.hge-owner-img img { width: 420px; max-width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 48% center; }
@media (max-width: 767px) { .hge-owner-img, .hge-owner-img img { width: 100% !important; max-height: 320px; } }

/* ---- High Grade Design Studio (in the studio's brand) ---- */
/* A dark rule with a soft shadow sets the section apart from the near-matching one above. */
.hge-ds.e-con { position: relative; }
.hge-ds.e-con::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, rgba(13, 13, 13, 0), #0D0D0D 12%, #0D0D0D 88%, rgba(13, 13, 13, 0)); }
.hge-ds.e-con::after {
  content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 34px; pointer-events: none; background: linear-gradient(rgba(13, 13, 13, .055), rgba(13, 13, 13, 0));
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* The studio logo leads: it sits on the gold frame's top line and splits it (ivory behind the logo masks the line). */
.hge-ds-photo.e-con { --logo-w: 248px; position: relative; z-index: 0; }
.hge-ds-photo.e-con::after { content: ""; position: absolute; inset: calc(var(--logo-w) * 325 / 577 / 2) -22px -22px 22px; border: 1px solid var(--e-global-color-a1c3e0b); z-index: -1; pointer-events: none; }
.hge-ds-logo img { display: block; width: var(--logo-w) !important; max-width: none !important; height: auto; margin: 0 auto 40px; padding: 0 22px; box-sizing: content-box; background: var(--e-global-color-a1c3e09); position: relative; left: 22px; }
.hge-ds-img img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 767px) { .hge-ds-photo.e-con { --logo-w: 204px; } .hge-ds-logo img { padding: 0 18px; margin-bottom: 32px; } }
.hge-ds-eyebrow .elementor-heading-title { display: inline-flex; align-items: center; gap: 14px; }
.hge-ds-eyebrow .elementor-heading-title::before { content: ""; width: 40px; height: 1px; background: var(--e-global-color-a1c3e0b); }
@media (max-width: 767px) {
  .hge-ds-eyebrow .elementor-heading-title { font-size: 11px; letter-spacing: .2em; gap: 10px; }
  .hge-ds-eyebrow .elementor-heading-title::before { width: 24px; }
}
.hge-ds-h2 .elementor-heading-title > span { display: block; white-space: nowrap; }
.hge-ds-h2 em { font-style: italic; text-transform: none; color: var(--e-global-color-a1c3e0c); }
@media (max-width: 1024px) { .hge-ds-h2 .elementor-heading-title { font-size: clamp(26px, 7.4vw, 40px); } }
.hge-ds-body p { max-width: 540px; margin: 0 0 26px; }
.hge-ds-list .elementor-icon-list-items { row-gap: 10px; }
.hge-ds-list .elementor-icon-list-item { padding-left: 16px; position: relative; }
.hge-ds-list .elementor-icon-list-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -3px; background: var(--e-global-color-a1c3e0b); transform: rotate(45deg); }
.hge-ds-btn .elementor-button-icon svg { color: var(--e-global-color-a1c3e0b); }
.hge-ds-btn .elementor-button:hover { background-color: #26231e !important; }
@media (max-width: 767px) { .hge-ds-btn .elementor-button { padding: 18px 16px !important; font-size: 12px !important; letter-spacing: .12em !important; white-space: nowrap; } }
@media (max-width: 359px) { .hge-ds-btn .elementor-button { white-space: normal; text-align: center; } }
