/* ============================================================
   EVERHATCH — Service structure (Oct 2026)
   EverCheck · EverBuild · EverPlan · EverPatch components.
   Loaded after style.css and brand-options.css.
   ============================================================ */

/* ---------- sub-brand label chip (menus, footer) ---------- */
.mega-brand, .ft-brand-tag {
  display: inline-block;
  font-family: var(--f-mono); font-size: .62rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass-300);
}
.ft-brand-tag { margin-left: .35rem; opacity: .85; }

/* ---------- mega menu: featured card + three columns ---------- */
.mega-in { grid-template-columns: 1.05fr 1fr 1fr .9fr; gap: clamp(1.2rem, 2.4vw, 2.4rem); }
/* sub-brand as a large, faint word behind the column title / link */
.mega-ghosted, .mega-col .mega-label { position: relative; padding-top: 1.35rem; }
.mega-ghost {
  position: absolute; left: -.1rem; pointer-events: none; z-index: 0;
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.01em; line-height: 1; white-space: nowrap;
  color: var(--paper-text); opacity: .09;
}
.mega-ghosted .mega-ghost { top: -.15rem; font-size: 2.7rem; }
.mega-ghosted > :not(.mega-ghost) { position: relative; z-index: 1; }
.nav-drop.mega .mega-col > a { position: relative; overflow: hidden; }
.mega-ghost-sm { top: .2rem; left: .3rem; font-size: 2.15rem; }
.nav-drop.mega .mega-col > a .mega-name { position: relative; z-index: 1; padding-top: .55rem; }
.nav-drop.mega .mega-col > a:hover .mega-ghost { opacity: .14; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-drop.mega .mega-col > a { padding: .6rem .5rem; }
@media (max-width: 1180px) { .mega-in { grid-template-columns: 1fr 1fr 1fr; } .mega-hero { display: none; } }

/* ---------- EverCheck hub: four moment tabs ---------- */
.wow-tabs { grid-template-rows: repeat(4, 1fr); }
.wow-tab { padding: 1.15rem 1.5rem 1rem; }
.wow-tab .wt-num { font-size: clamp(2.2rem, 3.4vw, 3.4rem); }
@media (max-width: 980px) {
  .wow-tabs { grid-template-rows: none; grid-template-columns: repeat(2, 1fr); }
  .wow-tab { border-right: 1.5px solid var(--line-dark); border-bottom: 1.5px solid var(--line-dark); }
  .wow-tab:nth-child(2n) { border-right: 0; }
  .wow-tab:nth-child(n+3) { border-bottom: 0; }
  .wow-tab.is-active::after { display: none; }
}

/* ---------- services overview: EverBuild link column ---------- */
.eb-links { display: flex; flex-direction: column; border: 2px solid var(--paper-text); }
.eb-link {
  display: grid; grid-template-columns: 3rem 1fr auto; align-items: center; gap: 1rem;
  padding: 1.15rem 1.3rem; color: var(--paper-text);
  border-bottom: 1.5px solid var(--line-dark);
  transition: background .15s, color .15s;
}
.eb-link:last-child { border-bottom: 0; }
.eb-n { font-family: var(--f-display); font-weight: 900; font-size: 1.6rem; color: var(--brass-300); line-height: 1; }
.eb-name { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; line-height: 1.15; }
.eb-name small {
  display: block; margin-top: .3rem;
  font-family: var(--f-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--paper-mute);
}
.eb-arr { font-size: 1.3rem; color: var(--brass-300); transition: transform .2s var(--ease-out); }
.eb-link:hover { background: var(--brass-400); color: var(--on-brass); }
.eb-link:hover .eb-n, .eb-link:hover .eb-arr, .eb-link:hover small { color: var(--on-brass); }
.eb-link:hover .eb-arr { transform: translateX(4px); }

/* ---------- services overview: EverPlan + EverPatch cards ---------- */
.duo-grid { margin-top: 2.8rem; display: grid; grid-template-columns: 1fr 1fr; border: var(--rule); background: var(--bone-0); }
.duo-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: .9rem;
  padding: clamp(1.8rem, 3.4vw, 2.8rem); color: var(--ink);
  transition: background .18s;
}
.duo-card + .duo-card { border-left: var(--rule); }
.duo-brand { background: var(--spruce-950); color: var(--brass-300); padding: .35rem .6rem; letter-spacing: .14em; }
.duo-card p { color: var(--ink-soft); max-width: 30rem; }
.duo-more { margin-top: auto; font-weight: 700; display: inline-flex; gap: .5rem; align-items: center; }
.duo-more .arr { transition: transform .2s var(--ease-out); }
.duo-card:hover { background: var(--brass-200); }
.duo-card:hover .duo-more .arr { transform: translateX(4px); }
@media (max-width: 760px) {
  .duo-grid { grid-template-columns: 1fr; }
  .duo-card + .duo-card { border-left: 0; border-top: var(--rule); }
}

