/* ==========================================================================
   The homepage sections: hero stage, the explorer's ink skin, the community
   cards, the matching band, the condensed FAQ and the Ask FURIENDLY panel.
   Tokens, type, header, buttons, devices, the photo moment, the closing and
   the footer live in landing.css; the explorer in explorer.css.
   ========================================================================== */

/* Hero: the wordmark leads, the badge under it, then a swipe of nine screens:
   a scroll-snap track with the centered phone at full size and its neighbours
   peeking either side. js/landing.js adds the wrap-around, the dots and the
   arrows; without it the track still scrolls and snaps. */
.hero--stage{position:relative;padding-top:clamp(20px,3vw,40px)}
.hero--stage .hero__copy{display:grid;justify-items:center;text-align:center;gap:22px}
.hero__brand{margin:0;line-height:0}
.hero__wordmark{width:clamp(220px,44vw,560px);height:auto;margin-top:clamp(4px,1vw,12px)}
.hero__stage{--slide:min(300px,50vw);--gap:clamp(12px,2vw,26px);position:relative;margin-top:clamp(10px,1.6vw,22px);overflow:hidden}
.hero__stage::before{content:"";position:absolute;left:50%;bottom:30px;width:min(1200px,150vw);height:70%;translate:-50% 0;background:radial-gradient(50% 58% at 50% 100%,rgba(185,74,46,.26),rgba(185,74,46,0) 72%);pointer-events:none}
.carousel{position:relative}
.carousel__track{position:relative;display:flex;gap:var(--gap);list-style:none;margin:0;padding:14px 0 26px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.carousel__track::-webkit-scrollbar{display:none}
.carousel__track:focus-visible{outline:3px solid var(--accent-primary);outline-offset:-3px;border-radius:16px}
.carousel__slide{flex:none;width:var(--slide);scroll-snap-align:center;scroll-snap-stop:always}
.carousel__slide:first-child{margin-left:calc(50% - var(--slide) / 2)}
.carousel__slide:last-child{margin-right:calc(50% - var(--slide) / 2)}
.carousel__slide .device{--w:var(--slide);width:100%;scale:calc(1 - .14 * var(--d,0));filter:brightness(calc(1 - .09 * var(--d,0)));transform-origin:50% 62%}
.carousel__controls{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:-12px;padding-bottom:6px}
.carousel__btn{width:44px;height:44px;padding:0;border:1.5px solid var(--border-strong);border-radius:50%;background:var(--surface-elevated);display:grid;place-items:center;cursor:pointer;transition:background-color .2s,border-color .2s}
.carousel__btn:hover{background:var(--surface-muted)}
.carousel__btn::before{content:"";width:10px;height:10px;border-left:2px solid var(--text-heading);border-bottom:2px solid var(--text-heading);rotate:45deg;translate:2px 0}
.carousel__btn--next::before{rotate:225deg;translate:-2px 0}
.carousel__dots{display:flex;list-style:none;margin:0;padding:0}
.carousel__dots button{width:44px;height:44px;padding:0;border:0;background:transparent;display:grid;place-items:center;cursor:pointer}
.carousel__dots button::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--border-strong);transition:background-color .2s,scale .2s}
.carousel__dots button:hover::before{background:var(--slate-grey)}
.carousel__dots button[aria-current="true"]::before{background:var(--accent-primary);scale:1.4}
.carousel__dots button:focus-visible,.carousel__btn:focus-visible{outline:3px solid var(--accent-primary);outline-offset:2px}
html:not(.js) .carousel__controls{display:none}
.js .carousel{opacity:0;translate:0 26px}
.is-ready .carousel{opacity:1;translate:0 0;transition:opacity .7s ease-out,translate .95s cubic-bezier(.2,.75,.2,1)}
@media (max-width:600px){
  .carousel__btn{display:none}
  .carousel__dots button{width:38px;height:40px}
}
@media (prefers-reduced-motion:reduce){
  .js .carousel{opacity:1;translate:0 0;transition:none}
  .carousel__track{scroll-behavior:auto}
}

.explorer--ink .explorer__panel{border-color:rgba(244,236,226,.12);box-shadow:0 36px 70px -34px rgba(0,0,0,.55)}

/* Section head shared by the feature sections. */
.feature__head{display:grid;gap:16px;max-width:560px}
.feature__head .eyebrow{margin:0}
.feature__head .lede{max-width:44ch}

