/* =====================================================================
   RISHAV AGARWAL v2 · community.css  (page layer for community.html)
   Loads after site.css. Spec: _concepts/FINAL-SPEC.md §7.
   Uses only shared tokens; never restyles a shared component globally.

   CONTENTS
    1  Masthead: lede + CTA row, coins, city line
    2  Three ways to show up: plaques + format chips
    3  From the rooms: masonry gallery
    4  Speakers wall: print cards
    5  Staggered reveal (.stg – driven by community.js)
    6  Responsive
   ===================================================================== */


/* =====================================================================
   1  MASTHEAD
   ===================================================================== */
/* "The Ecosystem" starts with a T, whose ink already sits on the gutter: no optical pull
   (site.css .mast defaults to -.06em for a leading "I") */
.masthead .mast{--mast-ol:0}
.cm-row{margin-top:48px;align-items:end;row-gap:28px}
.cm-row .lede{grid-column:1/7}
.head .lede{max-width:none;text-wrap:balance}   /* section subtexts: one line wherever it fits; on phones even lines, no orphan */
.cm-row__cta{grid-column:9/13;justify-self:end}

/* three small coins, centred; "30,000+" is 3.79em so all three numerals sit at 17cqi */
.cm-coins{margin-top:clamp(72px,8vw,120px)}
.cm-coins .coin{--cn:17cqi}

/* city line (replaces the v1 marquee): spark = sprite SVG, never a typed glyph */
.cities{margin-top:clamp(48px,5vw,72px);font-size:15px;line-height:1.6;color:var(--ivory-2);text-align:center;white-space:nowrap}
.cities__s{display:inline-block;width:9px;height:9px;margin:0 .55em;vertical-align:.06em;color:var(--muted)}
.cities__br{display:none}


/* =====================================================================
   2  THREE WAYS TO SHOW UP
   ===================================================================== */
