/* Escala25 Stories: the list (/stories/) and each story page. Loaded after site.css on those pages only.
   Pages are generated by tools/build-stories.mjs from content/stories/. */

/* the light weight of the display face, for "Stories" beside the logo (same variable font file) */
@font-face{font-family:"Big Shoulders Light";font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/bigshoulders-latin.woff2) format("woff2")}

/* ---------- banner: the logo and "Stories" over a wide strip of the wall ---------- */
.st-banner{position:relative;margin-top:72px;height:clamp(240px,40vw,560px);overflow:hidden;display:grid;place-items:center;isolation:isolate;background:var(--charcoal)}
.st-banner-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.st-banner-video{z-index:-2}
@media (prefers-reduced-motion:reduce){ .st-banner-video{display:none} }
.st-banner::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(8,12,18,.25),rgba(8,12,18,.5))}
/* --h is the logo's height. In logo.png the letters are 44% of the image height and sit on a line 58% down
   (the climber hangs below it), so "Stories" gets the same cap height and the same baseline as ESCALA25.
   Big Shoulders Light: cap height .80em, baseline .88em down a line-height:1 box. */
.st-mark{--h:clamp(56px,9.5vw,136px);display:flex;align-items:flex-start;gap:calc(var(--h) * .16);margin:0 var(--gutter);color:#fff;filter:drop-shadow(0 2px 14px rgba(0,0,0,.45))}
.st-mark img{height:var(--h);width:auto;filter:brightness(0) invert(1)}
.st-mark span{font:300 calc(var(--h) * .545)/1 "Big Shoulders Light",var(--display);letter-spacing:.02em;margin-top:calc(var(--h) * .103)}

/* ---------- the list ---------- */
.st-list{--pad:clamp(48px,6vw,80px)}
.st-intro{font-size:clamp(18px,1.6vw,21px);color:var(--text-secondary);max-width:60ch}
.st-feature{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);margin-top:36px;background:var(--panel);border-radius:18px;overflow:hidden;text-decoration:none;box-shadow:0 22px 50px -34px rgba(22,33,43,.6);transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out)}
.st-feature img{width:100%;height:100%;min-height:340px;aspect-ratio:4/3;object-fit:cover;transition:transform 1.2s var(--ease-out)}
.st-feature-text{display:flex;flex-direction:column;padding:clamp(24px,3.4vw,48px)}
.st-feature h2{font:900 clamp(36px,4vw,60px)/.95 var(--display);text-transform:uppercase;margin-top:10px}
.st-feature .st-quote{font-size:clamp(17px,1.4vw,20px)}
.st-feature:hover{transform:translateY(-4px);box-shadow:0 30px 60px -34px rgba(22,33,43,.7)}
.st-feature:hover img{transform:scale(1.03)}

