/* ============================================================
   Alameda Estate Sales — home page (index.html)
   Requires site.css. Hero, trust strip, testimonials, services,
   gallery preview, Instagram, contact.
   ============================================================ */

/* ---- Hero: centered full-bleed, logo prominent
        (per client note: logo read as "hidden" in the mockup) ---- */
.hero-b{position:relative;color:var(--paper);background:url('../img/vaulted-living-room.webp') center/cover no-repeat;}
/* Top stop raised .55 -> .62 for contrast. The 12px eyebrow measured 4.12:1
   against the lightest part of the photo at a 375px viewport — the worst case,
   because the hero crops to a paler region there. It clears at 4.81 now.
   Measured by compositing the real image under this gradient, so RE-MEASURE
   if the hero photo is ever swapped: the number is photo-specific. */
.hero-b .overlay{background:linear-gradient(rgba(35,47,29,.62),rgba(35,47,29,.80));}
.hero-b .inner{max-width:820px;margin:0 auto;padding:84px 24px 72px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:20px}
.hero-b .logo{height:76px;width:auto;filter:drop-shadow(0 2px 10px rgba(0,0,0,.25))}
.hero-b h1{font-family:var(--display);font-weight:500;font-size:clamp(30px,4.2vw,46px);line-height:1.18}
.hero-b h1 em{font-style:italic;color:var(--brass-soft)}
/* Eyebrow text is --paper, NOT --brass-soft. Brass-soft here measured 2.22:1
   against the worst pixel of the photo+overlay composite -- less than half the
   4.5 required at 12px. This is the one case darkening the overlay cannot fix:
   a mid-tone brass over a mid-tone composite gets WORSE as the background moves
   toward its own luminance. Cream measures 4.79 in the same position.
   The brand accent is kept as the border and the ::before dot, which are
   decorative and carry no text-contrast requirement.
   (The lightest brass that would clear 4.5 here is #FFEAA1 -- a pale yellow,
   off-palette, and with no margin at all. Re-measure if the hero photo changes.) */
.hero-b .tag{background:transparent;border-color:var(--brass-soft);color:var(--paper)}
.hero-b .tag::before{background:var(--pine);border-color:var(--brass-soft)}
.hero-b .actions{display:flex;gap:14px;flex-wrap:wrap;justify-content:center;margin-top:6px}

/* ---- Trust strip below hero ---- */
.trust-strip{background:transparent}
.trust-inner{max-width:var(--maxw);margin:0 auto;padding:18px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:13.5px;color:var(--ink-soft);border-bottom:1px solid rgba(55,73,46,.12)}
/* --brass-ink, not --brass: the star row is the only thing carrying the rating
   (no numeric "5.0" sits beside it), and #A9853C on paper is 3.14:1. The ink
   token is 5.08 on paper, 5.56 on white, and reads more solid at this size. */
.stars{color:var(--brass-ink);letter-spacing:2px;font-size:15px}
.trust-inner strong{color:var(--pine);font-weight:600}
.trust-line{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px}
.trust-line .dash{color:rgba(55,73,46,.45)}
.cities{display:flex;flex-wrap:wrap;gap:4px 8px}
.cities span{white-space:nowrap}
.cities span:not(:last-child)::after{content:'\00b7';margin-left:8px;color:rgba(55,73,46,.4)}

/* Keep the trust strip on ONE line on desktop (mobile may wrap — see 720px).
   .trust-inner is capped at --maxw, so available width is a constant 1052px
   at every viewport >=1100px; tightening the separators buys the ~82px the
   10-city list needs. Gaps and dot spacing are cut before font-size, because
   this audience skews older and the strip is already the smallest type on
   the page. Deliberately NOT flex-wrap:nowrap — if more cities are added
   later it should wrap to two lines, not overflow the page. */
@media(min-width:921px){
  .trust-line{gap:6px 8px}
  .cities{column-gap:4px;font-size:13px}
  .cities span:not(:last-child)::after{margin-left:4px}
  .stars{letter-spacing:1px}
}

/* ---- Section scaffolding ---- */
section{padding:78px 0}
.section-head{max-width:660px;margin-bottom:44px}
.section-head h2{font-family:var(--display);font-weight:500;font-size:clamp(27px,3.3vw,38px);line-height:1.15;color:var(--pine);margin:16px 0 12px}
.section-head p{color:var(--ink-soft);font-size:16.5px}
.section-head.center{margin-left:auto;margin-right:auto;text-align:center}

