/* Together Board product page (/togetherboard). Page-only styles; the site header and footer keep
 * styles.css. Palette and type come from the app's Design/tokens. Scroll effects read --p (0…1),
 * set by togetherboard.js. Devices are Apple Frames images; nothing here draws hardware. */

.tboard {
  --tb-paper: #efe6d6;
  --tb-paper-light: #f6f1e7;
  --tb-ink: #2a251d;
  --tb-ink-soft: #6b6355;
  --tb-coral: #ff5e6c;
  --tb-coral-deep: #e8503f;
  --tb-coral-grad: linear-gradient(140deg, #ff8a7a, #ff4d6d);
  --tb-blue: #0a84ff;
  --tb-sticky: linear-gradient(180deg, #ffe98f, #ffdf6a);
  --tb-sticky-ink: #6b5a12;
  --tb-green: #22a97a;
  --tb-cork: #241c15;
  --tb-cork-deep: #18120d;
  --tb-cream: #f3e9d8;
  --tb-muted: color-mix(in oklch, var(--tb-ink) 66%, transparent);
  --tb-muted-dark: color-mix(in oklch, var(--tb-cream) 68%, transparent);
  --tb-grain: radial-gradient(rgb(120 90 40 / 0.07) 1.4px, transparent 1.6px) 0 0 / 16px 16px;
  --tb-header: 64px;
  --tb-pin: calc(100svh - var(--tb-header));
  --tb-display: 'Fredoka', var(--font-display, system-ui), sans-serif;
  --tb-hand: 'Caveat', 'Bradley Hand', cursive;
  background: var(--tb-paper);
  color: var(--tb-ink);
  font-family: var(--font-body, system-ui, sans-serif);
  overflow-x: clip;
}

:where(.tboard) :is(h1, h2, h3) {
  font-family: var(--tb-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
:where(.tboard) :is(h1, h2, h3, p) { color: inherit; }
:where(.tboard) p { margin: 0; text-wrap: pretty; }
:where(.tboard) :is(img, video) { display: block; max-width: 100%; height: auto; }

.tb-paper { background: var(--tb-grain), var(--tb-paper); color: var(--tb-ink); }
.tb-dark { background: var(--tb-cork); color: var(--tb-cream); }
.tb-dark .tb-lede { color: var(--tb-muted-dark); }

.tb-eyebrow {
  display: inline-block;
  font-family: var(--tb-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--tb-coral-deep);
  margin-bottom: 16px;
}
.tb-dark .tb-eyebrow { color: var(--tb-coral); }
.tb-h2 { font-size: clamp(40px, 6.6vw, 92px); }
.tb-h3 { font-size: clamp(30px, 4vw, 54px); }
.tb-lede { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.5; color: var(--tb-muted); max-width: 34em; }
.tb-hand { font-family: var(--tb-hand); font-weight: 700; color: var(--tb-coral-deep); }
.tb-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.tb-center { text-align: center; }
.tb-center .tb-lede { margin-left: auto; margin-right: auto; }

.tb-badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform 0.2s ease; }
.tb-badge:hover { transform: translateY(-2px); }
.tb-badge:focus-visible { outline: 3px solid var(--tb-coral); outline-offset: 4px; }
.tb-badge img { height: 54px; width: auto; }

.tb-icon { border-radius: 22.37%; box-shadow: 0 18px 44px rgb(60 40 20 / 0.25), 0 0 0 1px rgb(0 0 0 / 0.06); }

/* Pinned sections: a tall track with a sticky stage. */
.tb-track { position: relative; }
.tb-stage {
  position: sticky;
  top: var(--tb-header);
  height: var(--tb-pin);
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* Devices: screenshots framed with Apple Frames (frames-cli), transparent around the hardware. */
.tb-phone {
  position: relative;
  width: min(360px, 74vw);
  aspect-ratio: 900 / 1836;
  filter: drop-shadow(0 36px 50px rgb(60 40 20 / 0.3));
}
.tb-phone > img, .tb-screens { width: 100%; height: 100%; }
.tb-screens { position: relative; }
.tb-screens img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.55s ease;
}
.tb-screens img:first-child, .tb-screens img.is-on { opacity: 1; }
.tb-screens img.is-on { z-index: 1; }

/* A walkthrough video under the bare hardware. Offsets are each frame's screen rectangle from
 * Apple Frames' NewFrames.json, as percentages of the frame image; --mask is that screen's opening,
 * cut from the frame by scripts/togetherboard-assets.sh. */
.tb-device { position: relative; }
.tb-device__hw { position: relative; z-index: 1; width: 100%; height: auto; pointer-events: none; }
.tb-device__screen {
  position: absolute; object-fit: cover; background: #111;
  -webkit-mask: var(--mask) 0 0 / 100% 100% no-repeat;
          mask: var(--mask) 0 0 / 100% 100% no-repeat;
}
.tb-device--iphone { aspect-ratio: 900 / 1836; }
.tb-device--iphone .tb-device__screen { --mask: url(../img/togetherboard/iphone-mask.png); left: 5.102%; top: 2.2%; width: 89.796%; height: 95.6%; }
.tb-device--watch { aspect-ratio: 600 / 960; }
.tb-device--watch .tb-device__screen { --mask: url(../img/togetherboard/watch-mask.png); left: 14.833%; top: 23.229%; width: 70.333%; height: 53.542%; }
.tb-device--mac { aspect-ratio: 3860 / 2540; }
.tb-device--mac .tb-device__screen { --mask: url(../img/togetherboard/mac-mask.png); left: 10.829%; top: 11.339%; width: 78.342%; height: 77.323%; }

/* Pushpins and paper cards, the app's motifs (decoration only). */
.tb-pinhead {
  --pin: #ff4d6d; --pin-hi: #ff9a8b; --pin-edge: #c92c4b;
  position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--pin-hi) 0 18%, var(--pin) 45%, var(--pin-edge) 100%);
  box-shadow: 0 3px 4px rgb(0 0 0 / 0.28);
}
.tb-pinhead--blue { --pin: #0a84ff; --pin-hi: #9cc6ff; --pin-edge: #0655b3; }
.tb-pinhead--amber { --pin: #f0a91e; --pin-hi: #ffe19a; --pin-edge: #b67a0c; }
.tb-pinhead--green { --pin: #22a97a; --pin-hi: #a9f0d1; --pin-edge: #167a56; }
.tb-pinhead--purple { --pin: #a259ff; --pin-hi: #d7b9ff; --pin-edge: #6c2fd1; }

.tb-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 14px 26px -14px rgb(0 0 0 / 0.35), 0 1px 0 rgb(0 0 0 / 0.04);
  color: var(--tb-ink);
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
}
.tb-card small { display: block; font: 600 11px/1.2 var(--font-mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; }
.tb-card b { font-family: var(--tb-display); font-weight: 600; }
.tb-card--sticky { background: var(--tb-sticky); color: var(--tb-sticky-ink); border-radius: 5px; font: 700 26px/1.05 var(--tb-hand); }
.tb-card--count { background: var(--tb-coral-grad); color: #fff; }
.tb-card--count b { font-size: 46px; line-height: 1; }
.tb-card__bar { height: 22px; border-radius: 7px; margin-top: 7px; padding: 0 9px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; background: linear-gradient(90deg, var(--c) var(--w), #f3eee5 var(--w)); }
.tb-card__task { display: flex; gap: 8px; align-items: center; margin-top: 7px; font-size: 14px; }
.tb-card__task i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c7bfae; flex: none; }
.tb-card__task.is-done i { background: var(--tb-green); border-color: var(--tb-green); }
.tb-card__task.is-done span { text-decoration: line-through; opacity: 0.5; }

/* 1. Hero: pins scattered around the name, gathering onto the board as you scroll */
.tb-hero { height: 230svh; }
.tb-hero .tb-stage { place-items: stretch; }
.tb-hero__content {
  position: absolute; left: 0; right: 0; top: clamp(32px, 9vh, 110px);
  padding: 0 24px; text-align: center; z-index: 2;
  opacity: clamp(0, calc(1 - var(--p, 0) * 2.6), 1);
  transform: translateY(calc(var(--p, 0) * -120px)) scale(calc(1 - var(--p, 0) * 0.15));
}
.tb-hero__icon { width: clamp(80px, 8vw, 108px); margin: 0 auto 20px; }
.tb-hero h1 { font-size: clamp(56px, 10vw, 140px); font-weight: 700; letter-spacing: -0.035em; }
.tb-hero__sub { font-size: clamp(20px, 2.4vw, 30px); margin: 12px auto 26px; max-width: 22em; color: var(--tb-muted); }
.tb-hero__platforms { margin-top: 18px; font-size: 14px; letter-spacing: 0.03em; color: var(--tb-muted); }
.tb-hero__pins { position: absolute; inset: 0; z-index: 1; --g: clamp(0, calc(var(--p, 0) * 1.7), 1); }
.tb-hero__pins .tb-card {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: var(--w, 210px);
  transform:
    translate(calc((50 - var(--x)) * 1vw * var(--g) - 50%), calc((62 - var(--y)) * var(--tb-pin) / 100 * var(--g)))
    rotate(calc(var(--r) * (1 - var(--g))))
    scale(calc(1 - var(--g) * 0.6));
  opacity: calc(1 - var(--g) * 1.1);
  animation: tb-drop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1.25) both;
  animation-delay: calc(0.25s + var(--i) * 0.12s);
}
@keyframes tb-drop {
  from { translate: 0 -40px; opacity: 0; }
  to { translate: 0 0; }
}
.tb-hero__phone {
  position: absolute; left: 50%; bottom: 0;
  width: min(360px, 70vw, calc((var(--tb-pin) - 40px) * 0.49));
  transform: translate(-50%, calc((1 - clamp(0, calc(var(--p, 0) * 1.5), 1)) * 82%));
  z-index: 0;
}

/* 2. Statement: the river line gives way to the wall, beside the walkthrough */
.tb-intro { height: 240svh; }
.tb-intro .tb-stage { grid-template-columns: 1.1fr auto; gap: clamp(32px, 6vw, 96px); max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.tb-intro__lines .tb-h2 { font-size: clamp(38px, 5.4vw, 76px); }
.tb-intro__river { opacity: calc(1 - clamp(0, calc((var(--p, 0) - 0.25) * 4), 0.75)); }
.tb-intro__wall {
  margin-top: 0.3em; color: var(--tb-coral);
  opacity: clamp(0, calc((var(--p, 0) - 0.25) * 4), 1);
  transform: translateY(calc((1 - clamp(0, calc((var(--p, 0) - 0.25) * 4), 1)) * 30px));
}
.tb-intro__lines .tb-lede { margin-top: 26px; opacity: clamp(0, calc((var(--p, 0) - 0.4) * 4), 1); }
.tb-intro .tb-device {
  width: min(330px, calc((var(--tb-pin) - 60px) * 0.49));
  filter: drop-shadow(0 40px 60px rgb(0 0 0 / 0.45));
  transform: translateY(calc((1 - clamp(0, calc(var(--p, 0) * 2.2), 1)) * 25vh));
}

/* 3. Pinned story: captions on the left, one phone on the right */
.tb-story { height: 520svh; }
.tb-story .tb-stage { grid-template-columns: 1fr auto; gap: clamp(32px, 7vw, 120px); max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.tb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.tb-steps li { opacity: 0.22; transition: opacity 0.4s ease, transform 0.4s ease; transform: translateX(-6px); }
.tb-steps li.is-on { opacity: 1; transform: none; }
.tb-steps h3 { font-size: clamp(24px, 2.8vw, 40px); }
.tb-steps p { margin-top: 6px; font-size: 17px; line-height: 1.5; color: var(--tb-muted); max-width: 27em; }
.tb-steps .tb-eyebrow { margin-bottom: 4px; font-size: 15px; }
/* Six steps don't fit at full height: only the current one shows its eyebrow and text. */
@media (min-width: 821px) and (min-height: 541px) {
  .tb-steps { gap: 18px; }
  .tb-steps .tb-eyebrow, .tb-steps p { display: block; max-height: 0; margin: 0; overflow: hidden; opacity: 0; transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.45s ease; }
  .tb-steps li.is-on .tb-eyebrow { max-height: 2em; margin-bottom: 4px; opacity: 1; }
  .tb-steps li.is-on p { max-height: 8em; margin-top: 8px; opacity: 1; }
}
.tb-story .tb-phone { width: min(350px, 34vw, calc((var(--tb-pin) - 80px) * 0.49)); }
.tb-progress { position: absolute; left: 24px; right: 24px; bottom: 28px; height: 3px; border-radius: 3px; background: rgb(42 37 29 / 0.1); max-width: 1132px; margin: 0 auto; }
.tb-progress::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--tb-coral); border-radius: inherit; }
.tb-step__shot { display: none; }
.tb-step__shot .tb-phone { width: min(280px, 70vw); margin: 0 auto; }

/* 4 and 7. Rows that slide sideways while pinned */
.tb-row-track { height: 320svh; }
.tb-row-track .tb-stage { grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: start; gap: 34px; }
.tb-row-head { padding: 0 24px; width: 100%; max-width: 1180px; margin: 0 auto; }
.tb-row-head .tb-lede { margin-top: 14px; }
.tb-row { width: 100%; box-sizing: border-box; display: flex; align-items: flex-start; gap: clamp(28px, 4vw, 56px); padding: 0 max(24px, calc((100vw - 1132px) / 2)); transform: translateX(calc(var(--shift, 0px) * -1)); will-change: transform; }
.tb-row figure { flex: none; margin: 0; text-align: center; }
.tb-row figcaption { margin-top: 10px; font-family: var(--tb-display); font-weight: 600; font-size: 18px; }
.tb-row figcaption span { display: block; margin-top: 2px; font-family: var(--font-body, system-ui); font-weight: 400; font-size: 15px; color: var(--tb-muted); max-width: 15em; margin-inline: auto; }
.tb-dark .tb-row figcaption span { color: var(--tb-muted-dark); }
.tb-row .tb-phone { width: clamp(200px, 17vw, 250px); }
.tb-row--watch .tb-watch, .tb-row--watch .tb-device { width: clamp(190px, 18vw, 240px); filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.45)); }
.tb-together { background: var(--tb-grain), var(--tb-paper-light); }

/* 5. Board Looks: one board, six papers */
.tb-looks { height: 420svh; transition: background-color 0.6s ease; background-color: var(--look-bg, #e9dcc4); }
.tb-looks[data-look="0"] { --look-bg: #e9dcc4; }
.tb-looks[data-look="1"] { --look-bg: #f1f0ea; }
.tb-looks[data-look="2"] { --look-bg: #f6f2e8; }
.tb-looks[data-look="3"] { --look-bg: #d9bf98; }
.tb-looks[data-look="4"] { --look-bg: #2b3530; color: var(--tb-cream); }
.tb-looks[data-look="5"] { --look-bg: #1d4a86; color: #eef4ff; }
.tb-looks .tb-stage { grid-template-columns: 1fr auto; gap: clamp(32px, 7vw, 120px); max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.tb-looks .tb-lede { color: inherit; opacity: 0.72; margin-top: 18px; }
.tb-looks .tb-phone { width: min(350px, 34vw, calc((var(--tb-pin) - 80px) * 0.49)); }
.tb-looks__names { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.tb-looks__names li { font: 700 clamp(26px, 2.8vw, 38px)/1.1 var(--tb-hand); opacity: 0.3; transition: opacity 0.35s ease, transform 0.35s ease; }
.tb-looks__names li.is-on { opacity: 1; transform: rotate(-3deg) scale(1.08); }
.tb-looks .tb-eyebrow { color: inherit; opacity: 0.8; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.tb-center .tb-chips { justify-content: center; }
.tb-chips span { padding: 10px 18px; border-radius: 999px; background: rgb(255 255 255 / 0.55); border: 1px solid rgb(42 37 29 / 0.12); font-weight: 600; font-size: 15px; }
.tb-looks[data-look="4"] .tb-chips span, .tb-looks[data-look="5"] .tb-chips span,
.tb-dark .tb-chips span { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.16); }

/* 6. Sharing */
.tb-share { padding: clamp(110px, 16vh, 180px) 0; }
.tb-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.tb-facts { margin-top: 32px; display: grid; gap: 14px; font-size: 17px; line-height: 1.5; }
.tb-facts b { font-family: var(--tb-display); font-weight: 600; color: var(--tb-coral); }
.tb-share__art { position: relative; display: grid; gap: 22px; max-width: 420px; margin: 0 auto; width: 100%; }
.tb-share__art .tb-card { transform: rotate(var(--r, 0deg)); }
.tb-notif { display: flex; gap: 12px; align-items: center; background: rgb(255 255 255 / 0.92); border-radius: 22px; padding: 12px 16px; color: var(--tb-ink); box-shadow: 0 20px 40px rgb(0 0 0 / 0.35); font-size: 14px; line-height: 1.3; }
.tb-notif img { width: 38px; border-radius: 22.37%; flex: none; }
.tb-notif b { font-family: var(--font-body, system-ui); font-weight: 650; }
.tb-people { display: grid; gap: 12px; }
.tb-person { display: flex; align-items: center; gap: 12px; }
.tb-person i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; background: var(--c); flex: none; }
.tb-person span { flex: 1; }
.tb-person em { font-style: normal; font-size: 13px; color: var(--tb-ink-soft); background: #f3eee5; padding: 4px 10px; border-radius: 999px; }

/* 8. iPhone Duo: the two halves unfold from the hinge */
.tb-duo { height: 240svh; background: var(--tb-grain), var(--tb-paper-light); }
.tb-duo .tb-stage { align-content: center; gap: 40px; }
.tb-duo__copy { padding: 0 24px; }
.tb-duo__device {
  --open: clamp(0, calc(var(--p, 0) * 1.7 - 0.1), 1);
  display: flex;
  width: min(900px, 88vw, calc((var(--tb-pin) - 280px) * 1.377));
  aspect-ratio: 1800 / 1307;
  perspective: 2400px;
  filter: drop-shadow(0 50px 60px rgb(60 40 20 / 0.3));
}
.tb-duo__half { position: relative; width: 50%; height: 100%; }
.tb-duo__half--l { transform-origin: right center; transform: rotateY(calc((1 - var(--open)) * 70deg)); }
.tb-duo__half--r { transform-origin: left center; transform: rotateY(calc((1 - var(--open)) * -70deg)); }
.tb-duo__screen { width: 100%; height: 100%; overflow: hidden; }
.tb-duo__screen img { width: 200%; max-width: none; height: 100%; }
.tb-duo__half--r .tb-duo__screen img { transform: translateX(-50%); }

/* 9. iPad and Mac */
.tb-big { padding: clamp(110px, 16vh, 180px) 0; }
.tb-big__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: end; margin-top: 64px; }
.tb-big figure { margin: 0; }
.tb-big figcaption { margin-top: 18px; font-size: 17px; line-height: 1.5; color: var(--tb-muted); max-width: 30em; }
.tb-big figcaption b { display: block; font-family: var(--tb-display); font-weight: 600; font-size: 22px; color: var(--tb-ink); margin-bottom: 4px; }
.tb-big .tb-ipad { max-width: 440px; margin: 0 auto; filter: drop-shadow(0 30px 44px rgb(60 40 20 / 0.28)); }
.tb-big .tb-device--mac { filter: drop-shadow(0 30px 44px rgb(60 40 20 / 0.28)); }

/* 10. Apple TV */
.tb-tv { padding: clamp(110px, 16vh, 180px) 0; background: var(--tb-cork-deep); color: var(--tb-cream); }
.tb-tv__screen { margin: 56px auto 0; width: min(1100px, calc(100vw - 48px)); aspect-ratio: 16 / 9; border-radius: clamp(10px, 1.6vw, 22px); overflow: hidden; box-shadow: 0 50px 100px rgb(0 0 0 / 0.55); transform: scale(calc(0.9 + var(--p, 0.5) * 0.2)); }
.tb-tv__screen video { width: 100%; height: 100%; object-fit: cover; }
.tb-tv__lock { margin-top: clamp(80px, 12vh, 140px); }
.tb-tv__lock img { border-radius: clamp(8px, 1.2vw, 16px); box-shadow: 0 30px 60px rgb(0 0 0 / 0.5); }

/* 11. Everywhere else: widgets, Siri, icons */
.tb-more { padding: clamp(110px, 16vh, 180px) 0; }
.tb-more .tb-phone { margin: 0 auto; width: min(320px, 70vw); }
.tb-icons { position: relative; height: clamp(150px, 16vw, 210px); margin: 56px auto 0; max-width: 900px; }
.tb-icons img {
  position: absolute; left: 50%; top: 10%;
  width: var(--size, clamp(84px, 11vw, 140px));
  transform: translateX(-50%) translateX(calc(var(--n) * var(--spread, clamp(52px, 8.5vw, 132px)) * var(--fan))) rotate(calc(var(--n) * 6deg * var(--fan)));
  transition: transform 0.2s linear;
}
.tb-icons { --fan: clamp(0, calc(var(--p, 0.5) * 2.4 - 0.4), 1); }

/* 12. Privacy and dark mode */
.tb-privacy { padding: clamp(110px, 16vh, 180px) 0; background: var(--tb-cork); color: var(--tb-cream); }
.tb-privacy .tb-phone { margin: 0 auto; width: min(330px, 70vw); filter: drop-shadow(0 40px 60px rgb(0 0 0 / 0.5)); }

/* 13. Pricing */
.tb-pricing { padding: clamp(110px, 16vh, 170px) 0; }
.tb-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; text-align: left; }
.tb-plan { padding: 30px 28px 32px; }
.tb-plan h3 { font-size: 24px; }
.tb-plan__price { font-family: var(--tb-display); font-weight: 600; font-size: 40px; margin-top: 10px; }
.tb-plan__price small { display: inline; font: 500 16px var(--font-body, system-ui); opacity: 0.6; letter-spacing: 0; text-transform: none; margin: 0; }
.tb-plan ul { margin: 18px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.8; color: var(--tb-ink-soft); }
.tb-plan--pro { outline: 2px solid var(--tb-coral); }
.tb-pricing__note { margin-top: 30px; font-size: 15px; color: var(--tb-muted); }

/* 14. Final call to action */
.tb-cta { padding: clamp(120px, 18vh, 200px) 0 clamp(100px, 14vh, 160px); background: linear-gradient(180deg, var(--tb-paper), #f7d9cf); }
.tb-cta__icon { width: 128px; margin: 0 auto 30px; }
.tb-cta h2 { font-size: clamp(52px, 9vw, 120px); font-weight: 700; letter-spacing: -0.035em; }
.tb-cta .tb-lede { margin-top: 14px; }
.tb-cta__badge { margin-top: 36px; }
.tb-cta__links { margin-top: 30px; display: flex; gap: 26px; justify-content: center; font-size: 15px; }
.tb-cta__links a { color: var(--tb-ink); opacity: 0.75; text-decoration: none; border-bottom: 1px solid rgb(42 37 29 / 0.3); }
.tb-cta__links a:hover { opacity: 1; }

/* Reveal on scroll */
.tb-reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tb-reveal.is-in { opacity: 1; transform: none; }
.tb-reveal[data-delay="1"] { transition-delay: 0.12s; }
.tb-reveal[data-delay="2"] { transition-delay: 0.24s; }

/* Narrow screens, and short ones like a phone in landscape: unpin the long tracks, stack the
   stories, swipe the rows. */
@media (max-width: 820px), (max-height: 540px) {
  .tb-hero { height: 190svh; }
  /* Two small pins either side of the icon, clear of the copy at any phone height. */
  .tb-hero__pins .tb-card { --w: 118px !important; font-size: 12px; padding: 10px 12px; }
  .tb-hero__pins .tb-card--sticky { font-size: 18px; }
  .tb-hero__pins .tb-card--count b { font-size: 26px; }
  .tb-hero__pins .tb-card:nth-child(1) { --x: 19 !important; --y: 3 !important; }
  .tb-hero__pins .tb-card:nth-child(2) { --x: 81 !important; --y: 4 !important; }
  .tb-hero__pins .tb-card:nth-child(n+3) { display: none; }
  /* Only the phone's top edge peeks at rest, so it stays clear of the copy on short screens. */
  .tb-hero__phone { transform: translate(-50%, calc((1 - clamp(0, calc(var(--p, 0) * 1.5), 1)) * (100% - 44px))); }
  .tb-intro { height: auto; padding: 96px 0; }
  .tb-intro .tb-stage { position: static; height: auto; overflow: visible; grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .tb-intro__river, .tb-intro__wall, .tb-intro__lines .tb-lede { opacity: 1; transform: none; }
  .tb-intro__lines .tb-lede { margin-inline: auto; }
  .tb-intro .tb-device { margin: 0 auto; width: min(300px, 72vw); transform: none; }
  .tb-story, .tb-looks { height: auto; padding: 96px 0; }
  .tb-story .tb-stage, .tb-looks .tb-stage { position: static; height: auto; overflow: visible; grid-template-columns: 1fr; padding: 0; }
  .tb-story__phone, .tb-progress { display: none; }
  .tb-steps { gap: 72px; padding: 0 24px; }
  .tb-steps li { opacity: 1; transform: none; }
  .tb-step__shot { display: block; margin-top: 28px; }
  .tb-looks__copy { padding: 0 24px; }
  .tb-looks .tb-phone { width: min(300px, 72vw); margin: 40px auto 0; }
  .tb-row-track { height: auto; padding: 96px 0; }
  .tb-row-track .tb-stage { position: static; height: auto; overflow: visible; }
  .tb-row { transform: none; overflow-x: auto; scroll-snap-type: x mandatory; width: 100%; padding-bottom: 12px; scrollbar-width: none; }
  .tb-row figure { scroll-snap-align: center; }
  .tb-split, .tb-big__grid { grid-template-columns: 1fr; }
  .tb-split { text-align: center; }
  .tb-split .tb-lede { margin-inline: auto; }
  .tb-split .tb-chips { justify-content: center; }
  .tb-duo { height: 180svh; }
  .tb-plans { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  /* Six icons side by side, barely overlapping, within a phone's width. */
  .tb-icons { --size: 58px; --spread: min(56px, (100vw - 106px) / 5); height: 110px; }
  .tb-cta h2 { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .tboard * { transition: none !important; animation: none !important; }
  .tb-tv__screen { transform: none; }
  .tb-icons { --fan: 1; }
  .tb-reveal { opacity: 1; transform: none; }
}

/* Reduced motion, and screens too short to pin (a phone in landscape): no pinning or
   scroll-driven movement; everything shows at rest. */
@media (prefers-reduced-motion: reduce), (max-height: 540px) {
  .tb-hero, .tb-intro, .tb-duo, .tb-row-track { height: auto; }
  .tb-hero .tb-stage, .tb-intro .tb-stage, .tb-duo .tb-stage, .tb-row-track .tb-stage { position: relative; top: 0; height: auto; overflow: visible; }
  .tb-hero .tb-stage { display: block; padding: 60px 0 0; }
  .tb-hero__content { position: relative; top: 0; }
  .tb-hero__pins { display: none; }
  .tb-hero__phone { position: relative; left: 0; margin: 56px auto 0; transform: none; }
  .tb-hero__content, .tb-intro__river, .tb-intro__wall, .tb-intro__lines .tb-lede { opacity: 1; transform: none; }
  .tb-intro .tb-stage, .tb-duo .tb-stage, .tb-row-track .tb-stage { padding: 110px 0; }
  .tb-intro .tb-stage { padding-inline: 24px; }
  .tb-intro .tb-device { transform: none; }
  .tb-duo__device { --open: 1; width: min(720px, 88vw); } /* sized from the width, not the short height */
  .tb-row { transform: none; overflow-x: auto; width: 100%; }
}
