/* ============================================================
   Welcome — the landing page for signed-out visitors.
   One centred column: the lockup hero with the pitch, the calls
   to action and search; a big horizontal tab bar that pins under
   the header bar once it is scrolled past; the "Why ARBOX" story
   rows (text beside an animated diagram, alternating sides — the
   Circloud NEST about-page pattern); the Most popular grid; and a
   closing call to action. Builds on app.css tokens.
   ============================================================ */

.welcome-main {
  padding: 0;
  overflow-x: hidden;
}

/* ── Content column ───────────────────────────────────────────── */

/* One spacing ramp for the whole page: each step is the sum of the two before it
   (8 · 12 · 20 · 32 · 52 · 84), so gaps that look equal are equal and gaps that differ
   differ by a step, never by a few pixels. Narrow screens compress the top of the ramp
   rather than overriding rule by rule. --ws-gutter is the page's side padding, which the
   full-bleed tab bar cancels with a negative margin of the same value.
   The tab bar keeps its own --wt-* numbers: those feed the pinned-height arithmetic.
   --welcome-tabs-top and --welcome-tabs-h are written here by welcome.js. */
.welcome-content {
  --ws-1: 8px;
  --ws-2: 12px;
  --ws-3: 20px;
  --ws-4: 32px;
  --ws-5: 52px;
  --ws-6: 84px;
  --ws-gutter: 44px;

  /* The one accent every marked phrase on this page is inked in — the brand
     primary lifted just enough to stay comfortable on the dark field. */
  --wc-accent: #7dd3fc;

  min-width: 0;
  padding: 0 var(--ws-gutter) var(--ws-5);
}

/* ── Hero ─────────────────────────────────────────────────────── */

.welcome-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ws-2);
  max-width: 980px;
  margin: 0 auto;
  padding: var(--ws-4) 0;
  text-align: center;
}

/* A soft halo behind the lockup, where the mesh converges */
.welcome-hero::before {
  content: '';
  position: absolute;
  top: 2%;
  left: 50%;
  z-index: -1;
  width: min(760px, 100%);
  height: 340px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(var(--primary-rgb), .16) 0%, rgba(var(--secondary-rgb), .1) 45%, transparent 100%);
  pointer-events: none;
}

.welcome-lockup { animation: welcome-rise .7s var(--ease) both; }

.welcome-lockup .cr-brand-logo {
  max-width: 92px;
  margin-inline: auto;
  filter: drop-shadow(0 12px 36px rgba(var(--primary-rgb), .28));
}

.welcome-lockup .cr-brand-name { font-size: 2.3rem; }
.welcome-lockup .cr-brand-sub { font-size: 1.5rem; }



/* The headline is the Circloud slogan, the same component every sibling project uses
   (NEST: "Local Cloud Platform"). Element-qualified because app.css resets h1 margins. */
h1.cr-brand-slogan {
  margin-top: var(--ws-2);
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: none;
}

/* The hero deck. A gradient knocked through forty words of body copy is a poster,
   not a sentence: it goes loud, then unreadable. So the deck is set the way the NEST
   about page sets its lead — calm ink, generous leading, and the phrase that carries
   the promise inked in the accent at 600. The lockup above it is the loud element. */
.welcome-pitch {
  max-width: 720px;
  margin: 0;
  color: #d5e0f0;
  font-size: clamp(17.5px, 1.6vw, 21px);
  font-weight: 400;
  line-height: 1.64;
  letter-spacing: -.008em;
  text-wrap: pretty;
  animation: welcome-rise .7s .12s var(--ease) both;
}

.welcome-pitch strong {
  color: var(--wc-accent);
  font-weight: 600;
}

.btn.welcome-cta {
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 14.5px;
}

/* The only search on the page, at the head of the Explore section. */
.welcome-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(640px, 100%);
  margin: 0 auto var(--ws-5);
}

.welcome-search-icon {
  position: absolute;
  left: 17px;
  z-index: 1;
  /* Gold like every icon, focused or not. */
  color: var(--arbox-gold);
  pointer-events: none;
}

.welcome-search-input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 124px 0 50px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--card-surface-strong);
  color: var(--text);
  font: 400 15.5px/1.4 var(--ui-font-family);
  text-overflow: ellipsis;
  outline: none;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color var(--t) ease, box-shadow var(--t) ease;
}

