/* Fallston Drywall Repair Co. — CUBE CSS: composition, utilities, blocks, exceptions via data attributes */

:root {
  --fe-text: #F1EDE8;
  --fe-bg: #1C1710;
  --fe-primary: #EFC88F;
  --fe-skim: #2C2720;
  --fe-accent: #87B4EB;
  --fe-on-primary: #1C1710;
  --fe-muted: #C9C2B8;
  --fe-line: rgba(241, 237, 232, 0.16);
  --fe-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --fe-sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fe-max: 1080px;
  --fe-gutter: clamp(1rem, 4vw, 2rem);
  --fe-space: 1.1rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fe-bg);
  color: var(--fe-text);
  font: 400 1.0625rem/1.65 var(--fe-sans);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--fe-primary); text-underline-offset: 0.18em; }
a:hover { color: var(--fe-text); }
:focus-visible { outline: 3px solid var(--fe-accent); outline-offset: 3px; }
h1, h2, h3, .fe-h3 { font-family: var(--fe-serif); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); max-width: 30ch; }
h3, .fe-h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }

/* ---------- composition ---------- */
.fe-stack { display: flex; flex-direction: column; }
.fe-stack > * + * { margin-block-start: var(--fe-space); }
.fe-cluster { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.fe-sidebar { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.fe-sidebar > * { flex-grow: 1; }
.fe-sidebar > :first-child { flex-basis: 0; flex-grow: 999; min-inline-size: 55%; }
.fe-sidebar > :last-child { flex-basis: 18rem; }
.fe-sidebar[data-variant="figure-left"] > :first-child { flex-basis: 18rem; flex-grow: 1; min-inline-size: 0; }
.fe-sidebar[data-variant="figure-left"] > :last-child { flex-basis: 0; flex-grow: 999; min-inline-size: 55%; }
.fe-sidebar[data-variant="form"] > :last-child { flex-basis: 17rem; }
.fe-sidebar[data-variant="diagram"] { align-items: center; }
.fe-sidebar[data-variant="diagram"] > :first-child { min-inline-size: 60%; max-width: 680px; }
.fe-diagram { max-width: 720px; }
.fe-switcher { display: flex; flex-wrap: wrap; gap: 1.6rem; list-style: none; }
.fe-switcher > * { flex-grow: 1; flex-basis: calc((44rem - 100%) * 999); }
.fe-switcher[data-variant="pairs"] > * { flex-basis: calc((36rem - 100%) * 999); min-inline-size: 45%; }
.fe-switcher--fields { gap: 1rem; }
.fe-switcher--fields > * { flex-basis: calc((30rem - 100%) * 999); }

/* ---------- utilities ---------- */
.fe-u-skip { position: absolute; left: -9999px; }
.fe-u-skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--fe-primary); color: var(--fe-on-primary); padding: 0.5rem 1rem; }
.fe-measure { max-width: 68ch; }

/* ---------- blocks: structure (trade nouns) ---------- */
.fe-stud { max-width: var(--fe-max); margin-inline: auto; padding-inline: var(--fe-gutter); }
.fe-board { padding-block: clamp(3rem, 7vw, 5rem); }
.fe-board[data-variant="skim"] { background: var(--fe-skim); }
.fe-board[data-variant="primary"] { background: var(--fe-primary); color: var(--fe-on-primary); }
.fe-board[data-variant="primary"] a:not(.fe-btn) { color: var(--fe-on-primary); }
.fe-board[data-variant="tape"] { background: linear-gradient(180deg, var(--fe-skim), var(--fe-bg)); border-block: 1px solid var(--fe-line); }
.fe-lead { padding-block-end: clamp(2rem, 5vw, 3rem); }
.fe-mud { font-size: clamp(1.2rem, 2.2vw, 1.42rem); line-height: 1.5; color: var(--fe-text); max-width: 60ch; font-weight: 500; }
.fe-board[data-variant="primary"] .fe-mud { color: var(--fe-on-primary); }
.fe-kicker { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fe-accent); font-weight: 600; display: flex; gap: 0.5rem; align-items: center; }
.fe-board > .fe-stud > p:not(.fe-mud):not(.fe-kicker) { max-width: 68ch; }

