/* ============================================================================
   Mandioca v2 — the second pass.
   Alignment variation, the live transaction cards, embedded imagery, the deck
   controls, the back-to-top button, and the qualification form.
   Loaded after v2.css and v2ui.css.
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════════════
   CENTRED, BUT WIDE
   Everything sits on the page axis. What changes is that the content is
   allowed to use the width: a single narrow column left half the frame empty.
   ══════════════════════════════════════════════════════════════════════ */
.say { max-width: 64rem; }
.say p { max-width: 56ch; font-size: clamp(1rem, 1.35vw, 1.32rem); }
.say--wide { max-width: 74rem; }
.say--wide p { max-width: 64ch; }

/* the entries run ACROSS the frame instead of stacking down a thin column */
.stack--row {
  max-width: 82rem;
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 0 clamp(1.4rem, 3vw, 3.2rem);
  text-align: center;
}
.stack--row .item {
  border-top: 1px solid var(--hair);
  padding: clamp(1.4rem, 3vh, 2rem) 0 0;
}
/* two lines' worth of room whether the heading needs one or two, so every
   column's supporting line starts on the same baseline */
.stack--row .item h3 {
  font-size: clamp(1.15rem, 1.75vw, 1.6rem);
  min-height: 2.12em;
}
@media (max-width: 620px) { .stack--row .item h3 { min-height: 0; } }
.stack--row .item p { margin-left: auto; margin-right: auto; max-width: 34ch; font-size: 0.95rem; }
.stack--row .item__k { margin-bottom: 0.55rem; }

@media (max-width: 1100px) { .stack--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .stack--row { grid-template-columns: 1fr; } }

.acts--left { justify-content: flex-start; }

/* ══════════════════════════════════════════════════════════════════════
   IMAGERY — embedded in the composition, bled into the ground, never boxed
   ══════════════════════════════════════════════════════════════════════ */
.bleed {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  /* The mask lives on the CONTAINER so it clips the tint as well as the photo.
     The ellipse must finish INSIDE the box — at 115% the gradient was still
     ~55% opaque when it reached the left edge, which is the straight seam that
     kept showing. 72% puts full transparency well before any edge. */
  -webkit-mask-image: radial-gradient(72% 74% at 50% 50%, #000 2%, rgba(0,0,0,0.5) 38%, transparent 72%);
          mask-image: radial-gradient(72% 74% at 50% 50%, #000 2%, rgba(0,0,0,0.5) 38%, transparent 72%);
}
.bleed img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;                       /* they were disappearing at 0.4 */
  filter: saturate(0.62) contrast(1.06) brightness(1.02);
}
/* a teal wash so the photo belongs to this palette and not its own */
.bleed::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(8, 38, 34, 0.3), rgba(4, 8, 7, 0.42));
}

/* ── one picture, sitting under the section ────────────────────────────
   Not two mirrored copies pasted either side of the column. One frame,
   anchored to the bottom of the section, dissolving upward into the ground —
   the same way the device objects are cropped by the frame. */
.bleed--back {
  left: 0; right: 0; bottom: 0;
  height: 66%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.45) 32%, #000 72%, #000 100%);
          mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.45) 32%, #000 72%, #000 100%);
}
.bleed--back img {
  /* and the two ends fade, so it never meets the viewport as a straight cut */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  opacity: 0.62;
}
@media (max-width: 900px) { .bleed--back { height: 48%; } }

/* generous boxes, because the mask eats the outer quarter on every side */
.bleed--right { top: 0; right: -22%; width: 78%; height: 92%; }
.bleed--left  { top: 4%; left: -24%; width: 76%; height: 88%; }
.bleed--wide  { bottom: -8%; left: -6%; width: 112%; height: 62%; }
@media (max-width: 820px) {
  .bleed--right, .bleed--left { width: 118%; left: -9%; right: auto; height: 46%; top: auto; bottom: -4%; }
}

/* ══════════════════════════════════════════════════════════════════════
   HERO — the live transaction cards
   ══════════════════════════════════════════════════════════════════════ */