/* ---- Testimonials (first section — client's #1 credibility ask) ---- */
.testimonials{background:var(--paper);padding-top:64px;border-bottom:1px solid rgba(55,73,46,.12)}
.t-summary{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:30px;font-size:14px;color:var(--ink-soft)}
.t-summary .stars{font-size:17px}
.t-summary strong{color:var(--pine)}
.t-rail-wrap{position:relative}
.t-rail{display:flex;gap:18px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding-bottom:6px}
.t-rail::-webkit-scrollbar{display:none}
.t-card{
  flex:0 0 calc((100% - 36px)/3);scroll-snap-align:start;
  background:#fff;border:1px solid rgba(55,73,46,.16);padding:28px 26px 24px;
  display:flex;flex-direction:column;gap:14px;align-self:flex-start;
  box-shadow:0 2px 10px rgba(35,47,29,.05);
}
.t-quote .t-full{display:none}
.t-card.expanded .t-preview{display:none}
.t-card.expanded .t-full{display:inline}
.t-stars{color:var(--brass-ink);letter-spacing:2px;font-size:14px}
.t-quote{font-family:var(--display);font-size:16.5px;line-height:1.55;color:var(--ink);flex:1}
.t-card footer{font-size:13.5px;background:none;border:none;padding:0}
.t-card footer .t-who{display:block;color:var(--ink-soft);margin-bottom:6px}
.t-card footer .t-who strong{color:var(--pine);font-weight:600}
/* --brass-ink, not --brass: #A9853C on the white card is 3.44:1, under AA.
   padding takes the target from 16px to 28px tall, clearing the WCAG 2.2
   AA floor of 24px without changing how the control looks. */
.t-more{background:none;border:none;color:var(--brass-ink);font-weight:600;font-size:13px;cursor:pointer;padding:6px 0;font-family:var(--body)}
.t-more:hover{color:var(--pine);text-decoration:underline}
.t-nav{display:flex;justify-content:space-between;align-items:center;margin-top:18px}
/* The dot was a 26x3 button — a 3px-tall tap target, far under the WCAG 2.2
   AA floor of 24px and unusable by touch or with any motor impairment.
   The button is now 26x24 and transparent; the visible 3px bar is drawn by
   ::before and the progress fill is centred over it. Nothing looks different,
   the hit area is 8x taller. */