/* ---------- homepage: "Beyond inspections" editorial index ---------- */
.bx {
  position: relative; z-index: 1; overflow: hidden;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--spruce-950); color: var(--paper-text);
  padding: clamp(2rem, 4.5vw, 3.6rem) clamp(1.4rem, 4vw, 3.6rem) clamp(1.2rem, 3vw, 2.4rem);
  border-radius: var(--brand-radius, 3px);
}
.bx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.bx .eyebrow { border-color: var(--paper-text); background: transparent; color: var(--paper-text); }
.bx-intro { max-width: 31rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--paper-soft); }
.bx-intro em { font-style: normal; color: var(--brass-300); font-weight: 600; }
.bx-list { margin-top: clamp(1.4rem, 3vw, 2.4rem); list-style: none; padding: 0; }
.bx-row { border-top: 1.5px solid var(--line-dark); }
.bx-link {
  position: relative; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.1rem, 2.4vw, 1.7rem) 0; color: inherit;
}
/* the big word: small brass EVER + outlined BUILD / PLAN / PATCH */
.bx-word {
  display: flex; align-items: flex-start; gap: .35rem; line-height: .82;
  transition: transform .45s var(--ease-out);
}
.bx-word small {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(.85rem, 1.3vw, 1.1rem);
  letter-spacing: .14em; text-transform: uppercase; color: var(--brass-300); padding-top: .35em;
}
.bx-word b {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; letter-spacing: -.035em;
  font-size: clamp(3.4rem, 8.6vw, 7.6rem);
  color: transparent; -webkit-text-stroke: 1.5px var(--paper-text);
  transition: color .35s ease, -webkit-text-stroke-color .35s ease;
}
.bx-copy { display: flex; flex-direction: column; gap: .45rem; max-width: 27rem; position: relative; z-index: 2; }
.bx-name { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.1; color: var(--bone-0); }
.bx-desc { font-size: var(--fs-small); color: var(--paper-soft); line-height: 1.55; }
.bx-arr {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-dark); font-size: 1.3rem; color: var(--brass-300);
  transition: background .3s, color .3s, border-color .3s, transform .45s var(--ease-out);
}
/* hover photo: tilted print pinned to the end of the big word, inside the word column */
.bx-word { grid-column: 1; grid-row: 1; }
.bx-copy { grid-column: 2; grid-row: 1; }
.bx-arr  { grid-column: 3; grid-row: 1; }
.bx-img {
  grid-column: 1; grid-row: 1; justify-self: end; align-self: center;
  position: relative; z-index: 1; pointer-events: none;
  width: clamp(8.5rem, 12vw, 11rem); aspect-ratio: 3 / 2; margin-right: .5rem;
  transform: rotate(-6deg) scale(.85); opacity: 0;
  border: 5px solid var(--bone-0); box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .7);
  transition: opacity .35s ease, transform .5s var(--ease-out);
}
.bx-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bx-link:hover .bx-word, .bx-link:focus-visible .bx-word { transform: translateX(.6rem); }
.bx-link:hover .bx-word b, .bx-link:focus-visible .bx-word b { color: var(--brass-400); -webkit-text-stroke-color: var(--brass-400); }
.bx-link:hover .bx-img, .bx-link:focus-visible .bx-img { opacity: 1; transform: rotate(-3deg) scale(1); }
.bx-link:hover .bx-arr, .bx-link:focus-visible .bx-arr { background: var(--brass-400); border-color: var(--brass-400); color: var(--on-brass); transform: rotate(-45deg); }
.bx-link:focus-visible { outline: 2px solid var(--brass-400); outline-offset: 4px; }
.bx-subs { list-style: none; padding: 0 0 clamp(1rem, 2vw, 1.4rem); margin-top: -.3rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.bx-subs a {
  display: inline-block; padding: .4rem .75rem; border-radius: 999px;
  border: 1.5px solid var(--brass-400); color: var(--brass-400);
  font-size: .8rem; font-weight: 600; transition: background .15s, border-color .15s, color .15s;
}
.bx-subs a:hover { background: var(--brass-400); border-color: var(--brass-400); color: var(--on-brass); }
@media (max-width: 860px) {
  .bx-link { grid-template-columns: 1fr auto; }
  .bx-word { grid-column: 1 / -1; grid-row: 1; }
  .bx-copy { grid-column: 1; grid-row: 2; }
  .bx-arr  { grid-column: 2; grid-row: 2; }
  .bx-img { display: none; }
  .bx-arr { width: 2.8rem; height: 2.8rem; }
}
@media (hover: none) { .bx-word b { color: var(--paper-text); -webkit-text-stroke-color: transparent; opacity: .92; } }
@media (prefers-reduced-motion: reduce) { .bx-word, .bx-img, .bx-arr { transition: none; } }