/* icons */
.fe-ico { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }
.fe-ico--tiny { width: 0.7em; height: 0.7em; }
.fe-ico--card { width: 1.8rem; height: 1.8rem; color: var(--fe-accent); }
.fe-ico--panel { width: 1.3rem; height: 1.3rem; color: var(--fe-accent); margin-top: 0.2rem; }

/* header */
.fe-header { border-bottom: 1px solid var(--fe-line); background: var(--fe-bg); position: relative; z-index: 20; }
.fe-header__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.6rem; padding-block: 0.9rem; }
.fe-mark { font-family: var(--fe-serif); font-size: 1.25rem; font-weight: 700; color: var(--fe-text); text-decoration: none; line-height: 1.1; margin-right: auto; }
.fe-mark__town { color: var(--fe-primary); }
.fe-header__call { display: flex; flex-direction: column; align-items: flex-end; order: 3; }
.fe-header__phone { display: inline-flex; gap: 0.45rem; align-items: center; font-weight: 600; font-size: 1.08rem; text-decoration: none; }
.fe-header__hours { color: var(--fe-muted); font-size: 0.78rem; }
.fe-header__cta { order: 4; }
.fe-nav { order: 2; }
.fe-nav__row { display: flex; flex-wrap: wrap; gap: 0.2rem 1.3rem; list-style: none; }
.fe-nav__item > a { color: var(--fe-text); text-decoration: none; font-weight: 500; padding-block: 0.5rem; display: inline-flex; gap: 0.35rem; align-items: center; }
.fe-nav__item > a:hover { color: var(--fe-primary); }
.fe-panel { display: none; }
@media (min-width: 1000px) {
  .fe-header__bar { flex-wrap: nowrap; gap: 1.3rem; }
  .fe-nav__row { flex-wrap: nowrap; gap: 1.1rem; }
  .fe-header__cta { padding: 0.65rem 1rem; white-space: nowrap; }
  .fe-header__phone { white-space: nowrap; }
}
@media (min-width: 900px) {
  .fe-nav__item[data-variant="mega"]:hover .fe-panel,
  .fe-nav__item[data-variant="mega"]:focus-within .fe-panel {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--fe-skim); border-block: 1px solid var(--fe-line); box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  }
}
.fe-panel__inner { max-width: var(--fe-max); margin-inline: auto; padding: 1.6rem var(--fe-gutter); }
.fe-panel__grid { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.fe-panel__grid > li { flex: 1 1 22rem; }
.fe-panel__grid a { display: flex; gap: 0.8rem; text-decoration: none; color: var(--fe-text); padding: 0.6rem; border-radius: 4px; }
.fe-panel__grid a:hover { background: rgba(239, 200, 143, 0.08); }
.fe-panel__grid strong { display: block; font-weight: 600; color: var(--fe-primary); }
.fe-panel__grid small { display: block; color: var(--fe-muted); font-size: 0.9rem; }
.fe-panel__all { display: inline-flex; gap: 0.4rem; align-items: center; margin-top: 1rem; font-weight: 600; }

/* buttons and links */
.fe-btn {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.8rem 1.3rem; border-radius: 3px;
  font: 600 1rem/1.2 var(--fe-sans); text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.fe-btn[data-variant="primary"] { background: var(--fe-primary); color: var(--fe-on-primary); }
.fe-btn[data-variant="primary"]:hover { background: var(--fe-text); color: var(--fe-on-primary); }
.fe-btn[data-variant="outline"] { border-color: var(--fe-accent); color: var(--fe-accent); background: transparent; }
.fe-btn[data-variant="outline"]:hover { background: var(--fe-accent); color: var(--fe-on-primary); }
.fe-btn[data-variant="dark"] { background: var(--fe-on-primary); color: var(--fe-primary); }
.fe-btn[data-variant="dark-outline"] { border-color: var(--fe-on-primary); color: var(--fe-on-primary); }
.fe-btn[data-variant="dark-outline"]:hover, .fe-btn[data-variant="dark"]:hover { background: var(--fe-skim); color: var(--fe-text); }
.fe-textlink { display: inline-flex; gap: 0.45rem; align-items: center; font-weight: 600; }
.fe-micro { font-size: 0.92rem; color: var(--fe-muted); max-width: 52ch; }
.fe-board[data-variant="primary"] .fe-micro { color: var(--fe-on-primary); }
.fe-hours { display: flex; gap: 0.5rem; align-items: center; font-weight: 500; }
.fe-hours .fe-ico { color: var(--fe-accent); }

/* hero: photo bleeding off the left edge */
.fe-hero { display: flex; flex-wrap: wrap; align-items: stretch; overflow: hidden; }
.fe-hero__photo { margin: 0; flex: 0 0 40%; padding-block: 10px; padding-right: 10px; }
.fe-hero__img {
  display: block; width: 100%; height: 100%; min-height: 34rem; object-fit: cover; object-position: 50% 40%;
  outline: 2px solid var(--fe-accent); outline-offset: 7px; border-radius: 0 4px 4px 0;
}
.fe-hero__words {
  flex: 1 1 24rem; padding: clamp(2rem, 5vw, 4.5rem) var(--fe-gutter) clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  max-width: calc(var(--fe-max) * 0.62); justify-content: center;
}
.fe-hero__more { gap: 0.5rem 1.6rem; }

/* cards: offset outline */
.fe-cards { list-style: none; }
.fe-corner {
  background: var(--fe-skim); border: 1px solid var(--fe-line); padding: 1.5rem; border-radius: 2px;
  box-shadow: 7px 7px 0 0 var(--fe-bg), 7px 7px 0 2px var(--fe-accent);
  margin: 0 9px 9px 0;
}
.fe-board[data-variant="skim"] .fe-corner { background: var(--fe-bg); box-shadow: 7px 7px 0 0 var(--fe-skim), 7px 7px 0 2px var(--fe-accent); }
.fe-corner__link { display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 600; margin-top: auto; }
.fe-corner h3 a, .fe-corner .fe-h3 a { color: var(--fe-text); }

/* images: outline with a gap */
.fe-figure { margin: 0; }
.fe-figure figcaption { font-size: 0.9rem; color: var(--fe-muted); margin-top: 1rem; }
.fe-photo__img { display: block; width: 100%; outline: 2px solid var(--fe-accent); outline-offset: 7px; margin: 8px 0; }
.fe-photo[data-variant="wide"] { max-width: 900px; }

/* symptom guide */
.fe-symptoms { display: flex; flex-direction: column; gap: 0; }
.fe-symptom { padding-block: 1rem; border-bottom: 1px solid var(--fe-line); }
.fe-symptom dt { font-weight: 600; color: var(--fe-text); }
.fe-symptom dd { margin: 0.3rem 0 0; color: var(--fe-muted); }
.fe-alert { display: flex; gap: 0.7rem; padding: 1rem 1.1rem; border-left: 4px solid var(--fe-primary); background: rgba(239, 200, 143, 0.08); }
.fe-alert .fe-ico { color: var(--fe-primary); margin-top: 0.3rem; }

/* wall anatomy figure */
.fe-wa { display: block; width: 100%; background: var(--fe-bg); border: 1px solid var(--fe-line); }
.fe-wa__wood { fill: #8C6B45; }
.fe-wa__board { fill: #D9D3C8; opacity: 0.95; }
.fe-wa__board[data-variant="b"] { fill: #CFC8BB; }
.fe-wa__tape { fill: #F4F0E8; }
.fe-wa__screw { fill: #3A342B; }
.fe-wa__box { fill: #87B4EB; }
.fe-wa__pop { fill: none; stroke: #E07A5F; stroke-width: 3; }
.fe-wa__dim { stroke: var(--fe-accent); stroke-width: 2; }
.fe-wa__lbl { font: 600 13px var(--fe-sans); fill: #1C1710; paint-order: stroke; stroke: #F1EDE8; stroke-width: 3px; }
.fe-wa__lbl[data-variant="hot"] { fill: #8A2A12; }
.fe-wa__lbl[data-variant="dark"] { fill: #F1EDE8; stroke: none; }

/* picker */
.fe-picker__row { gap: 0.8rem; }
.fe-pick {
  display: inline-block; padding: 0.85rem 1.2rem; border: 2px solid var(--fe-primary); color: var(--fe-text);
  text-decoration: none; font-weight: 500; border-radius: 3px; background: var(--fe-bg);
}
.fe-pick:hover { background: var(--fe-primary); color: var(--fe-on-primary); }

/* protection, myths, steps, older homes */
.fe-preps { list-style: none; }
.fe-prep { display: flex; flex-direction: column; gap: 0.6rem; border-top: 2px solid var(--fe-accent); padding-top: 1rem; }
.fe-myths { display: flex; flex-direction: column; gap: 1.4rem; }
.fe-myth { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; padding-bottom: 1.4rem; border-bottom: 1px dashed var(--fe-line); }
.fe-myth dt { flex: 1 1 16rem; font-family: var(--fe-serif); font-size: 1.2rem; }
.fe-myth dd { flex: 2 1 22rem; margin: 0; }
.fe-myth__tag { display: inline-block; font: 600 0.72rem/1 var(--fe-sans); text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3rem 0.5rem; background: var(--fe-skim); color: var(--fe-muted); margin-right: 0.4rem; vertical-align: 0.15em; }
.fe-myth__tag[data-variant="fact"] { background: var(--fe-accent); color: var(--fe-on-primary); }
.fe-steps { list-style: none; counter-reset: fe-step; display: flex; flex-direction: column; gap: 1.3rem; }
.fe-steps > li { counter-increment: fe-step; position: relative; padding-left: 3.4rem; }
.fe-steps > li::before {
  content: counter(fe-step); position: absolute; left: 0; top: 0; width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center; border: 2px solid var(--fe-primary); color: var(--fe-primary);
  font: 700 1.1rem var(--fe-serif); border-radius: 50%;
}
.fe-steps > li > h3 { margin-bottom: 0.3rem; }
.fe-steps[data-variant="compact"] > li::before { width: 1.9rem; height: 1.9rem; font-size: 0.95rem; }
.fe-steps[data-variant="compact"] > li { padding-left: 2.8rem; }
.fe-steps[data-variant="alert"] > li::before { border-color: #E07A5F; color: #E07A5F; }
.fe-note { display: flex; gap: 0.7rem; padding: 1.1rem 1.2rem; border: 1px solid var(--fe-line); border-left: 4px solid var(--fe-accent); max-width: 72ch; font-size: 0.98rem; }
.fe-note .fe-ico { color: var(--fe-accent); margin-top: 0.3rem; }
.fe-olds > div { display: flex; flex-direction: column; gap: 0.35rem; }

/* towns */
.fe-towns { list-style: none; display: flex; flex-wrap: wrap; gap: 0.9rem 2rem; }
.fe-towns > li { flex: 1 1 15rem; border-left: 2px solid var(--fe-primary); padding-left: 0.8rem; }
.fe-towns strong { display: block; font-family: var(--fe-serif); font-size: 1.15rem; }
.fe-towns span { color: var(--fe-muted); font-size: 0.95rem; }
.fe-townlist { list-style: none; display: flex; flex-direction: column; gap: 1.4rem; max-width: 70ch; }
.fe-town { display: flex; flex-direction: column; gap: 0.3rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--fe-line); }

/* FAQ */
.fe-faq { display: flex; flex-direction: column; border-top: 1px solid var(--fe-line); max-width: 75ch; }
.fe-faq__q { border-bottom: 1px solid var(--fe-line); }
.fe-faq__q summary { cursor: pointer; padding: 1.1rem 0; font-family: var(--fe-serif); font-size: 1.18rem; font-weight: 500; list-style-position: outside; margin-left: 1.2rem; }
.fe-faq__q p { padding-bottom: 1.1rem; color: var(--fe-muted); }

/* related, checks, table */
.fe-related { padding-block: 2.5rem; border-top: 1px solid var(--fe-line); }
.fe-related__list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.fe-related__list a { font-weight: 600; }
.fe-checks { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.fe-checks li { display: flex; gap: 0.6rem; align-items: flex-start; }
.fe-checks .fe-ico { color: var(--fe-accent); margin-top: 0.35rem; }
.fe-tablewrap { overflow-x: auto; max-width: 100%; }
.fe-table { border-collapse: collapse; width: 100%; max-width: 820px; }
.fe-table caption { text-align: left; color: var(--fe-muted); font-size: 0.9rem; padding-bottom: 0.6rem; }
.fe-table th, .fe-table td { text-align: left; padding: 0.9rem 1rem; border-bottom: 1px solid var(--fe-line); vertical-align: top; }
.fe-table thead th { color: var(--fe-accent); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.fe-table tbody th { font-family: var(--fe-serif); font-weight: 500; font-size: 1.1rem; min-width: 7.5rem; }

/* form */
.fe-form { background: var(--fe-skim); padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid var(--fe-line); }
.fe-field { display: flex; flex-direction: column; gap: 0.35rem; }
.fe-field label { font-weight: 600; font-size: 0.95rem; }
.fe-field small { color: var(--fe-muted); font-weight: 400; }
.fe-field input, .fe-field select, .fe-field textarea {
  font: inherit; color: var(--fe-text); background: var(--fe-bg); border: 1px solid rgba(241, 237, 232, 0.35);
  border-radius: 3px; padding: 0.7rem 0.8rem; width: 100%;
}
.fe-field input:focus, .fe-field select:focus, .fe-field textarea:focus { border-color: var(--fe-accent); outline: 2px solid var(--fe-accent); outline-offset: 1px; }
.fe-form .fe-btn { align-self: flex-start; }
.fe-consent { font-size: 0.88rem; color: var(--fe-muted); }
.fe-aside .fe-corner { gap: 0; }

/* footer: centred stack */
.fe-footer { border-top: 1px solid var(--fe-line); padding-block: 3rem 2.5rem; text-align: center; }
.fe-footer__stack { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.fe-mark--foot { margin: 0; font-size: 1.4rem; }
.fe-footer__phone a { font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.fe-footer__hours { color: var(--fe-muted); font-size: 0.9rem; }
.fe-footer__links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.3rem; margin-block: 0.6rem; }
.fe-footer__links a { color: var(--fe-text); font-size: 0.95rem; }
.fe-footer__tag { font-family: var(--fe-serif); font-style: italic; color: var(--fe-primary); }
.fe-footer__small { font-size: 0.82rem; color: var(--fe-muted); max-width: 62ch; }

/* mobile call bar */
.fe-callbar { display: none; }

@media (max-width: 999px) {
  .fe-nav { order: 5; flex-basis: 100%; }
  .fe-header__cta { display: none; }
  .fe-mark { font-size: 1.1rem; }
}
@media (max-width: 767px) {
  body { padding-bottom: 4.2rem; }
  .fe-callbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--fe-primary); border-top: 2px solid var(--fe-on-primary);
  }
  .fe-callbar a {
    flex: 1; display: flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.95rem 0.5rem;
    color: var(--fe-on-primary); font-weight: 600; text-decoration: none; font-size: 0.92rem; white-space: nowrap;
  }
  .fe-callbar a:first-child { flex: 1.5; }
  .fe-callbar a + a { border-left: 1px solid rgba(28, 23, 16, 0.35); }
  .fe-header__hours { display: none; }
  .fe-hero__photo { flex-basis: 100%; padding: 0 0 10px; }
  .fe-hero__img { min-height: 0; height: 19rem; border-radius: 0; }
  .fe-hero__words { padding-inline: var(--fe-gutter); }
  .fe-sidebar > :first-child, .fe-sidebar[data-variant="figure-left"] > :last-child { min-inline-size: 100%; }
}