.welcome-search-input::placeholder { color: var(--text-muted); }
.welcome-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.welcome-search-input:hover:not(:focus) { border-color: rgba(var(--white-rgb), .2); }

.welcome-search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring), var(--shadow-lg), var(--glow);
}

.btn.welcome-search-btn {
  position: absolute;
  right: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13.5px;
}

/* ── Section tabs ─────────────────────────────────────────────── */

/* A 1px marker right above the bar: when it leaves the top of the scroller, welcome.js
   adds .is-pinned (IntersectionObserver — no scroll handler). The negative margin cancels
   it out, so it takes no room. */
.welcome-tabs-sentinel {
  height: 1px;
  margin-bottom: -1px;
}

/* .app-main is the scroller and starts right under the header bar, so the bar pins at
   top: 0 of that scroller; welcome.js measures the header and writes --welcome-tabs-top
   anyway, so an overlapping header would still be cleared.
   The outer box only reserves room and never changes size — everything that shrinks when the
   bar pins happens inside .welcome-tabs-band. A sticky box that got shorter would pull the
   whole page up under the reader the moment it pinned. Below the compact band the box is
   transparent and lets clicks through, so the page simply scrolls underneath it. */
.welcome-tabs {
  /* Roomy in the hero … */
  --wt-full-h: 54px;
  --wt-full-pad: 7px;
  --wt-full-band: 22px;
  --wt-h: var(--wt-full-h);
  --wt-pad: var(--wt-full-pad);
  --wt-band: var(--wt-full-band);
  --wt-px: 26px;
  --wt-gap: 8px;
  --wt-font: 15px;
  --wt-icon: 19px;
  /* … and the height of the compact pinned band: 2 × 5px band + 2 × 5px capsule + 40px tab +
     2px capsule border. welcome.js reads it for the scroll-spy band and for scroll-margin-top,
     and measures the real band once the bar is pinned. */
  --wt-pinned-h: 62px;

  position: sticky;
  top: var(--welcome-tabs-top, 0px);
  z-index: 30;
  height: calc(2 * var(--wt-full-band) + 2 * var(--wt-full-pad) + var(--wt-full-h) + 2px);
  margin-inline: calc(-1 * var(--ws-gutter));
  pointer-events: none;
}

.welcome-tabs.is-pinned {
  --wt-h: 40px;
  --wt-px: 14px;
  --wt-gap: 4px;
  --wt-font: 13.5px;
  --wt-icon: 16px;
  --wt-pad: 5px;
  --wt-band: 5px;
}

/* The band that is actually drawn, and the sideways scroller on phones; margin-inline: auto on
   the list centres it while it fits and still leaves the first tab reachable when it does not. */
.welcome-tabs-band {
  display: flex;
  padding: var(--wt-band) var(--ws-gutter);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  pointer-events: auto;
  background-color: rgba(9, 13, 28, 0);
  transition: padding .32s var(--ease), background-color .32s var(--ease),
    box-shadow .32s var(--ease), backdrop-filter .32s var(--ease);
}

