/* The landing page only. Tokens, the face, the top bar and the footer come
   from style.css. */
section { padding-block: clamp(48px, 5vw, 72px); }
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h3 { margin: 0 0 1rem; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.02em; }
.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 34rem;
}
.num, .pill { font-variant-numeric: tabular-nums; }
.fine { margin: 0.9rem 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
figure { margin: 0; }
picture img { display: block; width: 100%; max-width: 100%; height: auto; }
/* A paywall render carries 45px of its own padding at 1059px wide; pulling the
   figure out by that share puts its cards on the column edge. */
.render { margin-inline: -4.25%; }

/* Hero. The phone must fit the first viewport on a laptop and may grow on a
   tall screen: 0.47 is the frame's width over its height. The copy sits
   centred against the phone. */
.hero {
  --phone: min(340px, 78vw, (100svh - 190px) * 0.47);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--phone);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-top: clamp(24px, 4vw, 48px);
}
.hero h1 {
  font-size: clamp(2.5rem, 4.7vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 0.5em;
}
.hero h1 span { display: block; text-wrap: balance; }
.hero .lede { margin-bottom: 2rem; }

/* Apple's badge artwork, unaltered, 48px tall: above Apple's 40px minimum and
   with a quarter of its height clear around it. */
.store { display: grid; justify-items: start; gap: 12px; }
.store img { width: auto; height: 48px; }
.store p { margin: 0; font-weight: 600; font-size: 0.9375rem; line-height: 1.2; color: var(--text-2); }

/* The phone: a 402pt display inside an 11pt bezel, so the frame is 424pt wide and
   every metric is a share of that width (cqw). 54pt display corner, 65pt body
   corner, a 125x37pt island whose top sits 11pt below the display's edge. */
.device {
  width: var(--phone);
  justify-self: center;
  container-type: inline-size;
  animation: settle 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.phone {
  --rim: transparent;
  position: relative;
  padding: 2.594cqw;
  border-radius: 15.33cqw;
  background: #0c0f16;
  box-shadow: 0 0 0 1px var(--rim), var(--shadow-deep);
}
@media (prefers-color-scheme: dark) {
  .phone { --rim: rgba(255, 255, 255, 0.12); }
}
.phone img { border-radius: 12.74cqw; }
.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5.19cqw;
  width: 29.48cqw;
  height: 8.73cqw;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0c0f16;
}
@keyframes settle {
  from { transform: translateY(20px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .device { animation: none; }
}

/* Freshness: copy on the left, the three stamps on the right. */
.fresh {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "head stamps" "lede stamps" "rule stamps";
  column-gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.fresh h2 { grid-area: head; }
.fresh .lede { grid-area: lede; }
.fresh .rule { grid-area: rule; margin: 0.5rem 0 0; max-width: 40rem; font-weight: 500; }
.stamps {
  grid-area: stamps;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
  align-content: start;
}
.stamps li { display: grid; gap: 8px; justify-items: start; }
.stamps p { margin: 0; justify-self: stretch; }
.pill {
  display: inline-block;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  white-space: nowrap;
}
.pill--warning { background: var(--warning); color: var(--ground); }

/* Widgets */
.widgets {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.widgets figure { order: -1; justify-self: center; width: min(240px, 70vw); }
/* The capture is a square crop of the home screen; 19% clips the wallpaper in
   its corners (the widget's own corner inset is 25px of 492). */
.tile {
  border-radius: 19%;
  box-shadow: 0 0 0 1px var(--rule-2), 0 2px 8px rgba(0, 0, 0, 0.06);
}
@media (prefers-color-scheme: dark) {
  .tile { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
}
.widgets .lede { max-width: none; }
.widgets .lede + .lede { margin-top: -0.25rem; }
.widgets .lede:last-child { margin-bottom: 0; }

/* What you get. The two cards share two subgrid rows (title, body) so their
   checklists start and end together. */
.tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  gap: 0 24px;
  margin-top: 2.25rem;
}
.tier {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.intro { margin: 0 0 0.25rem; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--rule-2);
}
.facts svg { flex: none; margin-top: 7px; color: var(--accent-ink); }
/* Nine short titles as three columns of three when the card is wide enough, so
   every column ends on the same hairline; one column on a narrow card. The
   query container is the body wrapper, not the card: size containment on the
   card would switch its subgrid off. At 15px the longest label ("Hourly USD
   rates", 121px plus the glyph) fits a 147px column. The three rows share the
   body row's height, so the grid ends where Free's five facts end. */
.body { container-type: inline-size; display: flex; flex-direction: column; }
.facts--grid { flex: 1; }
@container (min-width: 475px) {
  .facts--grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, 1fr);
    grid-auto-flow: column;
    column-gap: 16px;
    font-size: 0.9375rem;
  }
  .facts--grid li { padding: 13px 0; align-items: center; }
  .facts--grid svg { margin-top: 0; }
}

.adds {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  margin-top: clamp(48px, 6vw, 80px);
}
.adds h3 { margin-bottom: 0.75rem; }
.features { margin: 0; }
.features div { padding: 12px 0; border-top: 1px solid var(--rule-2); }
.features div:last-child { border-bottom: 1px solid var(--rule-2); }
.features dt { font-weight: 600; }
.features dd { margin: 2px 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.shots { display: grid; gap: 24px; }

/* Privacy and close */
.privacy, .close { text-align: center; }
.privacy .lede, .close .lede { margin-inline: auto; }
.privacy p:last-child { margin: 0; }
.close { padding-top: 0; }
.close .mark { display: block; width: 64px; height: 64px; margin: 0 auto 1.25rem; border-radius: 22.37%; }
.close .store { justify-items: center; }
.close .fine { margin-top: 1rem; }

/* Side by side only where each card is wide enough for the three-column
   checklist; narrower than that the cards stack rather than share rows. */
@media (max-width: 1180px) {
  .tiers { grid-template-columns: 1fr; }
  .tier + .tier { margin-top: 16px; }
}
@media (max-width: 760px) {
  section { padding-block: 44px 24px; }
  /* Below the copy, the phone no longer shares the first viewport, so only the width caps it. */
  .hero { --phone: min(320px, 78vw); grid-template-columns: 1fr; padding-block: 16px 24px; }
  .fresh { display: block; }
  .stamps { margin-top: 2rem; }
  .fresh .rule { margin-top: 2rem; }
  .widgets { grid-template-columns: 1fr; }
  .widgets figure { order: 1; }
  .adds { grid-template-columns: 1fr; margin-top: 44px; }
  .close { padding-top: 32px; }
}
@media (max-width: 360px) {
  .pill { font-size: 0.875rem; }
}
@media (max-width: 480px) {
  .tier { padding: 22px 20px; }
}
