/* Exilien design inside Divi.
   The page is one Divi section (CSS class "exi-page") holding one Code module per part of the page. Divi's section,
   row, column and module boxes add padding, widths, floats and a white ground; here they step aside so each part
   lays itself out exactly as in the preview. Loaded last, only on that page (body.exi-on). */

/* Divi's own header, footer and "blank page" leftovers: the design brings its own */
body.exi-on #top-header, body.exi-on #main-header, body.exi-on #main-footer,
body.exi-on .et-l--header, body.exi-on .et-l--footer, body.exi-on #et-main-area > #main-footer { display: none !important; }
body.exi-on #page-container { padding-top: 0 !important; margin-top: 0 !important; }
body.exi-on #main-content .container::before { display: none; }

/* the Services photos stay pinned while you scroll: no box above them may clip */
body.exi-on #page-container, body.exi-on #et-boc, body.exi-on #et-main-area, body.exi-on #main-content,
body.exi-on #main-content article, body.exi-on .entry-content, body.exi-on .et-l, body.exi-on .et_builder_inner_content,
.exi-page, .exi-page .et_pb_row, .exi-page .et_pb_column, .exi-page .et_pb_module, .exi-page .et_pb_code_inner {
  overflow: visible !important;
}

/* Divi's boxes take no room of their own */
.exi-page.et_pb_section, .exi-page .et_pb_row, .exi-page .et_pb_column, .exi-page .et_pb_module, .exi-page .et_pb_code_inner {
  padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: none !important;
  float: none !important; min-height: 0 !important; background: none !important; box-shadow: none !important;
  transform: none !important; filter: none !important; z-index: auto !important;
}
.exi-page .et_pb_row::after { display: none !important; }
.exi-page .et_pb_column { position: static !important; }

/* if Divi's stylesheet arrives after the design's (Divi's Critical CSS setting can do that), its body text
   (Open Sans, 14px, grey) would win; the design's body rule is restated at a weight Divi's bare "body" cannot beat */
body.exi-on { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.55 var(--font-text); }

/* the design's own element rules (system.css "base"), restated as "html body h2": two element names outweigh
   Divi's one (h2 { font-size: 26px; color: #333 }, a { color: #2ea3f2 }) in any load order, and still lose to
   every class rule of the design */
html body :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
html body :is(h1, h2, h3, h4) { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); }
html body h1 { font-size: var(--t-h1); line-height: 1.04; }
html body h2 { font-size: var(--t-h2); line-height: 1.1; }
html body h3 { font-size: var(--t-h3); line-height: 1.2; }
html body h4 { font-family: var(--font-text); font-weight: 500; font-size: var(--t-card); line-height: 1.3; letter-spacing: -0.01em; }
html body a { color: inherit; text-decoration: none; }
html body :is(h1, h2, h3, h4, p, ul, ol, figure, blockquote) { margin: 0; }
html body :is(button, input, select, textarea) { font-family: inherit; }

/* Divi's text defaults (grey 14px text, padded headings and paragraphs, bulleted lists) never reach the design */
.exi-page :is(h1, h2, h3, h4, h5, h6) { padding-bottom: 0; }
.exi-page p { padding-bottom: 0; }
.exi-page :where(ul, ol) { list-style: none; padding: 0; line-height: inherit; }
body.exi-on .entry-content .exi-page :is(ul, ol) { list-style: none; padding: 0; line-height: inherit; }

/* system.css lays sections out as flex (tablet) or grid (phone) at no weight (:where), so a page's own hiding wins;
   Divi's reset (section, footer { display: block }) outweighs that, so the same rules are restated here at the
   weight of two element names: enough to beat Divi's reset in any load order, still below any class rule of the design */
@media (min-width: 640px) and (max-width: 1279px) {
  html :where(.exi-main) > section:where(:not(.hero, .section--hero)), html footer:where(.closing) { display: flex; flex-direction: column; }
}
@media (max-width: 639px) {
  html :where(.exi-main) > section:where(:not(.hero, .section--hero)):where(:has(> :is(.wrap, .container))), html footer:where(.closing) {
    display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; grid-auto-rows: auto;
  }
}

/* the quote form's fields: Divi styles input[type=text] (and its :focus) at the same weight as the design's
   .field input, so the design's rule is restated one class heavier */
.exi-page .form .field :is(input, select, textarea) {
  width: 100%; height: var(--btn-h); padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--ink); font: 400 var(--t-body)/1.4 var(--font-text); margin: 0;
}
.exi-page .form .field textarea { height: auto; min-height: 120px; padding-block: var(--s-3); resize: vertical; }
.exi-page .form .field :is(input, select, textarea)[aria-invalid="true"] { border: 2px solid var(--error); }

/* the quote form's hidden field for bots */
.exi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
