/* Below-the-fold sections: the story, the switch cards, platforms, FAQ, download. */

.section { padding: 112px 16px 0; }
main > .section:last-child { padding-bottom: 96px; }

.head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 48px; }
.h2 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; text-wrap: balance; }
.lede { font-size: 19px; line-height: 1.5; color: var(--muted); }

.t-sky { background: var(--sky); } .t-mint { background: var(--mint); }
.t-butter { background: var(--butter); } .t-lilac { background: var(--lilac); }
.t-blush { background: var(--blush); }

/* ---------- See it in action: one card per moment ----------
   On wide screens each card's Mac is fixed to the middle of the window and the
   card's clip-path cuts it to the card, so scrolling wipes one Mac into the next. */
.scards { --scard-max: 1320px; display: flex; flex-direction: column; gap: 24px; }
.scard {
  position: relative; display: flex; align-items: stretch;
  width: 100%; max-width: var(--scard-max); margin: 0 auto;
  min-height: max(640px, calc(100svh - 80px));
  border-radius: 32px; clip-path: inset(0 round 32px);
  background: #0a0a0b; color: #f5f5f5;
}
[data-theme="dark"] .scard { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07); }

.scard__copy {
  flex: 0 0 50%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 18px; padding: 64px clamp(32px, 5vw, 80px);
}
.scard__label { font-size: 15px; font-weight: 600; color: rgb(255 255 255 / 0.6); }
.scard__title { max-width: 13em; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.scard__body { max-width: 440px; font-size: 18px; line-height: 1.5; color: rgb(255 255 255 / 0.66); }
.scard__body .accent { color: #c9bcff; }

.scard__media { flex: 1 1 50%; min-width: 0; }
.scard__pin {
  position: fixed; top: 50%;
  left: calc(50% + min(var(--scard-max), 100% - 32px) * 0.2);
  width: min(520px, calc(min(var(--scard-max), 100% - 32px) / 2 - 96px), calc((100svh - 150px) * 0.55));
  transform: translate(-50%, -50%);
}

/* The story's panel floats on the card: no Mac, no wallpaper. Only the Switchy
   icon and deploy pill stay, with a notch pointing up at them from the panel. */
.stage.stage--story { --w: 384; --h: 700; width: 100%; perspective: none; -webkit-mask-image: none; mask-image: none; }
.mac--float { overflow: visible; border-radius: 0; --mb-ink: #fff; --mb-hl: rgb(255 255 255 / 0.16); }
.mac--float::after { display: none; }
.menubar--float { justify-content: center; }
.menubar--float::before { display: none; }
.mac--float .sw-panel { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09), 0 30px 70px rgb(0 0 0 / 0.5); }
.mac--float .mb-switchy::after {
  content: ""; position: absolute; z-index: 31; top: calc(100% - 1px); left: 50%;
  width: 14px; height: 14px; margin-left: -7px; border-radius: 3px 0 0 0; transform: rotate(45deg);
  background: #121212; box-shadow: inset 1px 1px 0 rgb(255 255 255 / 0.09);
}

/* Without JS there is no panel to show, so the copy stands alone */
html:not(.js) .scard__media { display: none; }

/* ---------- Switch cards ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 1px var(--line);
}
.card--wide { grid-column: span 2; }
.card__stage { height: 280px; margin: 8px; border-radius: 20px; display: grid; place-items: center; overflow: hidden; }
.card__copy { padding: 18px 26px 26px; display: flex; flex-direction: column; gap: 6px; }
.card__title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card__body { font-size: 16px; line-height: 1.5; color: var(--muted); }

.mini { width: 320px; max-width: calc(100% - 32px); }
.mini--wide { width: 620px; }
.mini--wide .sw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini--list { padding: 4px; }

.keys { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.keys__row { display: flex; gap: 10px; }
.key {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  background: var(--card); font-size: 24px; font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font); /* ⌃ ⌥ come from the system font */
  box-shadow: inset 0 -3px 0 var(--line), 0 0 0 1px var(--line), 0 8px 18px rgb(17 18 20 / 0.08);
}
.keys__toast {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500;
}

/* A slice of a light menu bar with the Pomodoro countdown in it */
.mbar {
  display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-radius: 10px;
  background: rgb(255 255 255 / 0.85); color: #000;
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.1), 0 16px 40px rgb(17 18 20 / 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; font-size: 15px;
}
.mbar__timer {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 6px;
  background: rgb(0 0 0 / 0.1); font-weight: 600; font-variant-numeric: tabular-nums;
}
.mbar__item { display: inline-flex; padding: 0 7px; }

.blackout {
  width: 260px; height: 160px; border-radius: 14px; background: #0b0b0d;
  box-shadow: 0 16px 40px rgb(17 18 20 / 0.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: rgb(255 255 255 / 0.72); font-size: 13px; font-weight: 500;
}

/* ---------- Platforms ---------- */
.platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.platform {
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px 0 12px; border-radius: 18px;
  background: var(--card); box-shadow: 0 0 0 1px var(--line);
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
}
.platform__mark { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.platform__mark svg { width: 20px; height: 20px; }
.platform__mark--letter { font-size: 16px; font-weight: 700; }
[data-theme="dark"] .platform__mark { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-wrap: wrap; gap: 48px; }
.faq > .h2 { flex: 1 1 300px; }
.faq__list {
  flex: 2 1 560px; min-width: 0; border-radius: 24px; overflow: hidden;
  background: var(--card); box-shadow: 0 0 0 1px var(--line);
}
.faq details { padding: 0 26px; border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 68px; padding: 14px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform 0.35s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.faq details p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Download ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  padding: clamp(28px, 5vw, 56px); border-radius: 32px; background: #111214; color: #fff;
}
[data-theme="dark"] .cta { background: #1a1b20; box-shadow: 0 0 0 1px var(--line); }
.cta__main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.cta__icon { border-radius: 22px; box-shadow: 0 20px 50px rgb(0 0 0 / 0.45); }
.cta__accent { display: block; color: #c9bcff; }
.cta__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.cta small { font-size: 14px; color: rgb(255 255 255 / 0.66); }
.cta__portal { margin-top: -10px; }
.cta__portal a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cta__price { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.cta__free { display: flex; align-items: baseline; gap: 12px; font-size: 18px; color: rgb(255 255 255 / 0.66); }
.cta__free span { font-size: 88px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.cta__note { font-size: 17px; color: rgb(255 255 255 / 0.72); }
.cta__list li {
  display: flex; justify-content: space-between; padding: 14px 0;
  border-top: 1px solid rgb(255 255 255 / 0.12); font-size: 17px; color: rgb(255 255 255 / 0.66);
}
.cta__list li:last-child { border-bottom: 1px solid rgb(255 255 255 / 0.12); }
.cta__list s { color: rgb(255 255 255 / 0.5); }
.cta__list li > span { color: #fff; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { padding: 0 16px 40px; }
.footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center;
  font-size: 14px; color: var(--muted);
}
.footer__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 16px; font-weight: 600; }
.footer__brand img { border-radius: 6px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer nav a { color: var(--muted); }

/* Reveal: hidden only once JS says motion is on */
.js-motion [data-reveal] { opacity: 0; transform: translateY(24px); }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  /* Narrow: the cards stack, each with its Mac in the flow under the copy */
  .scards { gap: 16px; }
  .scard { flex-direction: column; min-height: 0; border-radius: 28px; clip-path: inset(0 round 28px); }
  .scard__copy { flex: none; gap: 14px; padding: 32px 24px 8px; }
  .scard__title { font-size: 30px; }
  .scard__body { font-size: 17px; }
  .scard__media { padding: 16px 16px 20px; }
  .scard__pin { position: static; width: 100%; max-width: 380px; margin: 0 auto; transform: none; }
  /* Stacked, each Mac is only as tall as its own panel (design px, measured) */
  [data-scard="switch"] .stage--story { --h: 515; }
  [data-scard="codes"] .stage--story { --h: 400; }
  [data-scard="usage"] .stage--story { --h: 512; }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .card--wide { grid-column: auto; }
  .mini--wide .sw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__stage { height: auto; min-height: 240px; padding: 20px 0; }
}

@media (max-width: 520px) {
  .section { padding-top: 80px; }
  .head { margin-bottom: 32px; }
  .lede { font-size: 17px; }
  .cta { gap: 32px; }
  .cta__free span { font-size: 72px; }
}