.welcome-tabs.is-pinned .welcome-tabs-band {
  background-color: rgba(9, 13, 28, .82);
  /* The hairline is an inset shadow, not a border: the band's height has to stay exactly what
     the bar above reserves for it. */
  box-shadow: inset 0 -1px 0 rgba(125, 211, 252, .16), 0 14px 34px rgba(0, 0, 0, .45);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.welcome-tabs-band::-webkit-scrollbar { display: none; }

.welcome-tabs-list {
  position: relative;
  display: flex;
  gap: var(--wt-gap);
  margin-inline: auto;
  padding: var(--wt-pad);
  border: 1px solid rgba(125, 211, 252, .16);
  border-radius: 999px;
  background-color: rgba(13, 19, 40, .82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(var(--white-rgb), .06);
  transition: padding .32s var(--ease), background-color .32s var(--ease),
    border-color .32s var(--ease), box-shadow .32s var(--ease);
}

.welcome-tabs.is-pinned .welcome-tabs-list {
  border-color: rgba(125, 211, 252, .08);
  background-color: rgba(var(--white-rgb), .02);
  box-shadow: none;
}

/* The active pill slides between tabs: welcome.js writes --wt-gx / --wt-gw from the tab's box. */
.welcome-tabs-glider {
  position: absolute;
  top: var(--wt-pad);
  bottom: var(--wt-pad);
  left: 0;
  z-index: 0;
  width: var(--wt-gw, 0px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(125, 211, 252, .26) 0%, rgba(129, 140, 248, .26) 52%, rgba(192, 132, 252, .26) 100%);
  opacity: 0;
  transform: translateX(var(--wt-gx, 0px));
  pointer-events: none;
  box-shadow: 0 6px 22px rgba(var(--primary-rgb), .22), inset 0 0 0 1px rgba(125, 211, 252, .45);
}

/* .is-ready only after the first measurement, so the pill never slides in from the left edge. */
.welcome-tabs-list.is-ready .welcome-tabs-glider {
  transition: transform .42s var(--ease), width .42s var(--ease), top .32s var(--ease),
    bottom .32s var(--ease), opacity .28s ease;
}

.welcome-tabs-list.has-active .welcome-tabs-glider { opacity: 1; }

.welcome-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: var(--wt-h);
  padding: 0 var(--wt-px);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: var(--wt-font);
  font-weight: 650;
  letter-spacing: -.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: height .32s var(--ease), padding .32s var(--ease), font-size .32s var(--ease),
    color var(--t) ease, background-color var(--t) ease;
}

/* Stroked in currentColor, so an icon takes the tab's own colour and brightens with the pill. */
.welcome-tab-icon {
  flex: none;
  color: var(--arbox-gold);
  width: var(--wt-icon);
  height: var(--wt-icon);
  transition: width .32s var(--ease), height .32s var(--ease);
}

.welcome-tab:hover { background-color: rgba(var(--white-rgb), .05); color: var(--text); }
.welcome-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); color: var(--text); }
.welcome-tab[aria-current] { color: var(--text); }

/* Every tab target clears the header, the pinned bar and a little air — the 18px is welcome.js's
   SCROLL_GAP, which places the scroll-spy band just under where a jump lands. */
.welcome-row,
.welcome-explore {
  scroll-margin-top: calc(var(--welcome-tabs-top, 0px) + var(--welcome-tabs-h, 62px) + 18px);
}

/* ── Story: text beside a diagram, alternating (NEST about-page rows) ── */

.welcome-story {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  /* The hairline closes the hero block right under the tab bar's own box; --ws-4 then opens the
     story. (The bar's reserve box only shows its extra air once it is pinned, so the resting gap
     is what is tuned here.) */
  padding-top: var(--ws-4);
  border-top: 1px solid rgba(125, 211, 252, .06);
}

.welcome-story-head {
  margin: 0 0 var(--ws-4);
  text-align: center;
}

/* Element-qualified: app.css resets `.app-page h1, h2, h3, p { margin: 0 }` at the same
   specificity as a lone class, so a single-class margin on a heading or paragraph here
   silently loses to it. Matching the element makes the two tie, and welcome.css loads last. */
p.welcome-eyebrow {
  margin: 0 0 var(--ws-2);
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.welcome-h2 {
  margin: 0;
  background: linear-gradient(135deg, #e2e8f0 0%, #7dd3fc 52%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 800;
  line-height: 1.12;
}

.welcome-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--ws-5);
  padding: var(--ws-5) 0;
  border-bottom: 1px solid rgba(125, 211, 252, .06);
}

.welcome-row:last-child { border-bottom: none; }

/* The section head already left --ws-4 below it; the first row must not add its own band padding. */
.welcome-story-head + .welcome-row { padding-top: 0; }

/* Alternating wash bands behind every other row, full width of the content column */
.welcome-row--flip::before {
  content: '';
  position: absolute;
  inset: 0 calc(-1 * var(--ws-gutter));
  z-index: -1;
  background: linear-gradient(180deg, rgba(56, 189, 248, .035) 0%, rgba(107, 92, 255, .035) 100%);
}

/* ── Story copy: four voices, not two grey paragraphs ──────────
   A row of copy is a marker, a display line, the claim and an aside, and each
   is set so a skimmer can tell them apart with the page half-scrolled past:

     Heading        near-white display type, tight
     The claim      one size up and brighter, its key phrase inked in the accent
     │ the aside    a step down and muted, behind an upright hairline

   Emphasis is colour and half a step of weight — nothing else. This is the NEST
   about page's rule (`strong` inside body copy is simply the accent at 600) and it
   is the only treatment that cannot be mistaken for a chip, a control or a link.
   No band, no knockout, no block: the marked phrase stays part of its sentence.
   --wc-in is the entrance curve: a long, flat decelerate with no overshoot;
   --wc-accent (set on .welcome-content) is the accent the whole page shares. */

