/* ==========================================================================
   01 TWO WAYS TO WORK (owned by Agent HERO). Every rule is scoped under .offer.
   The flood field. White strokes and white chips on brand blue; small text is
   abyss navy (white is for the display headline only).
   One diagram, two states: [data-mode="platform" | "dfy"] on .offer-body.
   Only the operator token and the two "who does what" brackets change.
   ========================================================================== */

.offer {
  --o-stroke: 0.1562rem;
  --o-node-h: clamp(3.5rem, 4.6vw, 4.125rem);
  --o-tile-w: clamp(0.875rem, 1.45vw, 1.3125rem);
  --o-net: clamp(1.75rem, 2.7vw, 2.5rem);
}

/* The handoff from the hero film. While the hero is live, this section rises over the
   end of the pinned stage: its first --offer-rise is transparent, and the stage behind it
   has just been wiped to the same blue, so there is no seam and no crest. */
.mf-hero-live .offer {
  --offer-rise: 50vh;
  --offer-rise: 50svh;
  margin-top: calc(-1 * var(--offer-rise));
  padding-top: clamp(4rem, 10vh, 7rem);
  background-color: transparent;
  background-image: linear-gradient(to bottom, rgba(255, 61, 113, 0) calc(var(--offer-rise) - 2px), var(--flood) calc(var(--offer-rise) - 2px));
}
.mf-hero-live .offer.crest::before { display: none; }

/* ---------- Head ---------- */
.offer .offer-eyebrow { color: var(--fg-2); margin-bottom: clamp(1.375rem, 2.4vw, 2rem); }
.offer .offer-title { max-width: 13.2em; }
.offer .offer-lead {
  max-width: 24.5em;
  margin-top: clamp(1.25rem, 2.2vw, 1.875rem);
}

/* ---------- Body ---------- */
.offer .offer-body { margin-top: clamp(2.75rem, 5.2vw, 4.75rem); }

