/* ============================================================
   TAMON — Homepage sections (loaded on the front page, after main.css)
   · Brands: the opening cards from main.css, carrying a name and a service and nothing else.
   · Featured projects: a rail of upright photographs, read across rather than down, so it never reads as more
     of the same cards. It moves by wheel, trackpad, touch, the arrows or the keyboard, and snaps card to card.
   ============================================================ */

/* ---------- Brands ---------- */
/* with two lines in the panel the service can be set at reading size, not as a footnote */
.project--brand .project__text{margin-top:.7rem;font-size:var(--fs-body);line-height:1.5;color:var(--text-soft)}

/* ---------- Featured projects ---------- */
.featured{position:relative;padding-block:var(--section-y);border-top:1px solid var(--hair)}
.featured__head{display:flex;flex-wrap:wrap;align-items:end;gap:1rem clamp(1.5rem,4vw,3rem);
  margin-bottom:clamp(1.6rem,3vw,2.6rem)}
.featured__lede{flex:1 1 16rem;max-width:38ch;font-size:var(--fs-sm);line-height:1.55;color:var(--text-dim)}

/* the arrows are for a mouse on a wide screen; everywhere else the rail is swiped or scrolled. They stay out
   until site.js knows the rail overflows, so a rail that fits never shows controls that do nothing. */
.featured__controls{display:none;gap:.5rem;margin-left:auto}
@media (min-width:1024px) and (hover:hover){.featured__controls:not([hidden]){display:flex}}
.featured__arrow{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;
  border:0;border-radius:50%;background:transparent;color:var(--text-soft);cursor:pointer;
  box-shadow:inset 0 0 0 1px var(--hair-strong);
  transition:color .3s var(--ease-out),background-color .3s var(--ease-out),box-shadow .3s var(--ease-out)}
.featured__arrow:hover:not(:disabled){color:var(--text);background-color:rgb(233 239 244 / .07);
  box-shadow:inset 0 0 0 1px rgb(233 239 244 / .38)}
.featured__arrow:disabled{opacity:.3;cursor:default}

.featured__rail{display:grid;grid-auto-flow:column;grid-auto-columns:82%;gap:clamp(1rem,2.2vw,1.75rem);
  overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-behavior:smooth;
  padding-bottom:.75rem;scrollbar-width:none}
.featured__rail::-webkit-scrollbar{display:none}
.featured__rail:focus-visible{outline:2px solid var(--grad-a);outline-offset:6px;border-radius:var(--radius-sm)}
@media (min-width:600px){.featured__rail{grid-auto-columns:46%}}
@media (min-width:1024px){.featured__rail{grid-auto-columns:calc((100% - 2 * clamp(1rem,2.2vw,1.75rem)) / 3)}}

.ft-card{min-width:0;scroll-snap-align:start}
.ft-card__link{display:block;color:inherit}
/* upright, and taller than the cards above: the photograph is the point here */
.ft-card__frame{position:relative;display:block;aspect-ratio:4 / 5;overflow:hidden;overflow:clip;
  border-radius:var(--radius-lg);background-color:var(--tint,var(--ink-2))}
.ft-card__frame img{width:100%;height:100%;max-width:none;object-fit:cover;object-position:var(--pos,50% 50%);
  scale:1.05;transition:scale .9s var(--ease-out)}
.ft-card__link:is(:hover,:focus-visible) .ft-card__frame img{scale:1}
.ft-card__text{display:block;padding-top:clamp(.9rem,2vw,1.25rem)}
.ft-card__name{display:block;font-family:var(--display);font-weight:300;font-size:clamp(1.5rem,1.1rem + 1vw,2.15rem);
  line-height:1.05;letter-spacing:-.025em;color:var(--text)}
.ft-card__note{display:block;margin-top:.45rem;font-size:var(--fs-sm);line-height:1.5;color:var(--text-dim)}
/* the neon rule draws itself across as the card is taken up */
.ft-card__line{margin-top:clamp(.9rem,2vw,1.25rem);--neon-len:260px;transform-origin:0 50%;scale:0 1;
  transition:scale .6s var(--ease-out)}
.ft-card__link:is(:hover,:focus-visible) .ft-card__line{scale:1 1}

@media (prefers-reduced-motion:reduce){
  .featured__rail{scroll-behavior:auto}
  .ft-card__frame img,.ft-card__line{transition-duration:.01ms}
  .ft-card__line{scale:1 1}
}
