/* Apple timeline */
.apple-day-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1000px;
  margin: clamp(28px, 5vw, 60px) auto 0;
  font-size: clamp(11px, 2.8vw, 15px);
}
.apple-day-timeline::before {
  content: "";
  position: absolute;
  inset: calc(1.25em + 17px - 0.5px) 10% auto;
  height: 1px;
  background: var(--hair-strong);
  pointer-events: none;
}
.apple-day-stop {
  position: relative;
  display: grid;
  grid-template-rows: 1.25em 14px auto;
  justify-items: center;
  gap: 10px;
  padding: 0 3px;
  border-radius: 6px;
  font: 400 1em/1.25 var(--ui);
  text-align: center;
  cursor: pointer;
}
.apple-day-stop-time { color: var(--fine); font-weight: 600; font-variant-numeric: tabular-nums; }
.apple-day-stop-label { color: var(--soft); text-wrap: balance; }
.apple-day-dot {
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--ground);
}
.apple-day-stop[aria-pressed="true"] .apple-day-stop-time { color: var(--gold); }
.apple-day-stop[aria-pressed="true"] .apple-day-stop-label,
.apple-day-stop:hover .apple-day-stop-label { color: var(--cream); }
.apple-day-stop[aria-pressed="true"] .apple-day-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(212, 167, 60, 0.16);
}
.apple-day-card {
  margin-top: clamp(22px, 3vw, 36px);
  border: 1px solid var(--hair-strong);
  border-radius: 26px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(70, 41, 26, 0.8), rgba(37, 26, 19, 0.5) 62%), var(--surface);
}
.apple-day-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(24px, 4vw, 56px);
}
.apple-day-copy { display: grid; gap: 12px; justify-items: start; }
.apple-day-time {
  color: var(--gold);
  font: 520 clamp(56px, 6vw, 84px)/0.95 var(--display);
  font-variant-numeric: tabular-nums;
}
.apple-day-copy h3 { font-size: clamp(30px, 3.5vw, 44px); text-wrap: pretty; }
.apple-day-device {
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  padding: 6px 11px;
  color: var(--gold);
  font: 600 11px/1.2 var(--ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.apple-day-copy .lede { font-size: 16px; }
.apple-day-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.apple-day-actions .btn { padding-inline: 16px; }
.apple-day-actions button:disabled { opacity: 0.45; cursor: default; }
.apple-day-visual { display: grid; place-items: center; min-height: 420px; }
.apple-day-watch { --w: 230px; }
.apple-day-iphone { width: 200px; }
.apple-day-desktop { position: relative; margin: 0; width: 100%; }
.apple-day-ipad { max-width: 520px; min-width: 261px; }
.apple-day-macbook { max-width: 560px; min-width: 304px; }
.apple-day-screen { position: absolute; overflow: hidden; background: var(--surface); }
.apple-day-screen img, .apple-day-bezel {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.apple-day-bezel { position: absolute; inset: 0; pointer-events: none; }

@media (max-width: 760px) {
  .apple-day-panel {
    --apple-day-inset: 20px;
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 0 12px;
  }
  .apple-day-copy { padding-inline: var(--apple-day-inset); }
  .apple-day-visual { min-height: 410px; }
  .apple-day-visual:has(> :is(.carplay-display, .apple-day-desktop)) {
    padding-inline: var(--apple-day-inset);
    /* Centre minimum-width frames even when they need part of the inset. */
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 359px) {
  /* Keep the 304 px MacBook frame inside the viewport and at least 200 px tall. */
  .apple-day-card { margin-inline: -9px; }
}
@media (max-width: 327px) {
  /* Give the MacBook extra clearance without widening the other panels. */
  .apple-day-card:has(#apple-day-chambers:not([hidden])) { margin-inline: -12px; }
}

/* CarPlay: all coordinates refer to the screen, inside the bezel. */
.carplay-display {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: min(1.7%, 9.5px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: #080809;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}
.carplay-screen {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1046 / 600;
  border-radius: 10px;
  overflow: hidden;
  background: #0c0c0d;
  color: #fff;
  font: 400 1.85cqw/1.2 system-ui, "Helvetica Neue", Arial, sans-serif;
}
.carplay-screen > * { position: absolute; }
.carplay-artwork {
  left: 3.8%; top: 26.7%; width: 30.8%; height: auto;
  border-radius: 1.2cqw;
}
.carplay-track { left: 39.8%; width: 48%; top: 27.1%; text-align: center; }
.carplay-track-title { font-weight: 600; font-size: 2.1cqw; line-height: 2.39cqw; text-wrap: balance; }
.carplay-artist, .carplay-date { font-size: 1.85cqw; }
.carplay-artist { margin-top: 0.75cqw; }
.carplay-date { margin-top: 0.35cqw; color: #8e8e93; }
.carplay-control { top: 57%; width: 2.5%; transform: translate(-50%, -50%); }
.carplay-back { left: 44.65%; }
.carplay-play { left: 63%; width: 2.9%; }
.carplay-forward { left: 81.6%; }
.carplay-elapsed, .carplay-remaining, .carplay-source {
  top: 68.3%;
  transform: translateY(-50%);
  font-size: 1.45cqw;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.carplay-elapsed { right: 60%; text-align: right; }
.carplay-remaining { left: 86%; }
.carplay-source { top: 8.6%; right: 9.2%; color: #8e8e93; }
.carplay-progress {
  left: 40.9%; top: 68.3%; width: 44%; height: 1%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(to right, #fff 53%, rgba(255, 255, 255, 0.27) 53%);
}
.carplay-progress::after {
  content: "";
  position: absolute;
  left: 53%; top: 50%; width: 2.1cqw; height: 1.15cqw;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #fff;
}
.carplay-app-bar {
  left: 92.1%; top: 4.4%; width: 5.6%; height: 92.2%;
  border-radius: 1.6cqw;
  background: rgba(255, 255, 255, 0.09);
}
.carplay-clock, .carplay-signal, .carplay-battery, .carplay-status-dot, .carplay-tile, .carplay-home {
  left: 94.9%;
  transform: translate(-50%, -50%);
}
.carplay-clock {
  top: 8.6%; width: 4%; height: 3.2%;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #ef7c33;
  font: 600 1.2cqw/1 system-ui, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.carplay-signal { top: 12.2%; width: 2.1%; }
.carplay-battery { top: 15.6%; width: 2.9%; }
.carplay-status-dot { top: 18.5%; width: 0.55%; aspect-ratio: 1; border-radius: 50%; background: #30d158; }
.carplay-tile {
  display: grid;
  place-items: center;
  width: 3.7%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 0.82cqw;
}
.carplay-tile svg { width: 66%; }
.carplay-lawdible { top: 40%; }
.carplay-wave { top: 47.3%; background: #e5e5ea; color: #e42953; }
.carplay-phone { top: 54.5%; background: #3a3a3c; }
.carplay-compass { top: 61.3%; background: #121214; }
.carplay-home {
  top: 91.7%; width: 1.7%; aspect-ratio: 1;
  border: max(0.75px, 0.12cqw) solid rgba(255, 255, 255, 0.86);
  border-radius: 0.36cqw;
}

/* Android showcase */
.android-devices > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 650px);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
}
.android-devices .points { color: var(--soft); }
.android-devices .btn { align-self: flex-start; margin-top: 10px; }
.android-stage {
  display: grid;
  grid-template-columns: minmax(0, 206fr) minmax(0, 226fr) minmax(0, 186fr);
  align-items: end;
  gap: 16px;
  width: 100%;
  max-width: 650px;
  margin-inline: auto;
  background: radial-gradient(ellipse at 50% 56%, var(--glow), transparent 71%);
}
.android-phone {
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: var(--bezel);
  min-width: 0;
  border-radius: var(--radius);
  background: #0a0909;
  box-shadow: inset 0 0 0 2px var(--rim), 0 15px 32px rgba(0, 0, 0, 0.37);
}
.android-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - var(--bezel));
}
.android-phone::before, .android-phone::after {
  content: "";
  position: absolute;
  right: -2px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--rim);
}
.android-phone::before { top: 21%; height: 8%; }
.android-phone::after { top: 32%; height: 4.5%; }
.android-phone-search { --bezel: 9px; --radius: 34px; --rim: #8f8a82; }
.android-phone-home { --bezel: 8px; --radius: 30px; --rim: #4a4038; }
.android-phone-player { --bezel: 8px; --radius: 32px; --rim: #5d6670; }
@media (max-width: 1150px) {
  .android-devices > .wrap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}
@media (max-width: 760px) {
  .android-devices > .wrap { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}
@media (max-width: 640px) {
  .android-stage { grid-template-columns: minmax(0, 206fr) minmax(0, 226fr); max-width: 448px; gap: 12px; }
  .android-phone-player { display: none; }
}