.glass {
  padding: 0.85rem 0.95rem;
  gap: 0.5rem;
  justify-content: center;
}
.glass__pair {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.6rem; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}
.glass__pair u { text-decoration: none; color: var(--lime); }
.glass__pair em {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  font-style: normal;
}
.glass__amt {
  font-size: clamp(0.95rem, 1.25vw, 1.2rem);
  font-weight: 600; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: nowrap;
}
.glass__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}
.glass__st { display: inline-flex; align-items: center; gap: 0.32rem; }
.glass__st i { width: 5px; height: 5px; border-radius: 50%; background: #46CFA0; flex: none; }
.glass__st.is-run i { background: var(--lime); }
.glass--fade { opacity: 0.18; transition: opacity 0.7s ease; }
.glass { transition: opacity 0.7s ease; }

/* ══════════════════════════════════════════════════════════════════════
   DECK CONTROLS
   ══════════════════════════════════════════════════════════════════════ */
.deck__nav {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  gap: 0.6rem;
  margin-top: clamp(1.5rem, 3.5vh, 2.2rem);
}
.deck__arrow {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.03);
  display: grid; place-items: center;
  cursor: pointer;
  transition: border-color 0.35s ease, background 0.35s ease;
}
.deck__arrow svg { width: 14px; height: 14px; fill: none; stroke: var(--grey); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.deck__arrow:hover { border-color: rgba(217, 223, 45, 0.45); background: rgba(217, 223, 45, 0.07); }
.deck__arrow:hover svg { stroke: var(--lime); }
.deck__arrow:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.deck__dots { display: flex; gap: 0.45rem; flex-wrap: wrap; justify-content: center; }
.deck__dots button {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  color: var(--grey-dim);
  padding: 0.5em 0.9em;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: color 0.5s ease, border-color 0.5s ease, background 0.5s ease;
}
.deck__dots button:hover { color: var(--grey); border-color: var(--hair-2); }
.deck__dots button.on {
  color: var(--lime);
  border-color: rgba(217, 223, 45, 0.42);
  background: rgba(217, 223, 45, 0.06);
}
.deck__dots button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ══════════════════════════════════════════════════════════════════════
   BACK TO TOP + the jump veil
   ══════════════════════════════════════════════════════════════════════ */
.totop {
  position: fixed;
  right: clamp(1rem, 2.4vw, 2rem);
  bottom: clamp(1rem, 2.4vw, 2rem);
  z-index: 75;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(217, 223, 45, 0.28);
  background: rgba(10, 14, 12, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2,0.75,0.25,1), visibility 0.5s, border-color 0.35s ease;
}
.totop.on { opacity: 1; visibility: visible; transform: none; }
.totop svg { width: 17px; height: 17px; fill: none; stroke: var(--lime); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.totop:hover { border-color: rgba(217, 223, 45, 0.6); }
.totop:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.veil {
  position: fixed; inset: 0; z-index: 90;
  background: var(--black);
  opacity: 0; visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s linear, visibility 0.16s;
}
.veil.on { opacity: 1; visibility: visible; }

/* ══════════════════════════════════════════════════════════════════════
   THE QUALIFICATION FORM
   ══════════════════════════════════════════════════════════════════════ */
.qualify {
  position: relative; z-index: 3;
  width: 100%; max-width: 54rem;
  margin: clamp(2.4rem, 6vh, 3.6rem) auto 0;
  text-align: left;
}

.q__head {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: clamp(1.6rem, 4vh, 2.4rem);
}
.q__bar {
  flex: 1; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.q__bar span {
  display: block; height: 100%; width: 20%;
  background: var(--lime);
  transition: width 0.7s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.q__count {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--grey-dim); font-variant-numeric: tabular-nums;
}

.q__step {
  border: 0; margin: 0; padding: 0; min-width: 0;
  display: flex; flex-direction: column; gap: 1rem;
}
.q__step[hidden] { display: none; }
.q__legend {
  padding: 0; margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 600; letter-spacing: -0.032em; line-height: 1.06;
  color: #fff;
}
.q__legend:focus { outline: none; }
.q__label {
  margin: 0.6rem 0 -0.2rem;
  font-family: var(--mono); font-size: 0.63rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--grey-dim);
}
.q__note {
  margin: 0;
  font-size: 0.82rem; line-height: 1.55;
  color: var(--grey);
  border-left: 2px solid rgba(217, 223, 45, 0.4);
  padding-left: 0.8rem;
}

/* option cards */
.q__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.q__grid--3 { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
@media (max-width: 640px) { .q__grid, .q__grid--3 { grid-template-columns: 1fr; } }

.q__card {
  display: flex; flex-direction: column; gap: 0.22rem;
  text-align: left;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  color: inherit; font: inherit;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.q__card b { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.015em; color: #fff; }
.q__card span { font-size: 0.8rem; line-height: 1.45; color: var(--grey); }
.q__card:hover { border-color: var(--hair-2); background: rgba(255, 255, 255, 0.045); }
.q__card.is-on {
  border-color: rgba(217, 223, 45, 0.55);
  background: rgba(217, 223, 45, 0.07);
}
.q__card.is-on b { color: var(--lime); }
.q__card--tight { padding: 0.8rem 0.95rem; }
.q__card:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* chips */
.q__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.q__chip {
  font: inherit; font-size: 0.83rem;
  color: var(--grey);
  padding: 0.5em 0.95em;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.q__chip:hover { border-color: var(--hair-2); color: #fff; }
.q__chip.is-on {
  color: var(--lime);
  border-color: rgba(217, 223, 45, 0.5);
  background: rgba(217, 223, 45, 0.08);
}
.q__chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* a group that failed validation */
[data-group].is-bad .q__card,
[data-group].is-bad .q__chip { border-color: rgba(232, 100, 100, 0.55); }

.q__nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.9rem;
}
.q__nav .btn { border: 0; cursor: pointer; font-family: inherit; }
.q__nav .btn--line { border: 1px solid rgba(255, 255, 255, 0.2); }
.qualify.is-sending { opacity: 0.55; pointer-events: none; }

.field i { font-style: normal; color: var(--grey-dim); text-transform: none; letter-spacing: 0; }

/* outcomes */
.q__result {
  display: flex; flex-direction: column; gap: 0.7rem;
  border: 1px solid rgba(217, 223, 45, 0.28);
  background: rgba(217, 223, 45, 0.05);
  border-radius: 14px;
  padding: 1.8rem 1.7rem;
}
.q__result[hidden] { display: none; }
.q__result b { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: -0.028em; }
.q__result p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--grey); max-width: 52ch; }
.q__cal { margin-top: 0.6rem; border-radius: 12px; overflow: hidden; min-height: 620px; }
.q__cal iframe { width: 100%; height: 620px; border: 0; display: block; }

/* ── offices, in a row under the form ─────────────────────────────────── */
.offices-row {
  position: relative; z-index: 3;
  width: 100%; max-width: 62rem;
  margin: clamp(2.6rem, 6vh, 4rem) auto 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.6rem clamp(1.5rem, 4vw, 3rem);
  padding-top: clamp(1.6rem, 4vh, 2.4rem);
  border-top: 1px solid var(--hair);
  text-align: left;
}
.offices-row dt {
  font-size: 0.85rem; font-weight: 500; color: #fff;
  margin-bottom: 0.28rem;
}
.offices-row dd {
  margin: 0; font-size: 0.8rem; line-height: 1.55; color: var(--grey-dim);
}

/* ── partner wordmarks ────────────────────────────────────────────────── */
.marq__track li { gap: 0; }
.pl {
  font-family: var(--font);
  font-size: clamp(1.15rem, 1.9vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
  transition: color 0.4s ease;
}
.marq:hover .pl { color: rgba(255, 255, 255, 0.9); }
/* when the real artwork lands, the img simply takes the span's place */
.marq__track img { height: clamp(20px, 2.4vw, 30px); width: auto; opacity: 0.78; }

@media (prefers-reduced-motion: reduce) {
  .glass, .glass--fade, .totop, .veil, .q__bar span { transition: none; }
}