.welcome-row-text {
  --wc-in: cubic-bezier(.22, .68, .18, 1);
}

/* Near-white, not accent: the accent belongs to the marked phrases inside the copy,
   so the heading carries the size and the weight instead of the colour. */
.welcome-row-text h3 {
  margin: 0 0 var(--ws-3);
  color: #eef4ff;
  font-size: clamp(24px, 2.05vw, 31px);
  font-weight: 800;
  line-height: 1.17;
  letter-spacing: -.024em;
}

/* The supporting sentence: the quiet voice, a step down in size and colour, and
   set on NEST's roomy 1.8 leading so a dense aside still reads unhurried. */
.welcome-row-text p {
  margin: 0 0 var(--ws-3);
  color: #9cadc4;
  font-size: 16px;
  line-height: 1.8;
}

/* The lead carries the claim, so it is set as a deck: bigger, tighter, brighter,
   and far enough above the supporting sentence that the two never read as one slab. */
.welcome-row-text p:first-of-type {
  color: #e2eaf8;
  font-size: clamp(17.5px, 1.45vw, 20px);
  font-weight: 500;
  line-height: 1.62;
  letter-spacing: -.013em;
}

/* Every sentence after the lead hangs off an upright hairline — the aside voice.
   The rule is a background, not a border, so it can draw downwards on reveal. */
.welcome-row-text p + p {
  padding-left: var(--ws-3);
  background-image: linear-gradient(180deg, rgba(125, 211, 252, .55) 0%, rgba(129, 140, 248, .26) 62%, rgba(192, 132, 252, .14) 100%);
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 2px 100%;
}

.welcome-row-text p:last-child { margin-bottom: 0; }

/* The marked phrase: the accent, and 600 against the paragraph's 500. It keeps the
   line's own size, leading and rhythm, so a phrase that wraps wraps like any other
   words — there is no box to tear, nothing to align, nothing to hover. */
.welcome-row-text p:first-of-type strong {
  color: var(--wc-accent);
  font-weight: 600;
}

/* The same accent in the aside, one shade cooler so the claim above still leads. */
.welcome-row-text p + p strong {
  color: #8cbfdd;
  font-weight: 600;
}

/* The hero carries the "brought to life" diagram under its call to action: the claim, then the proof. */
/* 880px: the hero diagram is wider than the others (740×336 — the note apps sit in a box left of the app window,
   16px of air all round), so its window keeps the size it has in a 640-wide diagram at 760px. */
.welcome-hero-dg {
  width: min(880px, 100%);
  margin-top: var(--ws-4);
}

.welcome-hero-dg .welcome-dg-cap {
  text-align: center;
}

@media (max-width: 640px) {
  .welcome-hero-dg { margin-top: var(--ws-3); }
}

.welcome-dg-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}

.welcome-dg {
  padding: var(--ws-3);
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, .10);
  border-radius: 18px;
  background: #0a1120;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

/* A diagram still to be drawn (the div holds only its <!--diagram:dN--> marker) keeps the 640×400
   box the drawn ones fill, so the row does not collapse. The rule stops matching once one is pasted in. */
.welcome-dg:empty { aspect-ratio: 8 / 5; }

.welcome-dg .wd-svg {
  display: block;
  width: 100%;
  height: auto;
}

