/* home fit · baa.business homepage
   every snap section fits one screen (100dvh, measured against 100svh so safari's bars never cover it),
   in small, normal and large text. when a section cannot fit, js/home-fit.js adds .fit-tall: the section
   grows to its content, scrolls freely inside and snaps only at its top and foot. nothing is cut off. */

/* ---------- 1. panels ---------- */
html.home-snap, html.large-print.home-snap { scroll-snap-type: y mandatory; }
html.home-snap body.home-snap .snap-panel.snap-panel {
  height: 100vh; height: 100dvh;
  min-height: 0; max-height: none;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
html.home-snap body.home-snap .snap-panel.snap-panel.fit-tall {
  height: auto;
  min-height: 100vh; min-height: 100dvh;
  overflow: hidden; overflow: clip;
  scroll-snap-stop: normal;
}
html.home-snap body.home-snap .snap-panel.fit-tall .snap-panel-inner { height: auto; max-height: none; overflow: visible; }
.home-snap .snap-foot { display: block; flex: none; height: 1px; margin-top: -1px; pointer-events: none; scroll-snap-align: none; }
.home-snap .snap-panel.fit-tall > .snap-foot { scroll-snap-align: end; }
/* measuring pass (js): natural height of every panel */
html.home-snap body.home-snap.fit-measuring .snap-panel.snap-panel { height: auto !important; min-height: 0 !important; max-height: none !important; }
html.home-snap body.home-snap.fit-measuring .snap-panel-inner { height: auto !important; max-height: none !important; overflow: visible !important; }
/* contact is the last screen: it may always grow (form, sources, footer) */
html.home-snap body.home-snap .snap-panel.snap-contact .snap-panel-inner { overflow: visible; }

/* ---------- 2. section dots: 44px tap areas, labelled, the dot stays small ---------- */
.home-snap .snap-dots { right: 0; gap: 0; padding: 0; transition: opacity 0.3s; }
html.large-print .home-snap .snap-dots:not([hidden]) { display: flex !important; }
.home-snap .snap-dots.is-away { opacity: 0; pointer-events: none; }
.home-snap .snap-dots .snap-dot.snap-dot {
  position: relative;
  width: 44px; height: 44px;
  padding: 0 12px 0 0;
  border: 0; border-radius: 0;
  background: none; box-shadow: none; transform: none;
  display: flex; align-items: center; justify-content: flex-end;
  cursor: pointer;
}
.home-snap .snap-dots .snap-dot.snap-dot::after {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  transition: background 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.home-snap .snap-dots .snap-dot.snap-dot:hover::after { border-color: var(--purple-bright); transform: scale(1.15); }
.home-snap .snap-dots .snap-dot.snap-dot.is-active::after { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 12px var(--purple-glow); }
.home-snap .snap-dots .snap-dot.snap-dot:focus-visible { outline: none; }
.home-snap .snap-dots .snap-dot.snap-dot:focus-visible::after { outline: 2px solid var(--purple-bright); outline-offset: 3px; }
/* the label shows beside the dot on hover and keyboard focus */
.home-snap .snap-dots .snap-dot.snap-dot::before {
  content: attr(aria-label);
  position: absolute; inset: auto; right: 34px; top: 50%;
  transform: translate(4px, -50%);
  padding: 4px 10px;
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 999px;
  background: rgba(8, 7, 16, 0.92);
  color: #e9d5ff;
  font: 400 0.72rem/1.2 var(--font-sans, "Roboto", system-ui, sans-serif);
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
@media (hover: hover) {
  .home-snap .snap-dots .snap-dot.snap-dot:hover::before { opacity: 1; transform: translate(0, -50%); }
}
.home-snap .snap-dots .snap-dot.snap-dot:focus-visible::before { opacity: 1; transform: translate(0, -50%); }
@media (min-width: 861px) { .home-snap .snap-dots { right: 8px; } }
@media (max-width: 860px) {
  .home-snap .snap-dots .snap-dot.snap-dot { padding-right: 8px; }
  .home-snap .snap-dots .snap-dot.snap-dot::after { width: 8px; height: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-snap .snap-dots, .home-snap .snap-dots .snap-dot::after, .home-snap .snap-dots .snap-dot::before { transition: none; }
}

/* ---------- 3. one next step per world panel ---------- */
.snap-next { margin-top: 14px; }
.snap-next a {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(192, 132, 252, 0.42);
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #e9d5ff;
  font-size: 0.8rem; font-weight: 400; letter-spacing: 0.03em;
  text-transform: lowercase;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.snap-next a::after { content: ""; position: absolute; inset: -4px -2px; }
.snap-next a:hover, .snap-next a:focus-visible { border-color: var(--purple-bright); background: rgba(168, 85, 247, 0.16); color: #fff; }
.snap-next-k { color: #cfc8e6; }

/* ---------- 4. what we offer: compact cards, one primary step each ---------- */
html.home-snap body.home-snap .snap-panel.snap-panel.snap-wwd { justify-content: center; }
#what-we-offer .wwd-inner {
  width: min(1180px, calc(100% - 96px));
  padding: calc(var(--nav-h) + 16px) 0 20px;
  gap: clamp(14px, 2.6vh, 26px);
}
#what-we-offer .wwd-head .section-label { margin-bottom: 8px; }
#what-we-offer .wwd-head .section-title { margin-bottom: 6px; }
#what-we-offer .wwd-lede { margin: 0; }
#what-we-offer .wwd-grid.wwd-fit { display: grid; grid-auto-rows: auto; gap: 14px; align-items: stretch; }
#what-we-offer .wwd-fit .wwd-card.wwd-card {
  display: flex; flex-direction: column;
  padding: 18px 20px 14px;
  gap: 6px;
  border-radius: 18px;
  min-height: 0;
}
#what-we-offer .wwd-fit .wwd-card::before { border-radius: 18px 18px 0 0; }
#what-we-offer .wwd-fit .pillar-label { font-size: 0.66rem; letter-spacing: 0.16em; line-height: 1.3; }
#what-we-offer .wwd-fit .pillar-title { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.15; margin: 0; }
#what-we-offer .wwd-fit .pillar-lede,
#what-we-offer .wwd-fit p.st-latest#st-latest {
  font-size: 0.86rem; line-height: 1.45;
  color: var(--text-muted);
  max-width: none; flex: none; margin: 0;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
#what-we-offer .wwd-act {
  margin: auto 0 0; padding-top: 6px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px;
}
#what-we-offer .wwd-cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.1);
  color: #e9d5ff;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.03em;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
#what-we-offer .wwd-cta::after { content: ""; position: absolute; inset: -4px -2px; }
#what-we-offer .wwd-cta:hover, #what-we-offer .wwd-cta:focus-visible { border-color: var(--purple-bright); background: rgba(168, 85, 247, 0.2); color: #fff; }
#what-we-offer .wwd-quiet {
  position: relative;
  color: var(--text-muted);
  font-size: 0.78rem; letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  white-space: nowrap;
}
#what-we-offer .wwd-quiet::after { content: ""; position: absolute; inset: -14px -8px; }
#what-we-offer .wwd-quiet:hover { color: var(--purple-bright); border-color: var(--purple-bright); }
/* tablets and laptops: 2 x 2; wide: 4 across */
@media (min-width: 640px) { #what-we-offer .wwd-grid.wwd-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #what-we-offer .wwd-grid.wwd-fit { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
html.small-print #what-we-offer .wwd-grid.wwd-fit { gap: 12px; }

/* phones: a compact list, one card per row, no empty gaps */
@media (max-width: 639px) {
  #what-we-offer .wwd-inner { width: calc(100% - 64px); padding: calc(var(--nav-h) + 12px) 0 14px; gap: 12px; }
  #what-we-offer .wwd-head .section-label { font-size: 0.62rem; letter-spacing: 0.16em; margin-bottom: 4px; }
  #what-we-offer .wwd-head .section-title { font-size: 1.45rem; line-height: 1.1; margin-bottom: 4px; }
  #what-we-offer .wwd-lede { font-size: 0.8rem; line-height: 1.4; }
  html.home-snap #what-we-offer .wwd-grid.wwd-fit { grid-template-columns: minmax(0, 1fr) !important; gap: 8px; }
  #what-we-offer .wwd-fit .wwd-card.wwd-card { padding: 10px 14px 8px; gap: 2px; border-radius: 14px; }
  #what-we-offer .wwd-fit .wwd-card::before { border-radius: 14px 14px 0 0; }
  #what-we-offer .wwd-fit .pillar-label { display: none; }
  #what-we-offer .wwd-fit .pillar-title { font-size: 1.06rem; }
  #what-we-offer .wwd-fit .pillar-lede,
  #what-we-offer .wwd-fit p.st-latest#st-latest { font-size: 0.76rem; line-height: 1.4; -webkit-line-clamp: 2; line-clamp: 2; }
  #what-we-offer .wwd-fit p.st-latest#st-latest sup.cite { display: none; }
  #what-we-offer .wwd-act { padding-top: 4px; gap: 2px 16px; }
  #what-we-offer .wwd-cta { min-height: 34px; padding: 0 12px; font-size: 0.74rem; }
  #what-we-offer .wwd-cta::after { inset: -5px -2px; }
  #what-we-offer .wwd-quiet { font-size: 0.72rem; }
}
/* shorter phones (safari bars showing): drop the small labels, one-line notes */
@media (max-width: 639px) and (max-height: 759px) {
  #what-we-offer .wwd-head .wwd-lede, #what-we-offer .wwd-head .section-label { display: none; }
  #what-we-offer .wwd-fit .pillar-lede,
  #what-we-offer .wwd-fit p.st-latest#st-latest { -webkit-line-clamp: 1; line-clamp: 1; }
}
/* very short phones: title and step only */
@media (max-width: 639px) and (max-height: 619px) {
  html:not(.large-print) #what-we-offer .wwd-fit .pillar-lede, html:not(.large-print) #what-we-offer .wwd-fit p.st-latest#st-latest { display: none; }
  html:not(.large-print) #what-we-offer .wwd-fit .wwd-card.wwd-card { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 10px; row-gap: 4px; padding: 6px 8px 6px 14px; }
  html:not(.large-print) #what-we-offer .wwd-act { margin: 0; padding: 0; }
}

/* ---------- 5. phones: links stay clear of the dots' tap strip (44px at the right edge) ---------- */
@media (max-width: 639px) {
  .snap-next-k { display: none; }
  .home-snap .cd-meta { padding-right: 28px; }
  .snap-hero .hero-actions { gap: 10px; }
  .snap-hero .hero-actions .btn { padding-left: 16px; padding-right: 16px; }
}

/* ---------- 6. phones: copy clears the dots; short screens tighten the rhythm ---------- */
@media (max-width: 860px) {
  .home-snap .snap-hero .snap-copy { padding-right: 26px; }
  .home-snap .snap-copy-world .section-label,
  .home-snap .snap-copy-world .snap-line,
  .home-snap .snap-copy-world .snap-sub { padding-right: 26px; }
}
@media (max-width: 860px) and (max-height: 720px) {
  .home-snap .snap-copy { padding-top: calc(var(--nav-h) + 8px); padding-bottom: 28px; }
  .home-snap .snap-copy-world { padding-bottom: 24px; }
  .home-snap #beyond .snap-copy-world { padding-bottom: 150px; }
  .home-snap .snap-line { margin-bottom: 6px; }
  .home-snap .panel-countdowns { margin-top: 12px; gap: 6px; }
  .home-snap .cd-row { padding: 8px 12px; row-gap: 2px; }
  .home-snap .snap-next { margin-top: 8px; }
  .snap-hero .hero-eyebrow { margin-bottom: 8px; }
  .snap-hero h1 { font-size: clamp(1.9rem, 9vw, 2.3rem); margin-bottom: 10px; }
  .snap-hero .hero-concrete { margin-bottom: 16px; }
  .snap-hero .hero-stage { margin-top: 14px; }
  .home-snap .snap-hint { display: none; }
}
@media (max-width: 860px) and (max-height: 600px) {
  .snap-hero .hero-stage { display: none; }
  .home-snap .snap-line { font-size: 1.5rem; }
  .home-snap .snap-sub { line-height: 1.35; }
}
@media (max-width: 860px) and (max-height: 600px) {
  .home-snap .snap-copy-world:has(.cd-row + .cd-row) .snap-sub { display: none; }
}

/* ---------- 7. large text ---------- */
/* wide screens: the two countdowns of a panel sit side by side so the panel stays one screen */
@media (min-width: 861px) {
  html.large-print .home-snap .snap-copy-world:has(.cd-row + .cd-row) { max-width: min(60rem, calc(100% - 96px)); }
  html.large-print .home-snap .panel-countdowns:has(.cd-row + .cd-row) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; align-items: stretch; }
}
@media (min-width: 861px) and (max-height: 800px) {
  html.large-print .home-snap .snap-copy-world { padding-bottom: 40px; }
  html.large-print .home-snap .snap-line { margin-bottom: 6px; }
  html.large-print .home-snap .panel-countdowns { margin-top: 12px; }
}
/* phones: the eyebrow keeps to one line */
@media (max-width: 639px) {
  html.large-print .snap-hero .hero-eyebrow { font-size: 0.86rem; letter-spacing: 0.06em; margin-bottom: 8px; }
  html.large-print .snap-hero h1 { font-size: 2.1rem; margin-bottom: 10px; }
  html.large-print .snap-hero .hero-stage { display: none; }
  html.large-print .home-snap .snap-hero .snap-copy { padding-bottom: 32px; }
  html.large-print .snap-hero .hero-concrete { margin-bottom: 18px; }
}
/* tablets: two columns of cards so the section stays close to one screen */
@media (min-width: 700px) {
  html.large-print #what-we-offer .wwd-grid.wwd-fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html.large-print #what-we-offer .wwd-cta, html.large-print .snap-next a { font-size: 0.9rem; min-height: 44px; text-decoration: none; }
html.large-print #what-we-offer .wwd-cta::after, html.large-print .snap-next a::after { inset: 0; }
html.large-print #what-we-offer .wwd-quiet { font-size: 0.9rem; }
@media (min-width: 1200px) {
  html.large-print #what-we-offer .wwd-grid.wwd-fit { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 700px) and (max-height: 800px) {
  html.large-print #what-we-offer .wwd-head .wwd-lede, html.large-print #what-we-offer .wwd-fit .pillar-label { display: none; }
  html.large-print #what-we-offer .wwd-fit .wwd-card.wwd-card { padding: 16px 20px 12px; gap: 6px; }
  html.large-print #what-we-offer .wwd-inner { gap: 14px; }
}