/* Feature cards: the caption above a phone at rest. */
.features__head{margin-bottom:clamp(20px,3vw,32px)}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(14px,1.6vw,22px);list-style:none;margin:0;padding:0}
.card{display:grid;grid-template-rows:auto 1fr;gap:16px;min-width:0;padding:22px 20px 0;border-radius:var(--radius-card-lg);background:var(--surface-elevated);border:1px solid var(--border-subtle);overflow:hidden}
.card__caption h3{margin:0 0 8px}
.card__caption p{margin:0;font:400 14px/1.5 var(--font-text);color:var(--text-base)}
.card__shot{align-self:end;height:clamp(300px,24vw,380px);overflow:hidden;-webkit-mask-image:linear-gradient(#000 82%,transparent);mask-image:linear-gradient(#000 82%,transparent)}
.card__shot .device{--w:min(100%,230px);margin:0 auto}
@media (max-width:1023px){
  .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .card__shot{height:min(60vw,380px)}
}
@media (max-width:600px){
  .card{padding:18px 14px 0;gap:12px}
  .card__caption h3{font-size:1.05rem}
  .card__caption p{font-size:13px}
  .card__shot{height:min(52vw,300px)}
  .card__shot .device{--w:min(100%,180px)}
}

/* Community: two cards, the caption beside the phone. */
.cards--two{grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(16px,2vw,28px)}
.cards--two .card{grid-template-rows:none;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px;padding:26px 0 0 26px}
.cards--two .card__caption{align-self:start;padding-bottom:26px}
.cards--two .card__shot{height:clamp(280px,22vw,340px);padding-right:22px}
.cards--two .card__shot .device{--w:min(100%,210px);margin:0}
@media (max-width:1023px){
  .cards--two{grid-template-columns:1fr;max-width:640px}
}
@media (max-width:600px){
  .cards--two .card{grid-template-columns:minmax(0,1fr) 44vw;gap:12px;padding:20px 0 0 18px}
  .cards--two .card__caption{padding-bottom:20px}
  .cards--two .card__shot{height:min(60vw,280px);padding-right:14px}
  .cards--two .card__shot .device{--w:min(100%,170px)}
}

/* Two phones, one in front and one behind to the left, sized from the pair box. */
.pair{position:relative;container-type:inline-size;width:100%;aspect-ratio:100/114}
.pair .device{position:absolute;bottom:0}
.pair__front{--w:52cqw;left:42%;z-index:2}
.pair__back{--w:46cqw;left:0;bottom:7%;rotate:-6deg;transform-origin:50% 100%;filter:brightness(.97)}
.pair--right .pair__front{left:auto;right:42%}
.pair--right .pair__back{left:auto;right:0;rotate:6deg}
@media (max-width:600px){
  .pair__back{left:4%}
  .pair--right .pair__back{right:4%}
}

/* The one rust band on the page: grained, with the matching story. */
.band--rust{background-color:#AE4528;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"),radial-gradient(60% 70% at 22% 30%,rgba(255,255,255,.14),transparent 62%),linear-gradient(160deg,#B94A2E 0%,#9D3D24 100%);color:var(--surface-elevated)}
.band--rust .eyebrow{color:var(--surface-elevated);opacity:.92}
.band--rust .display,.band--rust .two-tone .r{color:var(--surface-elevated)}
.band--rust .lede{color:var(--surface-elevated)}
.band--rust :focus-visible{outline-color:var(--surface-elevated)}

/* Matching: Discover and the match screen, with how it works. */
.meet{overflow-x:clip}
.meet .wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(28px,5vw,80px);align-items:center}
.meet .pair{max-width:480px;justify-self:center}
@media (max-width:900px){
  .meet .wrap{grid-template-columns:1fr}
  .meet .pair{order:2;max-width:min(400px,100%)}
}

/* FAQ: five condensed questions on an elevated band. The markup between
   the FAQ markers keeps tools/render-faq.py's shape and carries the live
   corpus version, so js/faq.js leaves it alone; the Ask button sits outside
   the section because faq.js rebuilds the section when the corpus moves. */
.faq-band{background:var(--surface-elevated)}
.faq-band .wrap{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(24px,5vw,72px);align-items:start}
.faq-band .feature__head{position:sticky;top:96px}
.faq-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.faq{margin:0}
.faq__inner{max-width:none}
.faq__heading{display:none}
.faq details{border-top:1px solid var(--border-strong)}
.faq details:last-child{border-bottom:1px solid var(--border-strong)}
.faq summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:60px;padding:16px 0;font:600 16px/1.45 var(--font-text);color:var(--text-heading);cursor:pointer;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"";flex:none;width:12px;height:12px;border-right:2px solid var(--accent-primary);border-bottom:2px solid var(--accent-primary);rotate:45deg;translate:0 -3px;transition:rotate .2s,translate .2s}
.faq details[open] summary::after{rotate:225deg;translate:0 3px}
.faq summary:hover{color:var(--accent-primary-text)}
.faq summary:focus-visible{outline:3px solid var(--accent-primary);outline-offset:4px;border-radius:4px}
.faq details p{max-width:66ch;margin:0;padding:0 0 20px;line-height:1.65;overflow-wrap:anywhere;color:var(--text-base)}
.faq a{color:var(--accent-primary-text);text-underline-offset:.15em}
/* Without JavaScript there is no panel to open. */
html:not(.js) [data-faq-ask]{display:none}
@media (max-width:900px){
  .faq-band .wrap{grid-template-columns:1fr}
  .faq-band .feature__head{position:static}
}
@media (prefers-reduced-motion:reduce){.faq summary::after{transition:none}}

/* Ask FURIENDLY, the dialog js/faq.js builds from the footer link. */
.faq-panel{position:fixed;inset:auto 20px 20px auto;margin:0;width:min(440px,calc(100% - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:24px;border:1px solid var(--border-strong);border-radius:var(--radius-panel);background:var(--surface-elevated);color:var(--text-base);font:400 15px/1.55 var(--font-text);overflow-y:auto;box-shadow:var(--shadow-modal)}
.faq-panel[open]{display:flex;flex-direction:column;gap:20px}
.faq-panel::backdrop{background:var(--scrim);opacity:.45}
.faq-panel__header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.faq-panel__header h2{margin:0;font:400 1.4rem/1.1 var(--font-display);letter-spacing:-.025em;text-transform:uppercase;color:var(--text-heading)}
.faq-panel button,.faq-panel input{font:inherit;color:inherit}
.faq-panel button{cursor:pointer}
.faq-panel__close{flex-shrink:0;min-height:44px;min-width:44px;padding:8px 12px;border:0;border-radius:var(--radius-pill);background:var(--surface-muted);color:var(--text-heading);font-weight:600}
.faq-panel__close:hover{background:var(--border-subtle)}
.faq-panel__chips{display:flex;flex-wrap:wrap;gap:8px}
.faq-panel__chips button{min-height:44px;padding:9px 14px;border:1.5px solid var(--border-strong);border-radius:var(--radius-pill);background:var(--surface-elevated);color:var(--text-heading);text-align:left;line-height:1.4}
.faq-panel__chips button:hover{background:var(--text-heading);border-color:var(--text-heading);color:var(--surface-elevated)}
.faq-panel__answer{overflow-wrap:anywhere}
.faq-panel__answer:empty{display:none}
.faq-panel__answer p{margin:0}
.faq-panel__answer p + p{margin-top:12px;font-size:13px;color:var(--slate-grey)}
.faq-panel__answer a,.faq-panel__footer a{color:var(--accent-primary-text);text-underline-offset:.15em}
.faq-panel__form{display:flex;gap:8px;margin:0}
.faq-panel__form input{flex:1;min-width:0;width:100%;min-height:48px;padding:11px 14px;border:1.5px solid var(--border-strong);border-radius:var(--radius-input);background:var(--surface-elevated);font-size:16px;color:var(--text-heading)}
.faq-panel__form input::placeholder{color:var(--slate-grey);opacity:1}
.faq-panel__form input:focus{outline:none;border-color:var(--accent-primary);box-shadow:0 0 0 4px var(--accent-primary-soft)}
.faq-panel__form button{min-width:64px;min-height:48px;padding:10px 16px;border:0;border-radius:var(--radius-input);background:var(--accent-primary);color:var(--surface-elevated);font-weight:600}
.faq-panel__form button:hover{background:var(--accent-primary-pressed)}
.faq-panel__form button:disabled{cursor:wait}
.faq-panel__footer{margin:0;border-top:1px solid var(--border-subtle);padding-top:16px;font-size:13px;color:var(--slate-grey)}
.faq-panel :focus-visible{outline:3px solid var(--accent-primary);outline-offset:3px}
@media (max-width:599px){
  .faq-panel{inset:auto 0 0;width:100%;max-height:calc(100dvh - 16px);padding:20px 20px max(20px,env(safe-area-inset-bottom));border-bottom:0;border-radius:var(--radius-panel) var(--radius-panel) 0 0}
  .faq-panel__header h2{font-size:1.3rem}
}
@media (prefers-reduced-motion:reduce){.faq-panel,.faq-panel *{scroll-behavior:auto;animation:none;transition:none}}

/* Footer: the ask line reads as one sentence; its first link is the Ask trigger faq.js owns. */
.foot__ask{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0 .35em;font:500 14px/1 var(--font-text)}
