/* youdonbuycar — home page: hero slider extras, finder, "what we do", make tiles, featured and latest vehicles,
   the request band and the contact section. Loaded only by the home page, after site.css and catalog.css (which
   supply the vehicle card, status badges, section headings and the base hero). Brand colours only (navy, gold, white,
   ink and tints of them); gold is used only as a background, never as text on white. 800px is the phone breakpoint. */

/* ---------- hero slider ---------- */
/* which part of a cropped picture stays in view (the administrator chooses it per slide) */
.hs-bg img.focus-left{object-position:22% 50%}
.hs-bg img.focus-center{object-position:50% 50%}
.hs-bg img.focus-right{object-position:72% 50%}

/* later slides use <h2>: give them the same look and word-by-word rise as the first slide's <h1> */
.hs h2{margin:26px 0 0}
.hs h2 .w{display:inline-block;overflow:hidden;vertical-align:bottom;padding-bottom:.06em}
.hs h2 .w>span{display:inline-block;transform:translateY(110%)}
.hs.on h2 .w>span{animation:rise 1s var(--ease) forwards;animation-delay:calc(.2s + var(--i)*.07s)}

/* controls (the Previous and Next arrows; there are no dots or counter): hidden in the markup, shown by home.js so they never appear when scripts cannot run them */
.hero-ctl[hidden]{display:none}
.h-arrows{display:flex;gap:10px;margin-left:auto}
.h-arrows button{display:grid;place-items:center;width:48px;height:48px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.08);color:#fff;cursor:pointer;transition:background .25s,color .25s,border-color .25s}
.h-arrows button:hover{background:var(--gold);border-color:var(--gold);color:var(--ink)}
.h-arrows svg.i{width:20px;height:20px}

/* ---------- sections ---------- */
.sec-pad{padding:88px 0}
.sec-top0{padding-top:0}
.what,.latest{background:var(--paper)}
.what.sec-pad{padding-top:72px}
.center{display:flex;justify-content:center;margin-top:36px}
.ico{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:var(--navy-soft);color:var(--navy)}
.ico svg.i{width:22px;height:22px}

/* ---------- finder: overlaps the bottom of the hero ---------- */
.search-wrap{position:relative;z-index:6;margin-top:-72px}
.search{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:14px;align-items:end;padding:22px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 30px 60px -30px rgba(17,19,24,.45)}
.sf{display:flex;flex-direction:column;gap:6px;min-width:0}
.sf .lbl{margin:0}
.search .btn{height:46px;padding:0 24px}
.search-note{margin:12px 6px 0;font:500 13px/20px var(--ft);color:var(--subtle)}

/* ---------- what we do ---------- */
.what-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0;padding:0;list-style:none}
.what-list li{display:flex;align-items:center;gap:14px;padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:16px}
.what-list b{font:600 15px/20px var(--fd)}

/* ---------- browse by make ---------- */
.makes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0;padding:0;list-style:none}
.mk-t{display:flex;align-items:center;gap:14px;height:100%;padding:18px;background:#fff;border:1px solid var(--line);border-radius:16px;transition:border-color .25s,transform .35s var(--ease)}
.mk-t:hover{border-color:var(--navy);transform:translateY(-2px)}
.mono-l{display:grid;place-items:center;flex:none;width:48px;height:48px;border-radius:12px;background:var(--navy);color:#fff;font:700 14px var(--fm);letter-spacing:.04em}
.mk-n{display:flex;flex-direction:column;min-width:0}
.mk-n b{font:700 16px/22px var(--fd);overflow-wrap:anywhere}
.mk-n span{font:500 13px/18px var(--ft);color:var(--subtle)}
.mk-t>svg.i{flex:none;width:18px;height:18px;margin-left:auto;color:var(--navy)}

/* ---------- featured vehicles ---------- */
.fc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.fc-grid:has(> .fc:only-child){grid-template-columns:minmax(0,720px)}
.fc{display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:22px}
.fc-media{position:relative;aspect-ratio:16/10;background:var(--navy-soft)}
.fc-media img{display:block;width:100%;height:100%;object-fit:cover}
.fc-media .vc-tags{left:18px;top:18px}
.fc-b{display:flex;flex-direction:column;flex:1;gap:12px;padding:24px 26px 28px}
.fc-meta{font:700 11px/16px var(--fd);letter-spacing:.1em;text-transform:uppercase;color:var(--subtle)}
.fc h3{margin:0;font:800 26px/32px var(--fd);letter-spacing:-.02em}
.fc h3 a:hover{text-decoration:underline;text-underline-offset:4px}
.fc p{margin:0;color:var(--muted)}
.specs4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 20px;margin:0;padding:14px 0;border-top:1px solid var(--line-2);border-bottom:1px solid var(--line-2)}
.specs4 .lbl{margin:0 0 2px}
.specs4 dd{margin:0;font:700 15px/20px var(--fd);overflow-wrap:anywhere}
.fc .price strong{font:800 28px/34px var(--fd);letter-spacing:-.02em}
.fc .btns{display:flex;gap:10px;flex-wrap:wrap;margin-top:auto;padding-top:6px}

/* ---------- latest vehicles ---------- */
.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}
.lt-item{display:flex;min-width:0}
.lt-item>.vc{flex:1;min-width:0}

