/* Homepage hero quote box: the "Request A Free Quote" Cognito form (form 15) in a solid sage box on the right side
   of the landscape photo (js/hero-form.js loads it). Desktop: floats over the open sky and cliffs (the pine stays clear).
   Tablet and phone: the photo keeps its shape and the box sits just under it, overlapping its bottom edge. */
.hf { position: relative; }
.hf__card {
  position: absolute; z-index: 2; right: clamp(18px, 2.5vw, 32px); top: clamp(18px, 2.5vw, 32px);
  width: min(350px, 34%); padding: 20px 20px 16px; text-align: left;
  background: var(--sage); color: var(--paper); border-radius: var(--radius-lg, 18px);
  box-shadow: 0 18px 40px -18px rgba(46, 36, 22, .55), 0 2px 6px rgba(46, 36, 22, .18);
}
.hf__eyebrow { display: block; font-size: .68rem; letter-spacing: .26em; text-transform: uppercase; font-weight: 500; color: color-mix(in srgb, var(--paper) 78%, var(--sage)); }
.hf__title { font-family: var(--serif); font-size: clamp(1.7rem, 2.4vw, 2.1rem); line-height: 1.05; margin: 4px 0 2px; color: var(--paper); }
.hf__title em { color: #E9D9B4; }
.hf__sub { margin: 0 0 12px; font-size: .84rem; line-height: 1.4; color: color-mix(in srgb, var(--paper) 85%, var(--sage)); }
.hf__fine { margin: 8px 0 0; font-size: .64rem; line-height: 1.4; color: color-mix(in srgb, var(--paper) 78%, var(--sage)); }
.hf__fine a { color: inherit; }

/* Headline on the photo: top-left over the sky, on a cream fade, opposite the quote box.
   Fixed colors so it reads the same in dark mode (the fade is always cream). */
.landscape:has(.hf__headline) { padding-top: clamp(16px, 2.4vw, 28px); }   /* the photo starts right under the header */
.hf .landscape__picture { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.hf .landscape__picture::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: min(330px, 62%); pointer-events: none;
  background: linear-gradient(180deg, rgba(244, 239, 227, .97) 0%, rgba(244, 239, 227, .93) 55%, rgba(244, 239, 227, 0) 100%);
}
.hf__headline {
  position: absolute; z-index: 1; left: clamp(18px, 2.8vw, 36px); top: clamp(18px, 2.8vw, 34px); max-width: 56%;
  margin: 0; text-align: left; font-weight: 400;
}
.hf__kicker {
  display: block; margin-bottom: 10px; font-family: var(--sans); font-weight: 500; font-size: clamp(.68rem, 1.4vw, .82rem);
  letter-spacing: .3em; text-transform: uppercase; color: #6B6840;
}
.hf__lead { display: block; font-family: var(--serif); font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.05; letter-spacing: -.01em; color: #2E2416; }
.hf__lead em { color: #B08048; font-style: italic; }
.hf__cov { display: block; margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.7vw, 1.3rem); letter-spacing: .01em; color: #2E2416; }
.hf__sep { color: #B08048; opacity: .7; padding: 0 .25em; font-style: normal; }
/* Phones: a taller crop of the photo so the words have sky to sit on */
@media (max-width: 700px) {
  .hf .landscape__img { aspect-ratio: auto; height: 300px; object-position: center 30%; }
  .hf__headline { left: 16px; right: 16px; top: 18px; max-width: none; }
  .hf__kicker { letter-spacing: .16em; }
  .hf__lead { font-size: min(1.9rem, 7vw); white-space: nowrap; }
}

/* Tablet and phone: box below the photo, overlapping its bottom edge */
@media (max-width: 960px) {
  .hf__card { position: relative; right: auto; top: auto; transform: none; width: auto; max-width: 520px; margin: -36px auto 0; }
  .hf + .landscape__slogan { margin-top: 28px; }
}
@media (max-width: 560px) {
  .hf__card { margin: -22px 8px 0; padding: 22px 18px 18px; }
}

/* ── The real Cognito form (form 15) inside the sage box ──
   Cognito builds its look from CSS variables on .cog-cognito; these set it to cream-on-sage. Its own protective CSS
   is very specific, so layout changes below use !important (same approach as css/styles.css). */
.hf .hf__cog .cog-cognito {
  --font-family: var(--sans); --font-size: 15px; --gutter: 10px;
  --color: var(--hf-cream); --background-hsl: 57, 25%, 34%;
  --highlight: var(--hf-cream); --highlight-reverse: var(--hf-ink);
  --primary: var(--hf-ink); --primary-reverse: var(--hf-cream);
  --negative: #F6C9B6; --a__color: #E9D9B4;
  --form__background-color: transparent; --form__width: 100%;
  --label__color: var(--hf-cream); --label__font-family: var(--sans); --label__font-size: 0.8rem; --label__font-weight: 500;
  --input__background-color: var(--hf-cream); --input__border-color: transparent; --input__border-radius: 10px;
  --input__color: var(--hf-ink); --input__padding-v: 8px; --input__padding-h: 12px;
  --input-highlight: #E9D9B4; --input-focus__box-shadow: 0 0 0 3px rgba(244, 239, 227, .35);
  --placeholder__color: var(--mid);
  --checkable__border-color: rgba(244, 239, 227, .55); --card__border-color: rgba(244, 239, 227, .55);
  --button-primary__background-color: var(--hf-ink); --button-primary__border-color: var(--hf-ink);
  --button-primary__color: var(--hf-cream); --button-primary__border-radius: 99px;
  --button-primary__font-family: var(--sans); --button-primary__font-size: 0.82rem; --button-primary__font-weight: 500;
  width: 100% !important; padding: 0 !important;
}
.hf__cog .cog-cognito .cog-label { color: var(--hf-cream) !important; letter-spacing: .03em; padding-bottom: 6px !important; }
.hf__cog .cog-cognito .cog-asterisk { color: #E9D9B4 !important; }
.hf__cog .cog-cognito .cog-field { margin-bottom: 4px !important; }
.hf__cog .cog-cognito .cog-error-message, .hf__cog .cog-cognito .cog-error-message * { color: #F6C9B6 !important; }

/* Answer chips: compact cream-outlined pills, filled cream once picked */
.hf__cog .cog-cognito .cog-checkable.cog-inner-col { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 6px !important; }
.hf__cog .cog-cognito .cog-checkable__item {
  display: flex !important; align-items: center !important; justify-content: center !important;
  width: auto !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 7px 6px !important;
  border: 1.5px solid rgba(244, 239, 227, .55) !important; border-radius: 99px !important;
  background: transparent !important; color: var(--hf-cream) !important; box-shadow: none !important;
  transition: background-color .2s, border-color .2s, color .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1) !important;
}
.hf__cog .cog-cognito .cog-checkable__item:hover { border-color: var(--hf-cream) !important; background: rgba(244, 239, 227, .08) !important; }
.hf__cog .cog-cognito .cog-checkable__item.is-checked {
  background: var(--hf-cream) !important; border-color: var(--hf-cream) !important; color: var(--hf-ink) !important;
  animation: hf-pop .32s cubic-bezier(.34, 1.56, .64, 1);
}
.hf__cog .cog-cognito .cog-checkable__item .el-checkbox__input,
.hf__cog .cog-cognito .cog-checkable__item .el-radio__input { position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; }
.hf__cog .cog-cognito .cog-checkable__item .el-checkbox__label,
.hf__cog .cog-cognito .cog-checkable__item .el-radio__label {
  display: inline-flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; padding: 0 !important; margin: 0 !important;
  font-size: .84rem !important; font-weight: 500 !important; line-height: 1.2 !important; text-align: center !important; color: inherit !important;
}
.hf__cog .cog-cognito .cog-choice__value { color: inherit !important; }
.hf__cog .cog-cognito .cog-checkable__item:focus-within { outline: 2px solid var(--hf-cream) !important; outline-offset: 2px !important; }

/* The checkmark: hidden until picked, then the sage circle pops in and the tick draws itself */
.hf__cog .cog-cognito .cog-choice__card-checkmark {
  position: static !important; display: block !important; flex: none !important;
  width: 0 !important; height: 16px !important; margin: 0 !important; opacity: 0; transform: scale(.3);
  overflow: visible !important;
  transition: width .22s ease, margin .22s ease, opacity .15s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1) !important;
}
.hf__cog .cog-cognito .cog-choice__card-checkmark circle { fill: var(--hf-sage) !important; stroke: none !important; }
.hf__cog .cog-cognito .cog-choice__card-checkmark path {
  fill: none !important; stroke: var(--hf-cream) !important; stroke-width: 2.2px !important; stroke-linecap: round !important; stroke-linejoin: round !important;
  stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .3s ease .12s !important;
}
.hf__cog .cog-cognito .is-checked .cog-choice__card-checkmark { width: 16px !important; margin-right: 6px !important; opacity: 1; transform: scale(1); }
.hf__cog .cog-cognito .is-checked .cog-choice__card-checkmark path { stroke-dashoffset: 0; }
@keyframes hf-pop { 0% { transform: scale(1); } 40% { transform: scale(1.07); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .hf__cog .cog-cognito .cog-checkable__item.is-checked { animation: none; }
  .hf__cog .cog-cognito .cog-choice__card-checkmark, .hf__cog .cog-cognito .cog-choice__card-checkmark path { transition: none !important; }
}

/* Typed fields and the button */
.hf__cog .cog-cognito input:not([type="checkbox"]):not([type="radio"]) { min-height: 0 !important; }
.hf__cog .cog-cognito .cog-page__navigation { padding-top: 4px !important; margin: 0 !important; }
.hf__cog .cog-cognito .cog-button--submit, .hf__cog .cog-cognito .cog-button--primary {
  width: 100% !important; padding: 13px 16px !important; letter-spacing: .14em !important; text-transform: uppercase !important;
}
.hf__cog .cog-cognito .cog-button--primary:hover { background: #1f180e !important; border-color: #1f180e !important; }
.hf__cog .cog-cognito .cog-confirmation, .hf__cog .cog-cognito .cog-confirmation * { color: var(--hf-cream) !important; }
/* Sent: only the thank-you shows; the box shrinks around it (js/hero-form.js animates the height) */
.hf__card.is-done > :not(.hf__thanks) { display: none !important; }
.hf__thanks { text-align: center; padding: 10px 4px 6px; animation: hf-thanks-in .45s ease both .15s; }
.hf__thanks .hf__title { margin: 0 0 14px; font-size: clamp(2rem, 3vw, 2.5rem); outline: none; }
.hf__next { margin: 0 0 14px; font-size: 1rem; font-weight: 500; color: var(--paper); }
.hf__go {
  display: block; padding: 13px 16px; border-radius: 99px; background: var(--bark); color: var(--paper); text-decoration: none;
  font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem;
  animation: hf-glow 2.6s ease-in-out infinite .8s;   /* same bark glow as the answer buttons */
}
.hf__go:hover, .hf__go:focus-visible { background: #1f180e; }
.hf__go:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
@keyframes hf-thanks-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hf__thanks, .hf__go { animation: none; } }

/* Desktop: the real form is longer than the photo, so the box hangs past its bottom edge (js/hero-form.js makes room below) */
@media (min-width: 961px) { .hf__card { width: min(380px, 36%); } }

/* Fixed colors for the box (the site's --sage/--paper swap in dark mode) */
.hf__card { --hf-sage: #6B6840; --hf-cream: #F4EFE3; --hf-ink: #2E2416; }
[data-theme="dark"] .hf__card { background: #6B6840; color: #F4EFE3; }
[data-theme="dark"] .hf__card .hf__title { color: #F4EFE3; }
.hf__card { --paper: #F4EFE3; --sage: #6B6840; --bark: #2E2416; --mid: #9A8660; }   /* same box in light and dark mode */

/* Pairs side by side: First + Last name, Phone + Email (Cognito stacks them in a narrow box) */
.hf__cog .cog-cognito .cog-row:has(> .cog-name__first),
.hf__cog .cog-cognito .cog-row:has(> .cog-col--12) { display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; }
.hf__cog .cog-cognito .cog-row > .cog-name__first,
.hf__cog .cog-cognito .cog-row > .cog-name__last,
.hf__cog .cog-cognito .cog-row > .cog-col--12 { flex: 1 1 0 !important; width: auto !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; }

/* Never split a word to make room for the checkmark */
.hf__cog .cog-cognito .cog-choice__value, .hf__cog .cog-cognito .el-checkbox__label > div {
  word-break: normal !important; overflow-wrap: normal !important; hyphens: none !important; min-width: 0 !important;
}
@media (max-width: 560px) {
  .hf__cog .cog-cognito .cog-checkable__item { padding: 7px 4px !important; }
  .hf__cog .cog-cognito .cog-checkable__item .el-checkbox__label { font-size: .8rem !important; }
  .hf__cog .cog-cognito .is-checked .cog-choice__card-checkmark { width: 14px !important; height: 14px !important; margin-right: 4px !important; }
}


/* Chips in the order set in Cognito (its own "order" values are for its two-column layout, which reads down the columns) */
.hf__cog .cog-cognito .cog-checkable__item { order: 0 !important; }

/* Unpicked chips: solid bark with cream text, and a soft bark glow that pulses (one chip after another)
   until an answer is picked. Picked chips stay cream with the checkmark. */
.hf__cog .cog-cognito .cog-checkable__item:not(.is-checked) {
  background: var(--bark) !important; border-color: var(--bark) !important; color: var(--paper) !important;
}
.hf__cog .cog-cognito .cog-checkable__item:not(.is-checked):hover { background: #43361f !important; border-color: #43361f !important; }
/* The glow is drawn on its own layer (::after): Cognito's CSS switches animations off on the chip itself */
.hf__cog .cog-cognito .cog-checkable__item { position: relative !important; overflow: visible !important; }
.hf__cog .cog-cognito .cog-field:not(:has(.is-checked)) .cog-checkable__item::after {
  content: "" !important; display: block !important; position: absolute !important; inset: -1.5px !important; border-radius: inherit !important;
  pointer-events: none !important; animation: hf-glow 2.6s ease-in-out infinite !important;
}
.hf__cog .cog-cognito .cog-field:not(:has(.is-checked)) .cog-checkable__item:nth-child(2)::after { animation-delay: .25s !important; }
.hf__cog .cog-cognito .cog-field:not(:has(.is-checked)) .cog-checkable__item:nth-child(3)::after { animation-delay: .5s !important; }
@keyframes hf-glow {   /* the site's start-glow (styles.css), in bark */
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 36, 22, 0); }
  50%      { box-shadow: 0 0 14px 3px rgba(46, 36, 22, .55); }
}
@media (prefers-reduced-motion: reduce) {
  .hf__cog .cog-cognito .cog-field:not(:has(.is-checked)) .cog-checkable__item::after { animation: none !important; box-shadow: 0 0 10px 2px rgba(46, 36, 22, .4); }
}

/* Heading: brighter cream, with the emphasized word in the site's clay */
.hf__card .hf__title { color: #FBF7EE !important; }
.hf__card .hf__title em { color: #B08048 !important; }   /* the site's clay */

/* Typing glow: the field the cursor is in pulses with a bark glow (the site's typing glow, in bark to show on sage).
   The cursor itself pulses bark to clay. Reduced motion: a steady glow instead. */
@keyframes hf-type-glow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(46, 36, 22, .45), 0 0 6px 1px rgba(46, 36, 22, .3); }
  50%      { box-shadow: 0 0 0 3px rgba(46, 36, 22, .3), 0 0 16px 4px rgba(46, 36, 22, .5); }
}
@keyframes hf-caret { 0%, 100% { caret-color: #2E2416; } 50% { caret-color: #B08048; } }
.hf__cog .cog-cognito input:not([type="checkbox"]):not([type="radio"]):focus,
.hf__cog .cog-cognito textarea:focus {
  --input-focus__box-shadow: none;
  border-color: var(--bark) !important;
  animation: hf-type-glow 2.4s ease-in-out infinite, hf-caret 2.4s ease-in-out infinite !important;
}
@media (prefers-reduced-motion: reduce) {
  .hf__cog .cog-cognito input:not([type="checkbox"]):not([type="radio"]):focus,
  .hf__cog .cog-cognito textarea:focus { animation: none !important; box-shadow: 0 0 0 3px rgba(46, 36, 22, .4) !important; }
}
