/* fit-c: viewport-fit overrides (owned by one agent)
   Sections: The Yard, In the Yard Now, Builders, Promise, Guide/FAQ, Visit, footer.
   Goal: each section fits one screen at 100% zoom on 1920x1080 and 1366x768. */

/* ==========================================================================
   THE YARD (30,000): number on the left, copy on the right
   ========================================================================== */
.yard { min-height: min(calc(100svh - 120px), 780px); }
/* .section's shorthand padding was wiping the .wrap gutter, so text touched the screen edge on laptops */
.yard .wrap.section, .builders .wrap.section { padding-left: var(--gutter); padding-right: var(--gutter); }
.yard .wrap.section { padding-top: clamp(40px, 7vh, 88px); padding-bottom: clamp(40px, 7vh, 88px); }

@media (min-width: 861px) {
  .yard .wrap.section {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    column-gap: clamp(40px, 6vw, 110px);
    align-items: center;
  }
  .yard .wrap.section > .eyebrow { grid-column: 1 / -1; margin-bottom: clamp(10px, 2vh, 22px); }
  .yard-big { font-size: clamp(5rem, 1.6rem + 9.4vw, 11rem); }
  .yard .yard-copy { margin-top: 0; max-width: 560px; }
  /* the copy now sits on the right, so the right half of the photo is shaded too */
  .yard::before { background: linear-gradient(90deg, rgba(22,17,13,.9) 0%, rgba(22,17,13,.66) 45%, rgba(22,17,13,.78) 100%), linear-gradient(0deg, var(--ink), transparent 25%, transparent 75%, var(--ink)); }
}

/* 30,000: the comma has its own descender room, the caption never touches it */
.yard .yard-big { line-height: 1 !important; padding-bottom: .06em; }
.yard .yard-big small { margin-top: 14px !important; line-height: 1.6; }

@media (max-width: 860px) {
  .yard::before { background: linear-gradient(0deg, var(--ink), rgba(22,17,13,.72) 22%, rgba(22,17,13,.72) 78%, var(--ink)); }
}

/* tighter, even line rhythm in the copy */
.yard .yard-copy .lead { line-height: 1.3; }
.yard .yard-points { margin: 16px 0 24px; gap: 8px; }
.yard .yard-points li { line-height: 1.5; }

/* ==========================================================================
   IN THE YARD NOW: one elegant horizontal scroll-snap strip
   ========================================================================== */
#in-the-yard .in-yard-head { margin-bottom: clamp(18px, 2.6vh, 30px); gap: clamp(24px, 4vw, 72px); }
#in-the-yard .in-yard-head h2 { margin-bottom: 0; }
#in-the-yard .in-yard-head .lead { margin-bottom: 16px !important; }

#in-the-yard .yard-gallery {
  --tile-h: clamp(220px, calc(100svh - 400px), 420px);
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-template-rows: auto;
  grid-auto-columns: auto;
  gap: clamp(12px, 1.2vw, 18px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  padding-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(194, 162, 115, .55) rgba(214, 186, 140, .08);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
}
#in-the-yard .yard-gallery::-webkit-scrollbar { height: 6px; }
#in-the-yard .yard-gallery::-webkit-scrollbar-track { background: rgba(214, 186, 140, .08); border-radius: 6px; }
#in-the-yard .yard-gallery::-webkit-scrollbar-thumb { background: rgba(194, 162, 115, .55); border-radius: 6px; }

#in-the-yard .yard-item,
#in-the-yard .yard-item.wide { grid-column: auto; scroll-snap-align: start; width: max(calc(var(--tile-h) * .8), 230px); }
#in-the-yard .yard-item.wide { width: calc(var(--tile-h) * 1.5); }
#in-the-yard .yard-open,
#in-the-yard .yard-item:not(.wide) .yard-open { aspect-ratio: auto; height: var(--tile-h); }
#in-the-yard .yard-item figcaption { padding-top: 10px; flex-direction: column; align-items: flex-start; gap: 3px; }
#in-the-yard .yi-sub { text-align: left; }
/* tiles further along the strip are always visible, no waiting for a reveal */
#in-the-yard .yard-item.reveal { opacity: 1; transform: none; }

@media (max-width: 600px) {
  #in-the-yard .yard-gallery { --tile-h: 260px; }
  #in-the-yard .yard-item, #in-the-yard .yard-item.wide { width: 72vw; }
  #in-the-yard .yard-open,
  #in-the-yard .yard-item:not(.wide) .yard-open { height: 260px; }
}

/* ==========================================================================
   BUILDERS
   ========================================================================== */
