/* Vintage Threads and Loops — child theme overrides.
   Kept minimal by design: layout/spacing/typography/color live in Divi's own
   section/row/column/module settings wherever possible. This file only holds
   what Divi's UI cannot express natively (documented per rule below). */

/* The page's dark ground (#26241f) is set per-section via Divi's own background
   control, but the <body> element itself is outside Divi's builder scope. On a
   browser window taller than the page's content, the default light theme body
   color would show through below the last section. Same fix already used
   elsewhere in this project for this exact class of bug. */
body { background-color: #26241f; }

/* Divi's Image module stretches its own outer wrapper (.et_pb_image_N) to a
   flex-stretched parent height, but the inner .et_pb_image_wrap span has no
   height of its own (height:auto), so it shrinks to the <img>'s native
   aspect-ratio instead of passing the outer wrapper's height down — breaking
   the percentage-height chain the <img>'s own height:100% needs to resolve
   against, so object-fit:cover never gets a real box to cover. No native Divi
   control reaches either of these inner elements. Used on the Home hero photo. */
.hero-photo .et_pb_image_wrap { height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Home gallery mosaic caption text-shadow (design changelog, 2026-09-04
   accessibility pass). Perceptual polish only — the actual contrast fix is
   the caption scrim gradient itself (set natively via the module's gradient
   background). No confirmed Divi 5 JSON path for text-shadow on a Text
   module's body font (only the Heading module's title/dropCap groups are
   documented), so applied here instead of risking a silently-blank attempt. */
.mosaic-caption-text.mosaic-caption-text { text-shadow: 0 1px 2px rgba(20,18,15,.6); }

/* Privacy Policy: the "Contact" section's mailto link is a plain <a> inside
   a Text module's rich content, not a styled divi/link module — with no
   Divi styling of its own it falls through to Divi's default anchor color
   (the stock accent blue, #2ea3f2), the same trap documented project-wide
   in the global README's Lessons Learned for un-styled Divi elements. */
body .policy-link.policy-link a { color: #b98a4b; }
body .policy-link.policy-link a:hover { color: #d3a465; }

/* Same underlying bug as the hero photo above, different shape: The Work's
   piece photos use object-fit:contain with an intentional max-height (the
   design deliberately lets tall/narrow images "pillarbox" rather than crop).
   module.decoration.sizing (width/height/maxHeight) never reaches the actual
   <img> tag here either — without this, the image renders at its raw
   intrinsic pixel size instead of scaling to the column, which is what read
   as "not centered" (it's actually just tiny and left-aligned, not centered
   *or* off-center). Plain width/max-height on the img is enough here — no
   percentage-height chain to bridge, since width:100% resolves against the
   column's width directly rather than an ancestor's height. */
body .piece-photo.piece-photo .et_pb_image_wrap {
  width: 100% !important;
}
body .piece-photo.piece-photo img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 760px !important;
  object-fit: contain !important;
}

/* Tablet/phone-specific padding, as a documented exception to "native controls
   only": extensively verified (isolated test pages, sync-field fixes, REST vs
   wp-cli updates, and a genuine save through the live Divi Visual Builder) that
   Divi silently drops tablet/phone breakpoint values for spacing.padding once a
   page reaches this one's real-world size/complexity — the desktop value keeps
   rendering at every width instead. Everything else (column stacking, font
   sizes, flex layout) reliably respects its breakpoint values; only this
   property category doesn't at this scale, so it's the one exception here.
   Values below match exactly what was authored (and silently ignored) in the
   page's own Divi JSON — see the site's own row/section decoration.spacing.

   Selectors are deliberately `body .foo.foo` rather than plain `.foo`: Divi's
   own generated rule for some rows/sections is a 2-class selector
   (`.et_pb_row_N.et_pb_row`) that ALSO carries `!important` on every padding
   property — found on the-work's CTA row. Two `!important` rules resolve by
   specificity first, and a single custom class (0,1,0) doesn't beat Divi's
   2-class rule (0,2,0). Doubling the class alone only ties it (0,2,0 vs
   0,2,0), which then falls back to source order — and Divi's inline <style>
   loads after this stylesheet, so it still won even at equal specificity.
   Adding the `body` element tips it to (0,2,1), which wins outright. Applied
   everywhere on principle, not just where a conflict was proven, since it
   costs nothing and the per-element Divi behavior isn't predictable ahead of
   time. */
@media (max-width: 767px) {
  body .hdr-row.hdr-row, body .footer-row.footer-row, body .discipline-row.discipline-row,
  body .gallery-heading-row.gallery-heading-row, body .about-row.about-row, body .mosaic-row.mosaic-row,
  body .intro-row.intro-row, body .piece-row.piece-row, body .cta-row.cta-row {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  body .hero-left.hero-left {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  body .gallery-section.gallery-section {
    padding-top: 56px !important;
  }
  body .about-section.about-section {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
  body .intro-section.intro-section {
    padding-top: 60px !important;
    padding-bottom: 64px !important;
  }
  body .pieces-section.pieces-section {
    padding-top: 64px !important;
  }
  body .cta-section.cta-section {
    padding-top: 72px !important;
  }
  body .cta-row.cta-row {
    padding-top: 52px !important;
    padding-bottom: 88px !important;
  }
  body .contact-section.contact-section {
    padding-top: 60px !important;
    padding-bottom: 72px !important;
  }
}

@media (min-width: 768px) and (max-width: 980px) {
  body .hero-left.hero-left {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
}

/* Contact page: the design's own bottom padding for this section is a true
   fluid value, `clamp(72px,9vw,104px)` — not a fixed px per breakpoint like
   everywhere else on this site. Divi's spacing control only accepts a fixed
   value per breakpoint (desktop/tablet/phone), so a single "desktop" value
   here reads correctly only above ~1156px (9vw == 104px) and sits visibly
   too tall below that, down to the 980px breakpoint edge — reproducing the
   same clamp() expression directly is the only way to match the design's
   actual continuous behavior in that range. Scoped to min-width:768px so it
   never competes with the phone breakpoint's own fixed override above. */
@media (min-width: 768px) {
  body .contact-section.contact-section {
    padding-bottom: clamp(72px, 9vw, 104px) !important;
  }
}

/* Contact page headline: the design sizes this with a single continuous
   `clamp(32px,5.4vw,52px)` across every width, not per-breakpoint fixed
   values. Divi only offers 3 discrete breakpoints, so the JSON-authored
   desktop/tablet/phone sizes (52/42/32px) step down abruptly at the 980px
   and 767px breakpoint edges — most visibly right at 980px, where the design
   is still holding its full 52px (the preferred 5.4vw value doesn't drop
   below 52px until ~963px) but the tablet breakpoint had already dropped to
   42px. Reproducing the clamp() directly replaces all three breakpoint
   values with one rule that matches the design continuously; no media query
   needed since clamp() already self-limits at both ends. */
body .contact-headline.contact-headline h1 {
  font-size: clamp(32px, 5.4vw, 52px) !important;
}

/* Contact page: Formidable Forms styling, hand-written per the user's own
   decision (over trying to adapt the legacy 2015 Divi/Formidable XML, which
   predates Divi 5 and this design entirely).

   Formidable's own default CSS is already built on CSS custom properties
   scoped to the .with_frm_style class Formidable puts on the form wrapper
   (--bg-color, --border-color, --field-pad, etc. — see
   wp-content/plugins/formidable/css/formidableforms.css). Overriding those
   variables on a more specific selector is enough to retheme the form
   entirely without fighting Formidable's own rules property-by-property or
   needing !important — no specificity battle like the padding-at-scale fix
   above, because Formidable's own declarations reference the variables
   directly rather than hard-coding values. `--field-border-width` and
   `--field-pad` take a full CSS shorthand (top/right/bottom/left), which is
   what makes the "underline-only" input style possible through a variable
   alone: 0 0 1px 0. */
.contact-panel .with_frm_style {
  --bg-color: transparent;
  --bg-color-active: transparent;
  --border-color: #4a463c;
  --border-color-active: #b98a4b;
  --field-border-width: 0 0 1px 0;
  --field-border-style: solid;
  --border-radius: 0px;
  --field-height: auto;
  --field-pad: 10px 0;
  --field-font-size: 17px;
  --field-weight: 400;
  --text-color: #e6dfd2;
  --field-margin: 26px;
  --label-color: #c0ab90;
  --font-size: 10px;
  --label-padding: 0 0 10px 0;
  --submit-bg-color: #b98a4b;
  --submit-border-color: #b98a4b;
  --submit-border-width: 0px;
  --submit-border-radius: 0px;
  --submit-text-color: #221f1a;
  --submit-hover-bg-color: #d3a465;
  --submit-hover-border-color: #d3a465;
  --submit-hover-color: #221f1a;
  --submit-padding: 16px 32px;
  --submit-font-size: 11px;
  --submit-margin: 6px 0 0 0;
  --success-bg-color: transparent;
  --success-border-color: transparent;
  --success-text-color: #e6dfd2;
  --success-font-size: 30px;
  /* Formidable's placeholder color rule
     (.frm_style_formidable-style.with_frm_style input::placeholder) reads
     this variable, not --text-color. Its 2-class selector beats the plain
     .contact-panel input::placeholder rule below on specificity, so the
     value has to be set here for it to actually apply — the variable route
     works here (unlike the submit button, which ignores its variables
     entirely for the base state; see the comment on that rule below). */
  --text-color-disabled: #6f685c;
}

/* What the variables above can't reach: font-family/letter-spacing/
   text-transform aren't part of Formidable's variable set, and the
   underline-only look needs the textarea's resize behavior set explicitly. */
.contact-panel .frm_primary_label {
  font-family: 'Space Mono', monospace;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.contact-panel input[type="text"],
.contact-panel input[type="email"],
.contact-panel textarea {
  font-family: 'Karla', sans-serif;
}
.contact-panel textarea {
  resize: vertical;
}
.contact-panel input::placeholder,
.contact-panel textarea::placeholder {
  /* Color comes from --text-color-disabled above — Formidable's own
     placeholder rule wins the specificity fight against a plain rule here,
     so this can't set color itself. Opacity isn't part of that rule though,
     and still needs setting (Formidable's own default opacity/transition
     rule is scoped to a floating-label variant this form doesn't use, so it
     doesn't interfere, but the browser UA stylesheet default is <1). */
  opacity: 1;
}
.contact-panel .frm_button_submit {
  font-family: 'Space Mono', monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
}
/* Formidable's base-state submit-button rule
   (.frm_style_formidable-style.with_frm_style .frm_submit button, etc. in
   formidableforms.css) hardcodes every visual property as a plain value —
   background, border, color, padding, font-size, border-radius, margin,
   box-shadow — none of it wired to the --submit-* variables set above. Only
   the :hover/:focus/:active states actually read those variables. So the
   base state needs a direct override for every property the design
   specifies, duplicating the --submit-* values above as literal values here
   since the variables themselves are simply never consulted for this state.
   Needs !important since Formidable's rule has no !important of its own but
   does have 3-class specificity. box-shadow:0 1px 1px #eeeeee is what showed
   up as a thin light line under the button — the design has no shadow. */
body .contact-panel .frm_button_submit {
  background: #b98a4b !important;
  border-color: #b98a4b !important;
  border-width: 0px !important;
  border-radius: 0px !important;
  color: #221f1a !important;
  padding: 16px 32px !important;
  font-size: 11px !important;
  margin: 6px 0 0 0 !important;
  box-shadow: none !important;
}
body .contact-panel .frm_button_submit:hover {
  background: #d3a465 !important;
  border-color: #d3a465 !important;
  color: #221f1a !important;
}
.contact-panel .frm_form_field {
  margin-bottom: 0;
}
/* The success message swaps in via Formidable's own AJAX submit — no JS of
   ours needed, matching the design's "success panel replaces the form in
   place" behavior natively. Only the secondary "I'll reply to…" line (the
   part after the <br> in the success message, see create_form.php) needs to
   read as body copy rather than inheriting the big heading size above. */
.contact-panel .frm_message {
  font-family: 'Bitter', serif;
  font-weight: 300;
  line-height: 1.25;
}
/* Design spec's 9x9px brass square marker above the success heading — same
   marker shape used next to the wordmark in the header (see shared.py's
   brass_square()), reproduced here in CSS since this text comes from
   Formidable's own success_msg field, not page markup we control directly. */
.contact-panel .frm_message::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  background: #b98a4b;
  margin-bottom: 18px;
}
.contact-panel .frm_message .frm-success-echo {
  display: inline-block;
  margin-top: 14px;
  font-family: 'Karla', sans-serif;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.9;
  color: #b8b0a1;
}
.contact-panel .frm_message .frm-success-echo strong {
  color: #e6dfd2;
  font-weight: 400;
}
/* "Send another" reset button, styled to match the site's own outline-button
   pattern (see shared.py's outline_button() — same border/font/padding
   values, hand-matched here since this button lives in Formidable's
   success_msg field, not page markup). Reset behavior wired in contact.js. */
.contact-panel .frm-send-another-btn {
  display: inline-block;
  margin-top: 28px;
  padding: 15px 28px;
  background: transparent;
  border: 1px solid #4a463c;
  color: #e6dfd2;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
}
.contact-panel .frm-send-another-btn:hover {
  border-color: #b98a4b;
}