.welcome-dg-cap {
  margin: var(--ws-2) 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

/* The diagram slides in from the side it sits on, once (welcome.js adds
   .will-reveal, then .is-visible). */
.welcome-row.will-reveal .welcome-dg-col {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .7s cubic-bezier(.25, .46, .45, .94), transform .7s cubic-bezier(.25, .46, .45, .94);
  transition-delay: .15s;
}

.welcome-row--flip.will-reveal .welcome-dg-col { transform: translateX(-40px); }

.welcome-row.will-reveal.is-visible .welcome-dg-col {
  opacity: 1;
  transform: none;
}

/* The copy arrives a line at a time — marker, heading, claim, aside — each one
   lifting the same short distance a beat after the one above it. Nothing
   overshoots: it is a decelerate, not a spring. */
.welcome-row.will-reveal .welcome-row-text > *,
.welcome-row.will-reveal .welcome-row-text > * {
  opacity: 0;
  transform: translateY(14px);
}

.welcome-row.will-reveal.is-visible .welcome-row-text > *,
.welcome-row.will-reveal.is-visible .welcome-row-text > * {
  opacity: 1;
  transform: none;
  transition: opacity .62s var(--wc-in), transform .62s var(--wc-in);
}

.welcome-row.will-reveal.is-visible .welcome-row-text h3 { transition-delay: .09s; }
.welcome-row.will-reveal.is-visible .welcome-row-text p:first-of-type { transition-delay: .19s; }

/* The aside's hairline draws downwards as the aside itself settles. */
.welcome-row.will-reveal .welcome-row-text p + p { background-size: 2px 0; }

.welcome-row.will-reveal.is-visible .welcome-row-text p + p {
  background-size: 2px 100%;
  transition: opacity .62s var(--wc-in) .29s, transform .62s var(--wc-in) .29s,
    background-size .6s var(--wc-in) .46s;
}

/* The marked phrase is the last beat, and the quietest one: it arrives in the
   paragraph's own ink and warms into the accent a moment after the line has
   settled. Nothing moves, nothing is drawn — one colour, interpolated. */
.welcome-row.will-reveal .welcome-row-text p:first-of-type strong {
  color: inherit;
}

.welcome-row.will-reveal.is-visible .welcome-row-text p:first-of-type strong {
  color: var(--wc-accent);
  transition: color .8s var(--wc-in) .36s;
}

/* ── Diagram motion classes (the SVGs use only these + SMIL: APP_CSP forbids inline styles) ── */

.wd-flow { stroke-dasharray: 6 5; animation: wd-dash 1s linear infinite; }
@keyframes wd-dash { to { stroke-dashoffset: -11; } }

.wd-pulse { animation: wd-pulse 2.4s ease-in-out infinite; }
@keyframes wd-pulse { 50% { opacity: .45; } }

.wd-float { transform-box: fill-box; animation: wd-float 5s ease-in-out infinite; }
@keyframes wd-float { 50% { transform: translateY(-4px); } }

.wd-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: wd-grow 3.2s ease-in-out infinite; }
@keyframes wd-grow { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }

.wd-blink { animation: wd-blink 1s steps(1) infinite; }
@keyframes wd-blink { 50% { opacity: 0; } }

.wd-spin { transform-box: fill-box; transform-origin: center; animation: wd-spin 12s linear infinite; }
@keyframes wd-spin { to { transform: rotate(360deg); } }

.wd-draw { stroke-dasharray: 900; stroke-dashoffset: 900; animation: wd-draw 6s ease-in-out infinite; }
@keyframes wd-draw { 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -900; } }

.wd-delay-1 { animation-delay: .4s; }
.wd-delay-2 { animation-delay: .8s; }
.wd-delay-3 { animation-delay: 1.2s; }
.wd-delay-4 { animation-delay: 1.6s; }

/* ── Explore: the search, then the Most popular grid ──────────── */

/* The story's last row leaves --ws-5 below it; this adds --ws-4, so section sits from section
   by exactly --ws-6. */
.welcome-explore {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: var(--ws-4);
}

h3.welcome-popular-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ws-1);
  margin: 0 0 var(--ws-3);
  color: #7dd3fc;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.01em;
}

/* The flame is the one icon gold (svg.ic), like every other icon. */
svg.ic.welcome-flame {
  flex: none;
  width: 1.35em;
  height: 1.35em;
  /* Flex centring aligns the boxes; a flame reads bottom-heavy, so it needs a hair of optical drop. */
  transform: translateY(.04em);
}

.welcome-popular-error { margin-bottom: var(--ws-3); }

/* A few boxes from different fields (welcome.js picks 8): four across the 1240px column, two rows. Narrower screens
   show three across or two across and only the first six, so the rows always come out full — never one card
   stranded on a line of its own. Search finds the rest. */
.welcome-popular-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--ws-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.welcome-pop {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(var(--white-rgb), .025);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--t) ease, background-color var(--t) ease, transform var(--t) ease;
}

.welcome-pop:hover {
  border-color: rgba(var(--primary-rgb), .45);
  background: rgba(var(--primary-rgb), .06);
  transform: translateY(-2px);
}

.welcome-pop:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.welcome-pop-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gradient-soft);
}

.welcome-pop-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.welcome-pop:hover .welcome-pop-cover img { transform: scale(1.04); }
.welcome-pop-cover.is-broken img { visibility: hidden; }

.welcome-pop-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--ws-1);
  padding: var(--ws-2);
}