.t-dots{display:flex;gap:8px;align-items:center}
.t-dots .dot{
  width:26px;height:24px;background:none;border:none;cursor:pointer;
  position:relative;padding:0;display:flex;align-items:center;
}
.t-dots .dot::before{content:'';display:block;width:100%;height:3px;background:rgba(55,73,46,.18)}
.t-dots .dot .fill{position:absolute;left:0;right:0;top:50%;margin-top:-1.5px;height:3px;background:var(--brass);transform:scaleX(0);transform-origin:left}
.t-dots .dot.active .fill{animation:fillbar var(--interval,6s) linear forwards}
@keyframes fillbar{to{transform:scaleX(1)}}
.paused .t-dots .dot.active .fill{animation-play-state:paused}
.arrows{display:flex;gap:8px}
.arrow{width:38px;height:38px;border:1px solid rgba(55,73,46,.25);background:#fff;cursor:pointer;font-size:16px;color:var(--pine);transition:.2s}
.arrow:hover{border-color:var(--brass);color:var(--brass)}

/* ---- What we do ---- */
#what-we-do{background:var(--brass-soft)}
#what-we-do .section-head h2{color:var(--pine-deep)}
/* #4A4433 on the brass panel measured 4.10:1 — six steps darker clears AA. */
#what-we-do .section-head p{color:#443E2D}
#what-we-do .tag{background:var(--paper);border-color:var(--pine);color:var(--pine)}
#what-we-do .tag::before{background:var(--brass-soft);border-color:var(--pine)}
.process{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:rgba(55,73,46,.28);border:1px solid rgba(55,73,46,.28)}
.step{background:#fff;padding:30px 26px 34px}
.step h3{font-family:var(--display);font-weight:600;font-size:20px;color:var(--pine);margin-bottom:10px;line-height:1.25}
.step p{font-size:14.5px;color:var(--ink-soft)}
.step ul{list-style:none;margin-top:8px}
.step ul li{font-size:14.5px;color:var(--ink-soft);padding:5px 0 5px 20px;position:relative}
.step ul li::before{content:'\2014';position:absolute;left:0;color:var(--brass)}

.services-cta{margin-top:34px;display:flex;align-items:center;justify-content:space-between;gap:22px;flex-wrap:wrap}
.services-cta p{font-family:var(--display);font-size:clamp(17px,2.1vw,21px);color:var(--pine-deep);max-width:52ch}
.services-cta .btn:hover{background:var(--pine-deep) !important;color:var(--paper) !important}

/* ---- Gallery preview ---- */
.gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.g-tile{
  display:block;aspect-ratio:4/3;overflow:hidden;border:1px solid rgba(55,73,46,.18);
}
.g-tile img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.g-tile:hover img{transform:scale(1.04)}
.gallery-cta{margin-top:28px;text-align:center}

/* ---- Instagram ----
   .ig-chips / .ig-chip removed with the placeholder date chips. If TODO 3
   brings per-post permalink chips back, recover those rules from git. */
.insta{background:var(--sage)}
.ig-follow{text-align:center}

/* ---- Contact ---- */
.contact{background:var(--pine);color:var(--paper)}
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center}
.contact h2{font-family:var(--display);font-weight:500;font-size:clamp(27px,3.3vw,38px);line-height:1.15;margin:16px 0 14px}
.contact h2 em{font-style:italic;color:var(--brass-soft)}
.contact p{color:rgba(245,245,239,.8);max-width:46ch}
/* Label text uses --brass-lift: --brass-soft on --pine is 4.13:1, just under
   AA at this size. The border keeps the brand --brass-soft — a 1px rule is
   not text and carries no contrast requirement. */
.contact .tag{background:transparent;border-color:var(--brass-soft);color:var(--brass-lift)}
.contact .tag::before{background:var(--pine);border-color:var(--brass-soft)}
/* padding was a flat 40px. With min-width:auto the card could not shrink below
   its content, so at 320px it rendered 348px wide inside a 320px parent and
   scrolled the whole page sideways: the 267px unbreakable email + 80px padding.
   clamp() gives the padding back gradually; min-width:0 lets the card shrink;
   the wrap rule below lets the address break rather than set the floor. */
.contact-card{background:var(--pine-deep);border:1px solid rgba(199,164,91,.3);padding:clamp(20px,6vw,40px);min-width:0}
.contact-line{display:flex;flex-direction:column;gap:4px;padding:16px 0;border-bottom:1px solid rgba(245,245,239,.12)}
.contact-line:last-of-type{border-bottom:none}
.contact-line .label{font-size:11px;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--brass-soft)}
.contact-line a,.contact-line .value{font-family:var(--display);font-size:clamp(19px,2.4vw,23px);text-decoration:none;color:var(--paper);transition:.2s;overflow-wrap:anywhere}
.contact-line a:hover{color:var(--brass-soft)}
.contact-card .btn{width:100%;text-align:center;margin-top:22px}

/* ---- Responsive ---- */
@media(max-width:920px){
  .trust-inner{justify-content:center;text-align:center}
  .trust-line{justify-content:center}
  .cities{justify-content:center}
  .process{grid-template-columns:repeat(2,1fr)}
  .contact-grid{grid-template-columns:1fr}
  .t-card{flex-basis:calc((100% - 18px)/2)}
  .gallery-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:720px){
  .trust-line .dash{display:none}
  .trust-line{gap:4px 10px}
  .cities{gap:6px 14px}
  .cities span:not(:last-child)::after{content:none}
  .process,.gallery-grid{grid-template-columns:1fr}
  .t-card{flex-basis:88%}
  section{padding:60px 0}

  /* At 1-up the rail renders one dot per review, so .t-nav was 314px of
     content (7 dots at 26+8 = 230, plus 84 of arrows) inside a 257px column
     and pushed the whole page sideways. This was always true but sat behind
     the larger .contact-card overflow, so only fixing that exposed it.
     Wrapping rather than shrinking, so it still holds if reviews are added. */
  .t-nav{flex-wrap:wrap;gap:14px}
  .t-dots{flex-wrap:wrap;row-gap:10px}
}

/* The auto-advancing rail is the one piece of motion on the page.
   Reduced-motion kills the progress animation; testimonials.js
   separately skips the auto-advance timer. Keep both. */
@media(prefers-reduced-motion:reduce){
  .t-rail{scroll-behavior:auto}
  .t-dots .dot.active .fill{animation:none;transform:scaleX(1)}
}