.plqs{row-gap:var(--gap)}
.plq{grid-column:span 4;position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:22px;min-height:clamp(272px,22vw,304px);padding:28px;border:1px solid var(--line);background:var(--ink-2);color:var(--ivory);transition:border-color .4s var(--ease),background-color .4s var(--ease)}
.plq:hover{border-color:var(--line-2);background-color:#171512}
/* logo row is a fixed 60px box so the descriptions share one top line; logo heights are
   optically balanced (same ratios as the home sub-links, §5.11). They are the subject of
   the section, so they read as brand marks, not badges: 50 / 60 / 42 (every file still
   covers 2x DPR, BPC upscales ~6%) */
.plq__logo{display:flex;align-items:center;height:60px}
.plq__logo img{width:auto;height:50px;max-width:100%;object-fit:contain;object-position:left center}
.plq__logo img[src*="startuptales"]{height:46px}
.plq__logo img[src*="karostartup"]{height:40px}
.plq__logo img[src*="breakintovc"]{height:24px}
.plq__logo img[src*="community-bpc"]{height:42px}
.plq p{font-size:15.5px;line-height:1.6;color:var(--ivory-2);max-width:42ch}
.plq .link-u{margin-top:auto}
/* the whole plaque is the link: hovering it drives the underline + icon */
.plq:hover .link-u::after{transform:scaleX(0);transform-origin:right}
.plq:hover .link-u svg{transform:translate(2px,-2px)}

.cm-chips{margin-top:28px}


/* =====================================================================
   3  FROM THE ROOMS – CSS-column masonry, full colour, lightbox via [data-gallery]
   ===================================================================== */
.mas{column-count:3;column-gap:12px}
.mas figure{display:block;margin:0 0 12px;break-inside:avoid;-webkit-column-break-inside:avoid;border-radius:var(--r-mosaic);overflow:hidden;background:var(--ink-3);cursor:zoom-in;-webkit-tap-highlight-color:transparent}
.mas img{width:100%;height:auto;transition:transform 1.4s var(--ease)}
.mas figure:hover img{transform:scale(1.04)}
.mas figure:focus-visible{outline-offset:3px;border-radius:var(--r-mosaic)}


/* =====================================================================
   4  SPEAKERS WALL – ivory print cards, alternating tilt
   ===================================================================== */
.wall{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 20px}
.wall__it{display:flex;min-width:0}
/* cards in a row share one height even when a title takes two lines */
.wall .pcard{flex:1;display:flex;flex-direction:column}
.wall .pcard__band{flex:1}
.wall__it:nth-child(4n+1){--tilt:-1.2deg}
.wall__it:nth-child(4n+2){--tilt:.8deg}
.wall__it:nth-child(4n+3){--tilt:-.6deg}
.wall__it:nth-child(4n+4){--tilt:1.2deg}
.wall .pcard{rotate:var(--tilt,0deg);cursor:zoom-in;transition:transform .6s var(--ease);-webkit-tap-highlight-color:transparent}
.wall .pcard:hover{transform:translateY(-4px)}
.wall .pcard__ph{--ar:4/3}
.wall .pcard__band{padding:12px 6px 6px}


/* =====================================================================
   5  STAGGERED REVEAL (.stg) – community.js adds .in per batch,
      40ms apart, capped at 400ms. Visible by default; hidden only when
      motion is allowed and JS is running (same gate as .rv in site.css).
   ===================================================================== */
@media (prefers-reduced-motion:no-preference){
  html.js:not(.static):not(.rv-all) .stg:not(.in){opacity:0;translate:0 26px}
  html.js:not(.static) .stg{transition:opacity 1s var(--ease),translate 1.1s var(--ease);transition-delay:var(--d,0ms)}
  /* masonry figures keep their own focus/hover; the img carries the zoom transition */
}


/* =====================================================================
   6  RESPONSIVE
   ===================================================================== */
@media (max-width:1180px){
  .wall{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:960px){
  .cm-row__cta{justify-self:start}
  .plq{min-height:0}
  .plq .link-u{margin-top:6px}
  .mas{column-count:2}
}

/* tablet: the stacked plaques were three ~700px slabs with the text capped at 42ch and the
   right half empty. Each becomes one short row instead: the logo in a fixed left cell,
   description and link beside it (same reading order as the markup) */
@media (min-width:761px) and (max-width:1180px){
  .plqs{grid-template-columns:minmax(0,1fr)}
  .plq{grid-column:1/-1;min-height:0;display:grid;grid-template-columns:200px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:40px;row-gap:14px;align-items:start;padding:28px 32px}
  .plq__logo{grid-column:1;grid-row:1/3}
  .plq p{grid-column:2;grid-row:1;max-width:52ch}
  .plq .link-u{grid-column:2;grid-row:2;justify-self:start;align-self:end;margin-top:0}
}

@media (max-width:760px){
  .plq{padding:24px;gap:18px}
  .plq .link-u{margin-top:0}
  .plq__logo{height:52px}
  .plq__logo img{height:44px}
  .plq__logo img[src*="startuptales"]{height:42px}
  .plq__logo img[src*="karostartup"]{height:36px}
  .plq__logo img[src*="breakintovc"]{height:22px}
  .plq__logo img[src*="community-bpc"]{height:36px}
  .mas{column-gap:10px}
  .mas figure{margin-bottom:10px}
  .wall{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* 2-up cards are ~157px: "IAMAI / Marketing Conclave" (bound with .nw) needs 132px at 14px */
  .wall .pcard__band{padding:10px 4px 4px}
  .wall .pcard__t{font-size:14px}
}
@media (max-width:359.98px){
  .wall .pcard__t .nw{white-space:normal}
}

@media (max-width:560px){
  /* city line: two deliberate lines, no spark hanging at a line end */
  .cities__br{display:inline}
  .cities__s--br{display:none}
}

/* the longest CTA label: keeps the home's 32px side padding while it fits (375 and up) */
@media (max-width:374.98px){
  .cta .btn--lg{padding:0 22px}
}

/* five plaques in one row on desktop */
@media (min-width:1181px){
  .plqs{grid-template-columns:repeat(5,minmax(0,1fr))}
  .plq{grid-column:auto;padding:24px;gap:20px}
  .plq p{font-size:15px}
}