.builders .wrap.section { padding-top: clamp(44px, 8vh, 96px); padding-bottom: clamp(44px, 8vh, 96px); gap: 18px; }
.builders .builders-big { font-size: clamp(2.3rem, 1.3rem + 2.9vw, 4.4rem); max-width: 22ch; line-height: 1.08; margin: 0; }
.builders .builder-types { margin: 2px 0 4px; }

/* ==========================================================================
   PROMISE
   ========================================================================== */
.promise.section { padding-bottom: clamp(48px, 7vh, 96px); }
.promise blockquote { font-size: clamp(2.2rem, 1.4rem + 2.8vw, 4.4rem); }
.promise cite { margin-top: 22px; }

/* ==========================================================================
   GUIDE / FAQ: compact rows, slimmer aside
   ========================================================================== */
@media (min-width: 601px) {
  #guide > .wrap, #visit > .wrap, #in-the-yard > .wrap { padding-top: clamp(28px, 4.4vh, 52px); padding-bottom: clamp(28px, 4.4vh, 52px); }
}
@media (min-width: 861px) {
  #guide .faq-grid { grid-template-columns: minmax(0, .66fr) minmax(0, 1.34fr); gap: clamp(36px, 5vw, 96px); }
  #guide .faq-aside h2 { margin: 16px 0 16px !important; }
  #guide .faq-aside p { max-width: 36ch; margin-bottom: 22px; }
}
#guide .faq summary { padding: clamp(10px, 1.45vh, 15px) 0; font-size: clamp(1.15rem, 1rem + .35vw, 1.4rem); line-height: 1.25; }
#guide .faq-body { padding-bottom: 16px; }

/* ==========================================================================
   VISIT: heading across the top, form left, contact card and map right
   ========================================================================== */
#visit .visit-grid { align-items: start; }
#visit .form { gap: 14px; margin-top: 22px; }
#visit .form-row { gap: 14px; }
#visit .field textarea { min-height: 58px; height: 64px; }
#visit .visit-card { gap: 16px; padding: clamp(22px, 2.2vw, 34px); }
#visit .visit-row { padding-bottom: 14px; }
#visit .visit-row .v { font-size: clamp(1.15rem, 1rem + .3vw, 1.35rem); }
#visit .visit-map { aspect-ratio: auto; height: clamp(130px, 19vh, 200px); }

@media (min-width: 861px) {
  #visit .visit-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    column-gap: clamp(36px, 5vw, 90px);
    row-gap: 0;
  }
  #visit .visit-grid > div:first-child { display: contents; }
  #visit .visit-grid > div:first-child > .eyebrow { grid-column: 1; grid-row: 1; justify-self: start; }
  #visit .visit-grid > div:first-child > h2 { grid-column: 1; grid-row: 2; margin: 14px 0 0 !important; }
  #visit .visit-grid > div:first-child > .lead { grid-column: 2; grid-row: 1 / 3; align-self: end; margin: 0; }
  #visit .visit-grid > div:first-child > .form { grid-column: 1; grid-row: 3; }
  #visit .visit-card { grid-column: 2; grid-row: 3; margin-top: 22px; grid-template-columns: repeat(3, auto); justify-content: space-between; column-gap: 20px; }
  #visit .visit-card .visit-row:first-child { grid-column: 1 / -1; }
  #visit .visit-map { grid-column: 1 / -1; }
  /* send button and the note share one line */
  #visit .form { grid-template-columns: auto 1fr; column-gap: 22px; align-items: center; }
  #visit .form > .form-row, #visit .form > .field { grid-column: 1 / -1; }
  #visit .form .form-note { margin: 0; max-width: 34ch; }
  #visit .visit-grid > div:first-child > h2 { margin-top: 10px !important; }
  #visit .form, #visit .visit-card { margin-top: 18px; }
  #visit .visit-card { gap: 12px; padding: clamp(20px, 1.8vw, 30px); }
  #visit .visit-row { padding-bottom: 10px; }
  /* directions sit beside the address instead of under it */
  #visit .visit-card .visit-row:first-child { position: relative; }
  #visit .visit-card .visit-row:first-child .link-line { position: absolute; right: 0; bottom: 12px; margin: 0 !important; }
  #visit .visit-map { height: clamp(108px, 17vh, 190px); }
}

/* ==========================================================================
   FOOTER: a little less air
   ========================================================================== */
.footer { padding-top: clamp(44px, 5vw, 72px); }
.footer-big { margin: clamp(28px, 3.6vw, 52px) 0 18px; }