/* ---------- request-a-vehicle band ---------- */
.band{display:flex;align-items:center;justify-content:space-between;gap:32px;padding:56px;border-radius:28px;color:#fff;background:radial-gradient(60% 130% at 88% 0%,rgba(var(--gold-rgb),.3),transparent 70%),var(--navy)}
.band .h-l{margin-top:16px}
.band p{max-width:520px;margin:14px 0 0;color:var(--on-navy-muted)}
.band .btns{display:flex;gap:12px;flex-wrap:wrap}

/* ---------- get in touch ---------- */
.touch-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.tc{display:flex;flex-direction:column;gap:6px;padding:22px;background:#fff;border:1px solid var(--line);border-radius:18px}
a.tc:hover{border-color:var(--navy)}
.tc .ico{margin-bottom:8px}
.tc .lbl{margin:0}
.tc b{font:700 18px/24px var(--fd);overflow-wrap:anywhere}

/* ---------- tablet ---------- */
@media (max-width:1100px){
  .search{grid-template-columns:repeat(2,minmax(0,1fr))}
  .search .btn{grid-column:1 / -1}
  .what-list,.makes{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .band{padding:44px 36px}
}

/* ---------- phone (same 800px switch as the rest of the site) ---------- */
@media (max-width:800px){
  .sec-pad{padding:56px 0}
  .sec-top0{padding-top:0}
  .what.sec-pad{padding-top:48px}
  .search-wrap{margin-top:-48px}
  .search{grid-template-columns:1fr;padding:18px}
  .search .btn{height:52px}
  .fc-grid,.fc-grid:has(> .fc:only-child){grid-template-columns:1fr}
  .fc-b{padding:20px}
  .fc h3{font-size:22px;line-height:28px}
  .band{flex-direction:column;align-items:flex-start;gap:24px;padding:32px 24px}
  .band .btns{width:100%}
  .band .btns .btn{flex:1 1 100%}
  .h-arrows button{width:44px;height:44px}
  .center{margin-top:28px}
}
@media (max-width:560px){
  .what-list,.makes,.grid4{grid-template-columns:1fr}
  .touch-grid{grid-template-columns:1fr}
}

/* ---------- reduced motion (site.css already switches animations and transitions off) ---------- */
@media (prefers-reduced-motion:reduce){
  .hs h2 .w>span{transform:none!important}
  .mk-t:hover{transform:none}
}

/* ---------- hero layout on desktop ----------
   The headline is at most two lines (it scales with the screen), the supporting text has room above and below, the two buttons
   sit side by side with clear space around them, and the Previous/Next arrows stay at the right, above the overlapping finder.
   The finder still overlaps the bottom of the hero as before: the hero is tall enough that it never covers the text or buttons.
   The phone layout (800px and narrower) is unchanged. */
@media (min-width:801px){
  .hero{height:clamp(780px,100svh,900px)}
  .hero .hs-copy{top:clamp(128px,16vh,164px)}
  .hs-copy .in{max-width:100%}
  /* The size is the smaller of the usual responsive size and the size at which the headline's longest line (--hl characters,
     set by the template) fits the page width, so a long headline becomes somewhat smaller instead of using a third line.
     It never goes below 28px. --avail is the width of the text area minus a little room for a scrollbar. */
  .hs .h-xl{--avail:calc(min(100vw,1280px) - 120px);margin:16px 0 0;font-size:clamp(28px,min(clamp(40px,4.5vw,66px),calc(var(--avail) / (var(--hl,24) * var(--k,.66)))),66px);line-height:1.06;letter-spacing:-.035em;text-wrap:balance}
  .hs .lead{max-width:600px;margin:26px 0 34px;font-size:clamp(17px,1.3vw,19px);line-height:1.6}
  .hs .btns{display:flex;flex-wrap:nowrap;align-items:center;gap:14px}
  .hs .btns .btn{flex:none;height:54px;padding:0 28px;white-space:nowrap}
  .hero-ctl{bottom:104px}
  .hero-ctl .wrap{justify-content:flex-end}
  .h-arrows{margin-left:0}
}
/* the text area is narrower between 801px and 1180px (32px page padding) */
@media (min-width:801px) and (max-width:1180px){
  .hs .h-xl{--avail:calc(100vw - 88px)}
}