.st-grid{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-top:22px}
.st-card a{display:flex;flex-direction:column;height:100%;background:var(--panel);border-radius:16px;overflow:hidden;text-decoration:none;transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out)}
.st-card img{width:100%;aspect-ratio:3/2;object-fit:cover;transition:transform 1.2s var(--ease-out)}
.st-card-text{display:flex;flex-direction:column;flex:1;padding:clamp(20px,2.4vw,32px)}
.st-card h3{font:800 clamp(28px,3vw,40px)/.98 var(--display);text-transform:uppercase}
.st-card a:hover{transform:translateY(-4px);box-shadow:0 24px 44px -30px rgba(22,33,43,.65)}
.st-card a:hover img{transform:scale(1.04)}
.st-name{font-weight:600;font-size:14px;margin-top:10px}
.st-quote{color:var(--text-secondary);font-size:clamp(15px,1.3vw,17px);line-height:1.5;margin-top:12px}
.st-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:18px}
.st-pill{font:500 11px/1 var(--mono);letter-spacing:.08em;text-transform:uppercase;background:rgba(22,33,43,.08);border-radius:999px;padding:7px 11px}
.st-pill-lang{background:transparent;box-shadow:inset 0 0 0 1px rgba(22,33,43,.3)}
.st-pill-sample{background:var(--accent);color:#fff}

/* ---------- one story ---------- */
.st-story{--col:800px;padding-top:max(var(--pad),130px);padding-bottom:clamp(56px,7vw,96px)}   /* --col: the text column, the bio and the title share it */
.st-head{text-align:center}
.st-head .kicker a{text-decoration:none}
.st-head .kicker a:hover{text-decoration:underline;text-underline-offset:4px}
.st-head h1{font:900 clamp(44px,6.4vw,92px)/.92 var(--display);text-transform:uppercase;margin:14px auto 0;max-width:18ch}
.st-byline{margin-top:20px;color:var(--text-secondary)}
.st-byline strong{color:var(--ink)}
.st-sample-note{display:inline-block;margin-top:16px;font:500 12px/1.4 var(--mono);letter-spacing:.06em;text-transform:uppercase;background:var(--accent);color:#fff;border-radius:8px;padding:8px 12px}
.st-cover{max-width:1180px;margin:clamp(32px,4vw,52px) auto 0}
.st-cover img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:18px}

.st-body{max-width:var(--col);margin:clamp(36px,4.4vw,56px) auto 0}
.st-body p{font-size:clamp(17px,1.35vw,19px);line-height:1.75;margin-top:1.25em}
.st-body > p:first-child{margin-top:0}
.st-body > p:first-child strong{font:800 clamp(26px,2.6vw,34px)/1.1 var(--display);text-transform:uppercase;display:block}
.st-pull{margin:clamp(40px,5vw,64px) 0;padding-left:24px;border-left:6px solid var(--accent)}
.st-body .st-pull p{font:900 clamp(34px,4.2vw,56px)/.98 var(--display);text-transform:uppercase;margin:0;color:var(--ink)}
/* photos between paragraphs break out wider than the text */
.st-fig{--fw:min(980px,calc(100vw - 2 * var(--gutter)));width:var(--fw);margin:clamp(36px,4.5vw,56px) 0 clamp(36px,4.5vw,56px) calc((100% - var(--fw)) / 2)}   /* centred with margins, not a transform: the holds measure it */
.st-fig img{width:100%;height:auto;border-radius:16px}
.st-fig figcaption{max-width:var(--col);margin:10px auto 0;font-size:14px;color:var(--text-secondary)}
.st-fig.st-fig-portrait{--fw:min(480px,calc(100vw - 2 * var(--gutter)))}
.st-fig.st-fig-square{--fw:min(720px,calc(100vw - 2 * var(--gutter)))}   /* upright photos: narrower, so one photo never fills more than a screen */
.st-body .st-h{font:800 clamp(26px,2.6vw,34px)/1.1 var(--display);text-transform:uppercase;margin:clamp(40px,5vw,60px) 0 0;color:var(--ink)}

.st-bio{display:flex;gap:clamp(20px,2.4vw,30px);align-items:center;max-width:var(--col);margin:clamp(48px,6vw,72px) auto 0;padding-top:28px;border-top:1px solid rgba(22,33,43,.18)}
.st-bio img,.st-bio-ph{flex:0 0 auto;width:clamp(120px,11vw,148px);height:clamp(120px,11vw,148px);border-radius:50%;object-fit:cover}
.st-bio-ph{display:grid;place-items:center;background:var(--charcoal);color:#fff;font:900 64px/1 var(--display)}
.st-bio-name{font:800 30px/1 var(--display);text-transform:uppercase;margin-top:6px}
.st-bio p:last-child{margin-top:8px;color:var(--text-secondary)}

.st-next{--pad:clamp(56px,7vw,96px);background-color:#C2C8CC}
/* "More stories": a heading with "View all stories" beside it, then three cards (Patagonia's "Related Stories") */
.st-more-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px 32px;flex-wrap:wrap}
.st-more-head h2{font:900 clamp(34px,3.8vw,52px)/1 var(--display);text-transform:uppercase}
.st-grid-more{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:clamp(24px,3vw,36px)}
.st-grid-more .st-card h3{font-size:clamp(24px,2.2vw,30px)}

/* ---------- smaller screens ---------- */
@media (max-width:900px){
  .st-feature{grid-template-columns:1fr}
  .st-feature img{min-height:0}
}
@media (max-width:640px){ .st-grid{grid-template-columns:1fr} }
@media (max-width:560px){
  .st-banner{margin-top:62px}
  .st-bio{flex-direction:column;align-items:center;text-align:center;gap:16px}   /* phones: the photo above the name, all centred */
  .st-bio img,.st-bio-ph{width:120px;height:120px}
}
@media (prefers-reduced-motion:reduce){
  .st-feature,.st-feature img,.st-card a,.st-card img{transition:none}
}

/* ---------- homepage row: the title, then a full-width row of story cards, centred like the café photos: it runs
   out to the section's edges on both sides, three cards across, and moves under a swipe, a mouse drag or the arrows ---------- */
.st-home-sub{display:flex;align-items:baseline;justify-content:space-between;gap:12px 32px;flex-wrap:wrap}
.st-viewall{font-weight:600;font-size:16px;white-space:nowrap;text-underline-offset:5px}
.st-viewall::after{content:" \2192"}
.st-viewall:hover{color:var(--accent-ink)}
.st-rail{--gap:18px;--cw:calc((100cqw - 2 * var(--gutter) - 2 * var(--gap)) / 3);
  position:relative;container-type:inline-size;margin:clamp(32px,4vw,52px) calc(-1 * var(--gutter)) 0}
.st-row{list-style:none;display:flex;justify-content:safe center;gap:var(--gap);overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;
  scroll-snap-type:x mandatory;scroll-padding-inline:var(--gutter);
  padding:8px var(--gutter) 40px;margin:-8px 0 -40px}   /* room for the cards' lift and shadow inside the scroller */
.st-row::-webkit-scrollbar{display:none}
.st-row:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.st-row > li{flex:0 0 var(--cw);scroll-snap-align:start}
.st-row.grabbing{cursor:grabbing;user-select:none;scroll-snap-type:none}
.st-row.grabbing a{pointer-events:none}
@media (hover:hover) and (pointer:fine){.st-rail.ready .st-row{cursor:grab}}
.st-row img{-webkit-user-drag:none}
.st-row .st-card h3{font-size:clamp(26px,2.4vw,34px)}
.st-row .st-quote{font-size:clamp(15px,1.25vw,17px)}
.st-rail.part{transform:none}
/* the café row's dark round arrows, halfway down the photos */
.st-rail.ready .bc-arrow{display:grid}
.st-rail .bc-arrow{top:calc(8px + var(--cw) / 3)}
@media (max-width:1024px){ .st-rail{--cw:calc((100cqw - 2 * var(--gutter) - var(--gap)) / 2.2)} }
@media (max-width:640px){ .st-rail{--gap:12px;--cw:80cqw} .st-home-sub{display:block} .st-viewall{display:inline-block;margin-top:14px} }
@media (hover:none){ .st-rail .bc-arrow{display:none} }
/* "More stories" on tablets and phones: two cards, side by side and then stacked */
@media (max-width:900px){ .st-grid-more{grid-template-columns:repeat(2,minmax(0,1fr))} .st-grid-more > li:nth-child(3){display:none} }
@media (max-width:640px){ .st-grid-more{grid-template-columns:1fr} }

/* the call for writers under the homepage row: straight on the wall like the contact form, a hairline above it, the
   question on the left and the offer with a button on the right */
.st-call{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:18px clamp(24px,5vw,72px);align-items:start;
  margin-top:clamp(48px,6vw,80px);padding-top:clamp(28px,3.4vw,40px);border-top:1px solid rgba(22,33,43,.2)}
.st-call h3{font:900 clamp(32px,3.6vw,50px)/.95 var(--display);text-transform:uppercase;margin-top:10px;max-width:14ch}
.st-call p{color:var(--text-secondary);font-size:clamp(16px,1.3vw,18px);max-width:52ch}
.st-call-act{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;margin-top:22px}
.st-call-act .btn{color:#fff}
.st-call-act span{font-size:15px}
.st-call-act span a{color:var(--ink);font-weight:600;text-underline-offset:4px}
.st-call-act span a:hover{color:var(--accent-ink)}
@media (max-width:720px){ .st-call{grid-template-columns:1fr} }

/* phones: More stories becomes a row you swipe, like the homepage's card rows: all three cards, the next one peeking
   in at the edge, the dots under it (assets/dots.js) */
@media (max-width:720px){
  .st-grid-more{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;
    margin-left:calc(-1 * var(--gutter));margin-right:calc(-1 * var(--gutter));padding:2px var(--gutter);scroll-padding-inline:var(--gutter)}
  .st-grid-more::-webkit-scrollbar{display:none}
  .st-grid-more > li,.st-grid-more > li:nth-child(3){display:block;flex:0 0 84%;scroll-snap-align:start}
  .st-rail .dots{margin-top:18px}
}