/* ---------- The switch ---------- */
.offer .offer-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: min(100%, 27.5rem);
  margin: 0;
  padding: 0.3125rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--abyss);
}
html:not(.js) .offer .offer-switch { display: none; }
.offer .offer-thumb {
  position: absolute;
  top: 0.3125rem;
  bottom: 0.3125rem;
  left: 0.3125rem;
  width: calc(50% - 0.3125rem);
  border-radius: var(--r-pill);
  background: #ffffff;
  transition: transform 520ms var(--ease-tide);
}
.offer [data-mode="dfy"] .offer-thumb { transform: translateX(100%); }
.offer .offer-opt {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 3.5rem;
  padding: 0.5rem 1.5rem;
  border-radius: var(--r-pill);
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  transition: color 260ms ease;
  -webkit-tap-highlight-color: transparent;
}
.offer .offer-opt-name { font-size: 1rem; font-weight: 640; line-height: 1.1; letter-spacing: -0.005em; }
.offer .offer-opt-sub { font-size: 0.8125rem; font-weight: 540; line-height: 1.1; color: #c4c8d0; transition: color 260ms ease; }
.offer [data-mode="platform"] .offer-opt:nth-of-type(1),
.offer [data-mode="dfy"] .offer-opt:nth-of-type(2) { color: var(--abyss); }
.offer [data-mode="platform"] .offer-opt:nth-of-type(1) .offer-opt-sub,
.offer [data-mode="dfy"] .offer-opt:nth-of-type(2) .offer-opt-sub { color: #2b0812; }
.offer .offer-opt:focus-within { outline: 0.1562rem solid #ffffff; outline-offset: 0.1875rem; }
@supports selector(:has(a)) {
  .offer .offer-opt:focus-within { outline: none; }
  .offer .offer-opt:has(:focus-visible) { outline: 0.1562rem solid #ffffff; outline-offset: 0.1875rem; }
}

/* ---------- The diagram ---------- */
.offer .offer-dia { margin: clamp(1.875rem, 3.4vw, 3rem) 0 0; }

.offer .offer-row {
  display: grid;
  /* content · who runs it · the platform stretch; the phones and the five platforms keep their own width */
  grid-template-columns:
    minmax(0, 1fr) minmax(2.25rem, 0.42fr)
    minmax(0, 1.12fr) minmax(2.25rem, 0.42fr)
    minmax(0, 1.2fr) minmax(2.25rem, 0.42fr)
    auto minmax(2.25rem, 0.42fr)
    auto;
  grid-template-rows: auto auto auto;
  align-items: center;
}
.offer .offer-zone {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / span 2;
  min-width: 0;
}
.offer .offer-zone--1 { grid-column: 1; }
.offer .offer-zone--2 { grid-column: 3; }
.offer .offer-zone--3 { grid-column: 5; }
.offer .offer-zone--4 { grid-column: 7; }
.offer .offer-zone--5 { grid-column: 9; }
.offer .offer-link { grid-row: 2; }
.offer .offer-link--1 { grid-column: 2; }
.offer .offer-link--2 { grid-column: 4; }
.offer .offer-link--3 { grid-column: 6; }
.offer .offer-link--4 { grid-column: 8; }

.offer .offer-zcap {
  align-self: end;
  padding-bottom: 1rem;
  font-size: 0.9062rem;
  font-weight: 620;
  line-height: 1.2;
  color: var(--fg-2);
}
.offer .offer-node { align-self: center; min-width: 0; }

/* content: a chip (thumbnail + filename), the page's one example post */
.offer .offer-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.offer .offer-thumbnail {
  flex: none;
  width: var(--o-node-h);
  height: var(--o-node-h);
  border-radius: 1rem;
  background: #ffffff;
  display: grid;
  place-items: center;
}
.offer .offer-thumbnail svg { width: 44%; height: 44%; fill: var(--flood); }
.offer .offer-file { color: var(--fg-2); font-weight: 500; }

/* operator: a slot in the row; the token inside it is what changes */
.offer .offer-op {
  position: relative;
  height: var(--o-node-h);
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 var(--o-stroke) #ffffff;
  overflow: hidden;
}
.offer .offer-token {
  position: absolute;
  inset: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--r-pill);
  font-size: clamp(0.9062rem, 1.2vw, 1.0312rem);
  font-weight: 640;
  line-height: 1;
  white-space: nowrap;
  transition: transform 620ms var(--ease-tide);
}
.offer .offer-token .i { width: 1.125rem; height: 1.125rem; stroke-width: 2; }
.offer .offer-token img { width: 1.125rem; height: 1.125rem; }
.offer .offer-token--you { background: #ffffff; color: var(--abyss); }
.offer .offer-token--us { background: var(--abyss); color: #ffffff; transform: translateY(135%); }
.offer [data-mode="dfy"] .offer-token--you { transform: translateY(-135%); }
.offer [data-mode="dfy"] .offer-token--us { transform: none; }

/* the platform: one white card */
.offer .offer-plat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: var(--o-node-h);
  padding: 0.5rem 0.875rem;
  border-radius: 1.125rem;
  background: #ffffff;
  color: var(--abyss);
  font-size: clamp(0.9062rem, 1.25vw, 1.0625rem);
  font-weight: 660;
  font-stretch: 112%;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.offer .offer-plat img { width: 1.5rem; height: 1.5rem; flex: none; }
/* the Olsaar wordmark, in its light-background colours (the card is white on the pink field) */
.offer .offer-word { --lg-1: #0a0a0b; --lg-2: #6b7280; --lg-3: #ff3d71; display: block; width: min(100%, 9.5rem); aspect-ratio: 1736.5 / 178; }

/* each account's phone: tiles */
.offer .offer-phones {
  display: grid;
  grid-template-columns: repeat(6, minmax(var(--o-tile-w), 1fr));
  gap: clamp(0.3125rem, 0.6vw, 0.5625rem);
}
/* "Your accounts": one round avatar per account (not phones: the diagram never says how a post goes out) */
.offer .offer-phones i {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
}

/* the five platforms: white chips, always this order */
.offer .offer-nets {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.3125rem, 0.6vw, 0.5625rem);
}
.offer .offer-nets span {
  width: var(--o-net);
  height: var(--o-net);
  border-radius: 50%;
  background: #ffffff;
  color: var(--abyss);
  display: grid;
  place-items: center;
}
.offer .offer-nets .g { width: 44%; height: 44%; }

/* links: solid white strokes = the content path */
.offer .offer-link {
  position: relative;
  height: 1rem;
  margin-inline: clamp(0.375rem, 0.8vw, 0.75rem);
}
.offer .offer-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 2px;
  top: 50%;
  height: var(--o-stroke);
  margin-top: calc(var(--o-stroke) / -2);
  border-radius: 2px;
  background: #ffffff;
}
.offer .offer-link::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 0.5625rem;
  height: 0.5625rem;
  margin-top: -0.3594rem;
  border-top: var(--o-stroke) solid #ffffff;
  border-right: var(--o-stroke) solid #ffffff;
  border-radius: 1px;
  transform: rotate(45deg);
}
/* the example post travelling the row (js) */
.offer .offer-link i {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.6875rem;
  height: 0.6875rem;
  margin: -0.3438rem 0 0 -0.3438rem;
  border-radius: 0.2188rem;
  background: var(--abyss);
  opacity: 0;
}

/* who does what: the only things that move */
.offer .offer-side {
  position: relative;
  grid-row: 3;
  height: 1.375rem;
  margin-top: 1.25rem;
  margin-bottom: 1rem;
  border: var(--o-stroke) solid #ffffff;
  border-top: 0;
  border-radius: 0 0 1rem 1rem;
}
.offer .offer-side span {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -50%);
  padding: 0.4375rem 0.8125rem;
  border-radius: var(--r-pill);
  background: #ffffff;
  color: var(--abyss);
  font-size: 0.8438rem;
  font-weight: 640;
  line-height: 1;
  white-space: nowrap;
}
.offer .offer-side--us { border-color: var(--abyss); }
.offer .offer-side--us span { background: var(--abyss); color: #ffffff; }
.offer [data-mode="platform"] .offer-side--you { grid-column: 1 / 4; }
.offer [data-mode="platform"] .offer-side--us { grid-column: 5 / 8; }
.offer [data-mode="dfy"] .offer-side--you { grid-column: 1 / 2; }
.offer [data-mode="dfy"] .offer-side--us { grid-column: 3 / 8; }

/* ---------- The two options: white islands ---------- */
.offer .offer-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  column-gap: 1.5rem;
  margin-top: clamp(2.5rem, 4.6vw, 4.25rem);
}
/* A paper island inside the flood field. The paper variables are set here rather than with a
   nested data-theme, so the nav (which samples data-theme under it) stays on the flood field. */
.offer .offer-card {
  --bg: var(--paper);
  --surface: #ffffff;
  --fg: #0a0a0b;
  --fg-2: #3d424c;
  --fg-3: #61687a;
  --line: rgba(10, 10, 11, 0.11);
  --line-2: rgba(10, 10, 11, 0.22);
  --accent: var(--flood);
  --link: #c8124a;
  --shadow: 0 1.875rem 3.75rem -1.5rem rgba(11, 13, 16, 0.4);
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / span 5;
  padding: clamp(1.5rem, 2.7vw, 2.5rem);
  border-radius: var(--r-4);
  background: var(--foam);
  color: var(--fg-2);
  cursor: pointer;
  transition: background-color 320ms ease, box-shadow 320ms ease;
}
.offer [data-mode="platform"] .offer-card[data-offer-card="platform"],
.offer [data-mode="dfy"] .offer-card[data-offer-card="dfy"] {
  background: #ffffff;
  box-shadow: var(--shadow);
  cursor: default;
}
.offer .offer-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: clamp(1.125rem, 2vw, 1.75rem);
}
.offer .offer-card-name {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.0625rem;
  font-weight: 640;
  line-height: 1;
  color: var(--fg);
}
.offer .offer-card-name .tile { background: transparent; box-shadow: inset 0 0 0 1.75px var(--fg); transition: background-color 320ms ease, box-shadow 320ms ease; }
.offer .offer-card-flag {
  padding: 0.375rem 0.6875rem;
  border-radius: var(--r-pill);
  background: var(--abyss);
  color: #ffffff;
  font-size: 0.7812rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 320ms ease, transform 320ms var(--ease-out);
}
.offer [data-mode="platform"] [data-offer-card="platform"] .offer-card-flag,
.offer [data-mode="dfy"] [data-offer-card="dfy"] .offer-card-flag { opacity: 1; transform: none; }
.offer [data-mode="platform"] [data-offer-card="platform"] .offer-card-name .tile,
.offer [data-mode="dfy"] [data-offer-card="dfy"] .offer-card-name .tile { background: var(--flood); box-shadow: inset 0 0 0 1.75px var(--flood); }

.offer .offer-promise {
  font-size: clamp(1.5625rem, 2.55vw, 2.375rem);
  max-width: 15em;
  margin-bottom: clamp(1.25rem, 2.2vw, 1.875rem);
}
.offer .offer-gets { margin-bottom: clamp(1.25rem, 2.2vw, 1.875rem); }
.offer .offer-gets li {
  position: relative;
  padding: 0.6875rem 0 0.6875rem 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem;
  font-weight: 520;
  line-height: 1.35;
  color: var(--fg);
  text-wrap: pretty;
}
.offer .offer-gets li:last-child { border-bottom: 1px solid var(--line); }
.offer .offer-gets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.875rem;
  width: 0.5rem;
  height: 1.0625rem;
  border-radius: 0.1562rem;
  background: var(--flood);
}
.offer .offer-for {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.875rem;
  align-items: baseline;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--fg-2);
  margin-bottom: clamp(1.375rem, 2.4vw, 2rem);
  text-wrap: pretty;
}
.offer .offer-for .t-label { color: var(--fg-2); font-weight: 640; }
.offer .offer-cta { justify-self: start; align-self: end; }
/* a paper island inside the flood field: the primary action is the ink pill again */
.offer .offer-card .btn-primary { background: var(--navy); color: var(--paper); }
.offer .offer-card .btn-primary:hover { background: #26272b; }
.offer .offer-cta .i { transition: transform var(--dur-2) var(--ease-out); }
.offer .offer-cta:hover .i { transform: translateX(0.1875rem); }

/* ---------- Narrow desktop: the filename drops under the thumbnail, which stays on the row's axis ---------- */
@media (min-width: 901px) and (max-width: 1180px) {
  .offer .offer-row {
    grid-template-columns:
      auto minmax(2.25rem, 0.42fr)
      minmax(0, 1.12fr) minmax(2.25rem, 0.42fr)
      minmax(0, 1.2fr) minmax(2.25rem, 0.42fr)
      auto minmax(2.25rem, 0.42fr)
      auto;
  }
  .offer .offer-chip { position: relative; display: block; width: var(--o-node-h); }
  .offer .offer-file { position: absolute; left: 0; top: calc(100% + 0.5rem); white-space: nowrap; }
  .offer .offer-side { margin-top: 2.25rem; }
}

/* ---------- Vertical diagram (tablet + mobile) ---------- */
@media (max-width: 900px) {
  .offer {
    --o-node-h: 3.625rem;
    --o-tile-w: 1.1875rem;
    --o-net: 2.5rem;
  }
  .offer .offer-switch { display: grid; width: 100%; max-width: 28.75rem; }
  .offer .offer-opt { padding: 0.5rem 0.625rem; min-height: 3.625rem; }

  .offer .offer-dia { max-width: 28.75rem; }
  .offer .offer-row {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-rows: none;
    column-gap: 1rem;
    align-items: stretch;
  }
  .offer .offer-zone {
    display: block;
    grid-column: 2;
    padding-block: 0.375rem;
  }
  .offer .offer-zone--1 { grid-row: 1; }
  .offer .offer-zone--2 { grid-row: 3; }
  .offer .offer-zone--3 { grid-row: 5; }
  .offer .offer-zone--4 { grid-row: 7; }
  .offer .offer-zone--5 { grid-row: 9; }
  .offer .offer-link { grid-column: 2; width: 1rem; height: 1.875rem; margin: 0.25rem 0 0.25rem calc(var(--o-node-h) / 2 - 0.5rem); }
  .offer .offer-link--1 { grid-row: 2; }
  .offer .offer-link--2 { grid-row: 4; }
  .offer .offer-link--3 { grid-row: 6; }
  .offer .offer-link--4 { grid-row: 8; }
  .offer .offer-link::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 2px;
    width: var(--o-stroke);
    height: auto;
    margin: 0 0 0 calc(var(--o-stroke) / -2);
  }
  .offer .offer-link::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    margin: 0 0 0 -0.3594rem;
    transform: rotate(135deg);
  }
  .offer .offer-link i { left: 50%; top: 0; }

  .offer .offer-zcap { padding-bottom: 0.625rem; }
  .offer .offer-chip { flex-direction: row; align-items: center; }
  .offer .offer-op,
  .offer .offer-plat { max-width: 15.625rem; }
  .offer .offer-plat { justify-content: flex-start; padding-inline: 1.125rem; }

  .offer .offer-side {
    grid-column: 1;
    justify-self: end;
    width: 1.375rem;
    height: auto;
    margin: 0;
    border: var(--o-stroke) solid #ffffff;
    border-right: 0;
    border-radius: 1rem 0 0 1rem;
  }
  .offer .offer-side--us { border-color: var(--abyss); }
  .offer .offer-side span {
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
  }
  .offer [data-mode="platform"] .offer-side--you { grid-column: 1; grid-row: 1 / 4; }
  .offer [data-mode="platform"] .offer-side--us { grid-column: 1; grid-row: 5 / 8; }
  .offer [data-mode="dfy"] .offer-side--you { grid-column: 1; grid-row: 1 / 2; }
  .offer [data-mode="dfy"] .offer-side--us { grid-column: 1; grid-row: 3 / 8; }
  .offer .offer-zone--1 { min-height: 6.75rem; }
}

@media (max-width: 760px) {
  .mf-hero-live .offer { --offer-rise: 40vh; --offer-rise: 40svh; padding-top: 3.75rem; }
  .offer .offer-cards { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 1rem; }
  .offer .offer-card { display: block; grid-row: auto; border-radius: var(--r-3); }
  .offer .offer-card-top { flex-wrap: wrap; }
  .offer .offer-for { grid-template-columns: minmax(0, 1fr); row-gap: 0.375rem; }
  .offer .offer-cta { width: 100%; }
}