.welcome-pop-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.welcome-pop-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--ws-1);
  margin-top: auto;
  color: var(--text-muted);
  font-size: 12.5px;
}

.welcome-pop-owner {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.welcome-pop-views { flex: none; color: var(--text-secondary); }

/* ── Closing call to action ───────────────────────────────────── */

.welcome-closing {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--ws-6) 0 0;
}

.welcome-closing-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ws-2);
  padding: var(--ws-5) var(--ws-4);
  overflow: hidden;
  border-color: var(--border-light);
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(var(--primary-rgb), .16) 0%, transparent 70%),
    radial-gradient(500px 240px at 100% 100%, rgba(var(--secondary-rgb), .16) 0%, transparent 70%),
    var(--card-surface-strong);
  text-align: center;
}

p.welcome-closing-text {
  max-width: 560px;
  margin-bottom: var(--ws-1);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

@keyframes welcome-rise { from { opacity: 0; transform: translateY(10px); } }

/* ── Narrower screens ─────────────────────────────────────────── */

@media (max-width: 1280px) {
  .welcome-content { --ws-gutter: 32px; }
}

/* One column: the rows stack text above diagram, and the two widest steps close up. */
@media (max-width: 1060px) {
  .welcome-content { --ws-5: 40px; --ws-6: 64px; }
  .welcome-row,
  .welcome-row--flip { grid-template-columns: minmax(0, 1fr); gap: var(--ws-4); padding: var(--ws-5) 0; }
  .welcome-row--flip .welcome-row-text { order: -1; }
  .welcome-popular-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .welcome-popular-grid > li:nth-child(n + 7) { display: none; }
}

@media (max-width: 640px) {
  .welcome-content { --ws-3: 16px; --ws-4: 24px; --ws-5: 32px; --ws-6: 48px; --ws-gutter: 16px; }
  .welcome-lockup .cr-brand-logo { max-width: 76px; }
  /* Six lines of deck is a wall on a phone: the leading closes up a notch so the
     diagram starts above the fold. */
  .welcome-pitch { line-height: 1.56; }
  .welcome-lockup .cr-brand-name { font-size: 1.9rem; }
  .welcome-lockup .cr-brand-sub { font-size: 1.24rem; }
  .btn.welcome-cta { width: 100%; }
  .welcome-search-input { height: 50px; padding-right: 58px; padding-left: 46px; font-size: 16px; }
  .btn.welcome-search-btn { width: 40px; padding: 0; }
  .welcome-search-btn span { display: none; }

  .welcome-tabs {
    --wt-full-h: 44px;
    --wt-full-band: 14px;
    --wt-px: 15px;
    --wt-font: 14px;
    --wt-icon: 17px;
    --wt-pinned-h: 58px;
  }
  .welcome-tabs.is-pinned { --wt-h: 38px; --wt-px: 13px; --wt-font: 13px; --wt-pad: 4px; }
  .welcome-row-text h3 { font-size: 22px; letter-spacing: -.02em; }
  .welcome-row-text p { font-size: 15.5px; line-height: 1.76; }
  .welcome-row-text p:first-of-type { font-size: 17.5px; line-height: 1.58; }
  .welcome-row-text p + p { padding-left: var(--ws-2); }
  h3.welcome-popular-title { font-size: 19px; }
  .welcome-dg { border-radius: 14px; }
  .welcome-popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .wd-flow, .wd-pulse, .wd-float, .wd-grow, .wd-blink, .wd-spin, .wd-draw { animation: none; }
  .wd-draw { stroke-dashoffset: 0; }
  .welcome-row.will-reveal .welcome-dg-col,
  .welcome-row.will-reveal .welcome-row-text > * { opacity: 1; transform: none; transition: none; }
  .welcome-row.will-reveal .welcome-row-text p + p { background-size: 2px 100%; }
  /* .is-visible is repeated so this outranks the reveal rule it is cancelling:
     the phrase is simply in the accent from the first frame, never faded into it. */
  .welcome-row.will-reveal .welcome-row-text p:first-of-type strong,
  .welcome-row.will-reveal.is-visible .welcome-row-text p:first-of-type strong {
    color: var(--wc-accent);
    transition: none;
  }
  .welcome-tabs-band,
  .welcome-tabs-list,
  .welcome-tab,
  .welcome-tab-icon,
  .welcome-tabs-list.is-ready .welcome-tabs-glider,
  .welcome-pop,
  .welcome-pop-cover img { transition: none; }
}
