/* The page's sections. Flat colours only. Demo screens use the wallpaper (--wall) and the
   app's own dark surfaces; the page around them uses the design system's tokens. */

/* ---------- Places: the chapters as a row, the Mac wide under them ---------- */

.chapters.row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chapters.row li { padding: 9px 16px 11px; border-radius: 99px; }
.chapters.row li b { font-size: 15px; }
.chapters.row li span { display: none; }
.chapters.row li i { left: 16px; right: 16px; bottom: 5px; }
.chapter-note { min-height: 1.5em; margin-bottom: 26px; font-size: 17px; color: var(--text-2); text-wrap: pretty; }
.story-screen { position: relative; }

/* ---------- Cards ---------- */

.cards .split { grid-template-columns: 340px 1fr; }
.card-side .head { margin-bottom: 30px; }
/* The notes share one cell, so the tallest sets the height and nothing below moves. */
.card-notes { display: grid; }
.card-notes .note { grid-area: 1 / 1; display: grid; gap: 10px; align-content: start; opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.card-notes .note.on { opacity: 1; transform: none; transition-delay: 0.15s; }
.card-notes h3 { font-size: 21px; }
.card-notes p { color: var(--text-2); font-size: 16px; text-wrap: pretty; }
.card-notes ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.card-notes li { font-size: 15px; color: var(--text-2); display: flex; gap: 10px; align-items: baseline; }
.card-notes li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }
.dots { display: flex; gap: 8px; margin-top: 26px; }
.dots { gap: 2px; margin-left: -8px; }
.dots button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; transition: width 0.4s var(--ease); }
.dots button::before { content: ""; position: absolute; left: 8px; top: 8px; width: 8px; height: 8px; border-radius: 99px; background: var(--text-3); opacity: 0.6; transition: width 0.4s var(--ease), opacity 0.3s; }
.dots button.on { width: 42px; }
.dots button.on::before { width: 26px; opacity: 1; background: var(--text); }
/* The stage is a window onto the Mac: its wallpaper, a dock's tile, the card beside it. */
.cards-stage { position: relative; height: min(76vh, 680px); border-radius: 26px; overflow: hidden; background: var(--wall); box-shadow: inset 0 0 0 1px var(--line-2); transition: background 0.6s var(--ease); }
.cards-stage img { max-width: none; }
.cards-stage .pair { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; width: max-content; opacity: 0; transform: translate(-50%, -50%) scale(0.96); transition: opacity 0.6s var(--ease), transform 0.9s var(--ease); }
.cards-stage .pair.on { opacity: 1; transform: translate(-50%, -50%); }
.cards-stage .dockbit { position: relative; }
.cards-stage .cardbit { position: relative; overflow: hidden; transform-origin: 0% 50%; box-shadow: 0 30px 70px rgba(10, 8, 4, 0.3); opacity: 0; transform: translateX(-34px) scale(0.86); transition: opacity 0.5s var(--ease), transform 0.8s cubic-bezier(0.2, 1.1, 0.3, 1); }
.cards-stage .cardbit.open { opacity: 1; transform: none; }
.cards-stage .glass { position: absolute; inset: 0; border-radius: inherit; background: rgba(16, 16, 18, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13); }
.cards-stage .cardbit .glass { background: rgba(20, 20, 22, 0.92); }
.cards-stage .dockbit img, .cards-stage .cardbit img { position: relative; display: block; }
.cards-stage .tile-on { position: absolute; background: rgba(255, 255, 255, 0.08); pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cards-stage .pair.on .tile-on { opacity: 1; transition-delay: 0.5s; }

/* ---------- Widgets: tabs and shelves ---------- */

.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 26px; }
.tab { border: 0; padding: 9px 16px; border-radius: 99px; background: transparent; color: var(--text-2); font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.3s, color 0.3s; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--pen, #ffd43b); color: var(--on-ink); }

/* ---------- Live at the notch: the theater ---------- */

/* The top of the Mac, edge to edge and close up: the wallpaper, the menu bar, the notch
   going live. The screen holds still; only the notch moves, calmly, on the app's curve.
   Under it, what it's saying, large. */
/* As tall as it needs: the menu bar at the camera's zoom (--menu), room, then the words. */
.theater { position: relative; width: 100vw; margin: 6px 0 0 calc(50% - 50vw); --gap: clamp(58px, 9.5vh, 104px); height: calc(var(--menu, 60px) + var(--gap) + clamp(176px, 15vw, 236px)); overflow: hidden; background: #160f2c;
  /* Its bottom edge isn't a straight cut: a wave in the bands' own hand (in-wave, out-wave),
     the purple coming up into the screen and the screen reaching down into it. */
  --cut: clamp(40px, 5vw, 72px);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--cut) + 1px) no-repeat, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'><path d='M0 0H1440V30C1262 64 1058 74 858 46S438 0 246 20 66 58 0 50Z'/></svg>") bottom / 100% var(--cut) no-repeat;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--cut) + 1px) no-repeat, url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 72' preserveAspectRatio='none'><path d='M0 0H1440V30C1262 64 1058 74 858 46S438 0 246 20 66 58 0 50Z'/></svg>") bottom / 100% var(--cut) no-repeat; }
.theater .camera { position: absolute; inset: 0; }
/* The wallpaper, whole: its colours fill the stage. */
.theater .backdrop { position: absolute; inset: 0; background: #2a2140 url("../assets/wallpaper/unsplash-martin-martz.jpg") no-repeat; }
/* The MacBook's bezel along the top: the notch hangs from it. */
.theater::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: #000; z-index: 3; }
.theater .scene { position: absolute; left: 50%; top: 0; transform-origin: 50% 0; }
.theater .bar { position: absolute; left: 0; right: 0; top: 0; font: 13.5px var(--ui); color: #fff; background: rgba(0, 0, 0, 0.18); }
.theater .bar > div { position: absolute; top: 0; height: 100%; display: flex; align-items: center; gap: 19px; white-space: nowrap; }
.theater .bar b { font-weight: 700; }
.theater .bar span, .theater .bar b { transition: opacity 0.3s ease; }
.theater .bar .status { right: 18px; gap: 16px; }
.theater .bar .clock { transition: opacity 0.24s ease; }
.theater .bar .clock.out { opacity: 0; }
.theater .bar svg { width: 16px; height: 16px; }
.theater .shape { position: absolute; top: 0; overflow: visible; }
.theater .shape path { fill: #000; }
.theater .frame { position: absolute; top: 0; left: 0; max-width: none; opacity: 0; transition: opacity 0.26s ease; }
.theater .frame.on { opacity: 1; }
/* A bar with moving parts: the picture without them, the parts over it (live-tiles.js), on
   the app's own timings (the ring eases 0.2 s, the level 0.08 s, a digit rolls in 0.16 s). */
.theater div.frame > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.theater .lp-ring circle { transition-duration: 0.2s; transition-timing-function: ease-out; }
.theater .lp-fill { transition-duration: 0.08s; transition-timing-function: ease-out; }
.theater .lr-d { transition-duration: 0.16s; }
.theater-nav li.more { cursor: default; color: var(--text-3); opacity: 0.8; }
.theater-nav li.more:hover { color: var(--text-3); }
.theater-more { max-width: 640px; margin: 4px auto 0; text-align: center; font-size: 14.5px; line-height: 1.5; color: var(--text-3); text-wrap: balance; }
.theater .panel { position: absolute; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.theater .panel.on { opacity: 1; pointer-events: auto; }
.theater .panel > img { width: 100%; height: 100%; max-width: none; }
.theater .spin { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #000; display: grid; place-items: center; opacity: 0; transition: opacity 0.26s ease; }
.theater .spin.on { opacity: 1; }
.theater .spin i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.22); border-top-color: #fff; animation: live-spin 0.85s linear infinite; }
@keyframes live-spin { to { transform: rotate(360deg); } }
.theater .wave { position: absolute; display: flex; align-items: center; justify-content: flex-end; gap: 2px; background: #000; opacity: 0; transition: opacity 0.26s ease; }
.theater .wave.on { opacity: 1; }
.theater .wave i { width: 2.5px; border-radius: 2px; background: #ff375f; animation: live-wave 0.8s ease-in-out infinite; }
.theater .wave i:nth-child(2) { animation-delay: -0.25s; }
.theater .wave i:nth-child(3) { animation-delay: -0.5s; }
.theater .wave i:nth-child(4) { animation-delay: -0.12s; }
@keyframes live-wave { 0%, 100% { height: 4px; } 50% { height: 14px; } }
/* What the notch is saying, large, round and in its own words. A new line's words pop up one
   after another; then a pen marks a word or two in the scene's ink (--pen): round them, under
   them, a marker behind them, steam off them. In the margin above, a note in a hand, its arrow
   drawn up to the part of the bar that's saying it. */
.theater .headline { position: absolute; left: 0; right: 0; top: calc(var(--menu, 60px) + var(--gap)); display: grid; justify-items: center; gap: 14px; padding: 0 24px; text-align: center; color: #fff; transition: opacity 0.2s ease, transform 0.2s ease-in; }
.theater .headline h3 { margin: 0; font: 600 clamp(36px, 5.6vw, 80px) / 1.04 var(--heading); letter-spacing: -0.015em; text-wrap: balance; }
.theater .headline h3 .w { display: inline-block; }
.theater .headline p { margin: 0; max-width: 580px; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.4; opacity: 0.88; text-wrap: balance; transition: opacity 0.26s ease, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
.theater .headline.popping { transition: none; }
.theater .headline.popping h3 .w { animation: hl-pop 0.72s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i) * 65ms) backwards; }
.theater .headline.popping p { animation: hl-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--n) * 65ms + 0.12s) backwards; }
@keyframes hl-pop { from { opacity: 0; transform: translateY(0.55em) rotate(-9deg) scale(0.7); } }
@keyframes hl-rise { from { opacity: 0; transform: translateY(14px); } }
.theater .headline.leaving { opacity: 0; transform: translateY(-16px) rotate(-1.5deg) scale(0.97); }
.theater .headline p.leaving { opacity: 0; transform: translateY(-16px); transition: opacity 0.2s ease, transform 0.2s ease-in; }
.theater .headline p.arriving { opacity: 0; transform: translateY(18px); transition: none; }
.theater .headline.hidden { opacity: 0; pointer-events: none; }
.theater .mk { position: relative; display: inline-block; font-style: normal; isolation: isolate; }
.theater .mk-art { position: absolute; z-index: -1; overflow: visible; pointer-events: none; }
.theater .mk-art path { fill: none; stroke: var(--pen); stroke-width: 0.07em; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.theater .drawn .mk-art path { stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s cubic-bezier(0.55, 0, 0.25, 1) calc(var(--n) * 65ms + 0.42s + var(--k) * 0.1s); }
.theater .mk-burst .mk-art path, .theater .mk-steam .mk-art path { stroke-width: 0.06em; }
/* Room round a circled word, so the pen doesn't run into the next one. */
.theater .mk-circle { margin: 0 0.16em; }
.theater .mk-burst { margin: 0 0.1em; }
/* The marker: thick, behind the words, which turn ink-dark as it passes. */
.theater .mk-swash .mk-art path { stroke-width: 0.7em; }
.theater .drawn .mk-swash .mk-art path { transition-duration: 0.42s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.theater .drawn .mk-swash { color: #21163a; transition: color 0.2s ease calc(var(--n) * 65ms + 0.56s); }
.theater .margin-note { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.16s ease; }
.theater .margin-note.gone, .theater .margin-note.cramped { opacity: 0; }
.theater .margin-note svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.theater .margin-note path { fill: none; stroke: var(--pen, #ffd43b); stroke-width: 2.6px; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.theater .margin-note span { position: absolute; left: 0; top: 0; font: 700 clamp(22px, 2.1vw, 33px) / 1 var(--hand); color: #fff; white-space: nowrap; text-shadow: 0 1px 14px rgba(24, 8, 36, 0.4); opacity: 0; scale: 0.5; }
.theater .margin-note.on span { opacity: 1; scale: 1; transition: opacity 0.16s ease, scale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.theater .margin-note.on .shaft { stroke-dashoffset: 0; transition: stroke-dashoffset 0.42s cubic-bezier(0.5, 0, 0.3, 1) 0.14s; }
.theater .margin-note.on .head { stroke-dashoffset: 0; transition: stroke-dashoffset 0.16s ease-out 0.54s; }
/* A still page (?still) shows each part where it ends up. */
.theater.still .headline *, .theater.still .margin-note * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .theater .headline.popping h3 .w, .theater .headline.popping p { animation: none; }
  .theater .mk-art path, .theater .margin-note path, .theater .margin-note span { transition: none !important; }
}
.theater-nav { justify-content: center; margin: 26px 0 0; }

/* ---------- Pip ---------- */

.pip-layout { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.pip-words { display: grid; gap: 18px; }
.words { font-family: var(--display); font-size: clamp(22px, 2.1vw, 28px); line-height: 1.38; letter-spacing: -0.02em; font-weight: 600; }
.words span { color: var(--text-3); opacity: 0.55; white-space: nowrap; transition: color 0.4s, opacity 0.4s; }
.words span.lit { color: var(--text); opacity: 1; }
.pip-play { display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 420px; }
.pip-stage { flex: 1; display: grid; justify-items: center; gap: 18px; }
.pip-stage .pip { filter: drop-shadow(0 18px 26px var(--shadow)); --pip-snore: var(--text-2); }
.words kbd, .lede kbd { display: inline-block; font: 600 0.7em/1 var(--ui); letter-spacing: 0; padding: 0.28em 0.45em; margin: 0 0.06em; border-radius: 0.3em; vertical-align: 0.14em; color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 0 var(--line-2); }
.pip-stage .hint { white-space: nowrap; font-size: 14px; color: var(--text-3); }
.pip-chat { flex: none; }

/* ---------- The bento's pictures ---------- */

/* Each picture is a crop of the Mac: its wallpaper and the real thing on it. */
.tile-card .art.screen-crop { position: relative; flex: 1 0 250px; margin: 22px -28px -28px; overflow: hidden; background: var(--wall); box-shadow: inset 0 1px 0 var(--line-2); transition: background 0.6s var(--ease); }
.tile-card.horizontal .art.screen-crop { margin: 0; box-shadow: inset 1px 0 0 var(--line-2); min-height: 320px; }
.tile-card .art.panel-crop { display: grid; place-items: center; padding: 22px; flex: 1 0 auto; min-height: 250px; }
.panel-crop > * { width: 100%; }
.tray .housing { position: absolute; left: 50%; top: 0; width: min(560px, calc(100% - 48px)); transform: translateX(-50%); padding: 12px 18px 20px; border-radius: 0 0 30px 30px; background: #000; }
.tray .tabs-mini { display: flex; gap: 4px; font-size: 12px; font-weight: 600; margin-bottom: 14px; color: #fff; }
.tray .tabs-mini span { padding: 4px 11px; border-radius: 99px; color: rgba(255, 255, 255, 0.5); }
.tray .tabs-mini span.on { color: #fff; background: rgba(255, 255, 255, 0.13); }
.tray .files { display: flex; align-items: center; gap: 12px; }
.tray .file { width: 68px; text-align: center; font-size: 10.5px; line-height: 1.25; color: rgba(255, 255, 255, 0.8); }
.tray .file img { width: 46px; height: 46px; margin: 0 auto 6px; object-fit: contain; }
.tray .drop { flex: 1; height: 92px; border-radius: 16px; border: 1.5px dashed rgba(255, 255, 255, 0.24); display: grid; place-items: center; padding: 0 8px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.tray .dragging-file { position: absolute; left: 50%; bottom: 34px; display: grid; justify-items: center; gap: 4px; font-size: 10.5px; color: #fff; animation: drag-up 5.6s var(--ease) infinite; }
.tray .dragging-file .icon { width: 50px; height: 50px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.3)); }
.tray .dragging-file span { padding: 1px 6px; border-radius: 4px; background: rgba(10, 132, 255, 0.92); }
.tray .dragging-file .arrow { position: absolute; left: 32px; top: 28px; max-width: none; }
/* From below into the tray's drop zone, where it lands as the tray's third file. */
@keyframes drag-up { 0%, 8% { transform: translate(60px, 40px) rotate(-6deg); opacity: 0; } 18% { opacity: 1; } 58% { transform: translate(var(--drop-x, 90px), var(--drop-y, -150px)) rotate(-2deg); opacity: 1; } 64%, 100% { transform: translate(var(--drop-x, 90px), var(--drop-y, -150px)) scale(0.7); opacity: 0; } }
.tray .file.landed { animation: land 5.6s var(--ease) infinite; }
@keyframes land { 0%, 60% { opacity: 0; transform: scale(0.6); } 66%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.groups { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px; }
.mini-dock { display: grid; gap: 7px; padding: 7px; border-radius: 20px; background: rgba(16, 16, 18, 0.74); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13); }
.mini-dock .cell { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; }
.mini-dock .cell img { width: 40px; height: 40px; }
.mini-dock .cell.open { background: rgba(255, 255, 255, 0.12); }
.mini-dock .plate { width: 34px; height: 34px; padding: 4px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mini-dock .plate img { width: 100%; height: 100%; }
.mini-card { width: 250px; border-radius: 18px; overflow: hidden; background: rgba(20, 20, 22, 0.92); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 18px 40px rgba(10, 8, 4, 0.25); }
.mini-card img { width: 100%; }
.accounts { display: grid; border-radius: 16px; background: #161618; box-shadow: 0 16px 36px rgba(10, 8, 4, 0.22); overflow: hidden; }
.account { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 9px 13px; }
.account + .account { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.account .acc-logo img { width: 22px; height: 22px; }
.account .who { font-size: 11.5px; color: rgba(255, 255, 255, 0.45); line-height: 1.3; }
.account .who b { display: block; font-size: 13.5px; color: #f3f3f5; font-weight: 500; }
.account em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); }
.account em.in-use { background: transparent; color: #30d158; padding-right: 0; }
.checks { display: grid; border-radius: 16px; background: #161618; box-shadow: 0 16px 36px rgba(10, 8, 4, 0.22); overflow: hidden; }
.checks div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13.5px; color: #ececee; }
.checks div + div { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.checks span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(48, 209, 88, 0.16); color: #30d158; font-size: 12px; font-weight: 700; }
.quiet .menu { position: absolute; left: 0; right: 0; top: 0; height: 22px; background: var(--menu-bg); }
/* The Focus bar fills most of the tile's width, never more (its picture is 1.45 times the bar). */
.quiet img { position: absolute; left: 50%; top: 0; width: min(470px, 134%); max-width: none; transform: translateX(-50%); }
.quiet .queue { position: absolute; left: 50%; top: 58%; width: 80%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; }
.quiet .queue .later { font-size: 13px; font-weight: 600; color: var(--on-wall-2); margin-bottom: 4px; }
.quiet .queue div { width: 100%; padding: 9px 13px; border-radius: 12px; font-size: 12.5px; color: #fff; background: rgba(16, 16, 18, 0.86); box-shadow: 0 8px 20px rgba(10, 8, 4, 0.14); }
.quiet .queue div:nth-of-type(2) { width: 94%; color: rgba(255, 255, 255, 0.6); }
.quiet .queue div:nth-of-type(3) { width: 88%; color: rgba(255, 255, 255, 0.38); }

@media (max-width: 900px) {
  .chapters.row li:not(.on) { display: none; }
  .chapter-note { min-height: 3em; }
  .cards .split { grid-template-columns: 1fr; }
  .cards-stage { height: 56vh; }
  .card-notes ul { display: none; }
  .chapters:not(.row) li:not(.on) { display: none; }
  .chapters:not(.row) li.on { min-height: 118px; }
  .pip-layout { grid-template-columns: 1fr; gap: 30px; }
  .pip-play { flex-direction: column; min-height: 0; }
  .pip-chat { width: 100%; }
}

/* Pip's notices: a strip of the top of the screen, at the screen's own size, scaled to fit. */
.notices { min-height: 270px; }
.notices .reel { position: absolute; left: 50%; top: 0; width: 420px; height: 260px; transform-origin: top center; }
.notices .bar { position: absolute; left: 0; right: 0; top: 0; height: 32px; background: var(--menu-bg); }
.notices .housing { position: absolute; top: 0; overflow: visible; }
.notices .housing path { fill: #000; }
.notices .notice { top: 0; pointer-events: none; }
.notices .body { display: flex; flex-direction: column; align-items: center; transition: opacity 0.16s; }
.notices .body.out { opacity: 0; }
.notices .notice .words { color: #fff; }
@media (max-width: 900px) { .tile-card.horizontal .art.notices { height: 230px; min-height: 0; } }

/* Home: the notch open, at the screen's own size, scaled to fit its tile. */
.home-art { min-height: 260px; }
.home-art .reel { position: absolute; left: 50%; top: 0; transform-origin: top center; }
.home-art .bar { position: absolute; left: 0; right: 0; top: 0; height: 32px; background: var(--menu-bg); }
.home-art .housing { position: absolute; top: 0; overflow: visible; }
.home-art .housing path { fill: #000; }
.home-art img { position: absolute; max-width: none; }
.home-art .cover { border-radius: 12px; }
.home-art .pip-holder { position: absolute; display: flex; justify-content: center; align-items: flex-start; }
.home-art .tabs-mini { position: absolute; display: flex; gap: 4px; font-size: 12px; font-weight: 600; color: #fff; }
.home-art .tabs-mini span { padding: 4px 11px; border-radius: 99px; color: rgba(255, 255, 255, 0.5); }
.home-art .tabs-mini span.on { color: #fff; background: rgba(255, 255, 255, 0.13); }

/* Agentic: Pip's chat beside the accounts it uses. */
.agentic-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.agentic-layout .pip-chat { --pip-card-width: 100%; --pip-card-height: 580px; }
@media (max-width: 900px) {
  .agentic-layout { grid-template-columns: 1fr; }
  .agentic-layout .pip-chat { --pip-card-height: 500px; }
}
/* The notch hangs from the top of its crop; the tile is only as tall as the open notch needs. */
.tile-card.horizontal .art.home-art, .home .tile-card.horizontal .art.tray { min-height: 230px; }
.home .tile-card.horizontal { min-height: 230px; }
@media (max-width: 900px) { .tile-card.horizontal .art.home-art { flex: none; min-height: 0; height: var(--fit, 120px); } .home .tile-card.horizontal, .tile-card.horizontal { min-height: 0; } }

/* ---------- Widgets: the mosaic ----------
   Every widget in its sizes, packed edge to edge like a dock that never ends, on the
   wallpaper's orange, drifting slowly by. The first time it's seen it assembles out of
   the depths; one tile at a time turns into another; a pointer stops it and names one. */
.wall { position: relative; width: 100vw; margin: 34px 0 0 calc(50% - 50vw); overflow: hidden; perspective: 1500px; perspective-origin: 50% 30%; }
.wall .track { position: absolute; top: 36px; display: flex; transform-style: preserve-3d; will-change: transform; }
.wall .track.drifting { animation: wall-drift var(--loop, 80s) linear infinite; animation-play-state: paused; }
.wall.playing .track.drifting { animation-play-state: running; }
.wall:hover .track.drifting { animation-play-state: paused; }
@keyframes wall-drift { to { transform: translateX(var(--shift, -50%)); } }
.mosaic { position: relative; flex: none; transform-style: preserve-3d; }
.mosaic[hidden] { display: none; }
/* Each on the app's own glass, a little: a dark HUD the colour behind shows through
   faintly, the rim brighter along the top (DockSurface, TileChrome). */
.mosaic .wt { position: absolute; margin: 0; overflow: hidden; background: rgba(26, 22, 28, 0.78); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 34px rgba(40, 10, 4, 0.3);
  opacity: 0; transform: translate3d(0, 70px, -1100px) rotateX(-42deg); transition: opacity 0.9s ease, transform 1.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s var(--ease); transition-delay: var(--d, 0ms); font-family: var(--ui); }
.mosaic.in .wt { opacity: 1; transform: none; }
.mosaic.quiet .wt { transition-property: box-shadow; }
.mosaic.in .wt:hover { z-index: 2; transform: translateY(-4px) scale(1.04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 46px rgba(40, 10, 4, 0.42); transition-delay: 0ms; transition-duration: 0.9s, 0.35s, 0.35s; }
.mosaic.leaving .wt { opacity: 0; transform: translate3d(0, -30px, -500px) rotateX(24deg); transition-duration: 0.36s; transition-delay: 0ms; }
.mosaic .wt img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; pointer-events: none; transition: opacity 0.3s ease, transform 0.36s var(--ease); }
.mosaic .wt.turning img { opacity: 0; transform: scale(0.97); }
/* A tile that moves (live-tiles.js): the app's picture without its moving parts, and the
   parts over it at the tile's own size in points. */
.mosaic .wt .live-tile { position: absolute; inset: 0; transition: opacity 0.3s ease, transform 0.36s var(--ease); }
.mosaic .wt.turning .live-tile { opacity: 0; transform: scale(0.97); }
.mosaic .wt .live-tile img { transition: none; }
.lp-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
/* The value and its unit share a baseline, as MetricText's row does. A digit's cell clips
   the slide (clip-path, not overflow: that would move the cell's baseline). */
.lp-metric, .lp-text { display: flex; white-space: nowrap; font-family: var(--ui); font-weight: 500; font-variant-numeric: tabular-nums; -webkit-font-smoothing: auto; }
.lp-row { display: flex; flex: none; align-items: baseline; transform-origin: left center; }
.lp-metric.centered, .lp-text.center { justify-content: center; }
.lp-metric.centered .lp-row, .lp-text.center .lp-row { transform-origin: center; }
.lp-text.trailing { justify-content: flex-end; }
.lp-text.trailing .lp-row { transform-origin: right center; }
.lp-value { display: inline-block; white-space: nowrap; }
.lp-unit { flex: none; font-weight: 500; line-height: 1; }
.lr-cell { position: relative; display: inline-block; clip-path: inset(0 -0.2em); transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.lr-cell.fresh { opacity: 0; transform: translateY(35%); }
.lr-d { display: block; transition: transform 0.26s cubic-bezier(0, 0, 0.58, 1), opacity 0.26s cubic-bezier(0, 0, 0.58, 1); }
.lr-d.next { position: absolute; left: 0; top: 0; }
.lp-ring circle { transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.lp-meter { overflow: visible; }
.lp-fill { position: absolute; left: 0; top: 0; bottom: 0; transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1), height 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.lp-fill.vertical { top: auto; right: 0; }
.lp-mark { position: absolute; border-radius: 1px; }
.lp-col { position: absolute; top: 0; bottom: 0; overflow: hidden; }
.lp-colfill { position: absolute; left: 0; right: 0; bottom: 0; transition: height 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.lp-glide { transition: transform 1.45s linear; }
.lp-dot { transition: cy 0.6s ease; }
.lp-turn { transition: transform 0.16s cubic-bezier(0.3, 1.4, 0.6, 1); }
.lp-wave i { position: absolute; top: 0; opacity: 0.9; transform-origin: center; animation: lp-wave ease-in-out infinite alternate; }
@keyframes lp-wave { from { transform: scaleY(var(--from)); } to { transform: scaleY(var(--to)); } }
.live-tile .still, .live-tile .still circle, .live-tile .still .lp-colfill { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .lp-wave i { animation: none; transform: scaleY(var(--to)); } .lr-d, .lr-cell { transition: none; } }
#widgets-title .count { display: inline-flex; }
.wall-label { position: absolute; z-index: 5; max-width: 300px; padding: 10px 14px; border-radius: 14px; background: rgba(14, 10, 28, 0.94); color: #fff; font-family: var(--ui); text-align: center; pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity 0.18s ease; }
.wall-label.below { transform: translate(-50%, 12px); }
.wall-label.on { opacity: 1; }
.wall-label b { display: block; font-size: 14px; font-weight: 600; }
.wall-label span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; opacity: 0.72; }
@media (prefers-reduced-motion: reduce) { .mosaic .wt { transition: none; opacity: 1; transform: none; } .wall .track.drifting { animation: none; } }

/* ---------- Crops of the demo Mac (crops.js) ----------
   A part of the same screen as the hero's, its real docks and cards on its wallpaper. Past
   the screen's edge, the MacBook's bezel. */
.crop { position: relative; overflow: hidden; background: #050506; }
.crop .mac.crop-mac { position: absolute; left: 0; top: 0; margin: 0; padding: 0; border-radius: 0; background: #050506; box-shadow: none; transform: none; transition: none; opacity: 1; }
.crop .mac.crop-mac .viewport { border-radius: 0; background: #050506; }
/* The screen's own corners: round at the top, as a MacBook's are. */
.crop .screen { border-radius: 12px 12px 6px 6px; }
.crop .card-panel .glass { background: rgba(20, 20, 22, 0.78); }

/* ---------- Feature tiles ----------
   A few words, then the real thing, edge to edge of the tile and big enough to read. */
.tile-card { padding: 34px 36px 0; gap: 10px; border-radius: 30px; }
.tile-card h3 { font-size: clamp(21px, 1.9vw, 25px); letter-spacing: -0.022em; }
.tile-card p { font-size: 16.5px; line-height: 1.45; max-width: 34em; }
.tile-card .art.crop-art { flex: none; margin: 28px -36px 0; height: clamp(300px, 33vw, 450px); }
@media (max-width: 900px) {
  .tile-card { padding: 26px 24px 0; border-radius: 24px; }
  .tile-card .art.crop-art { margin: 22px -24px 0; height: 330px; }
}
/* The cards' stage: one crop, cut from corner to corner. */
.cards-stage.crop { background: #050506; box-shadow: 0 30px 70px rgba(5, 3, 18, 0.35); }
.cards-stage.crop .mac.crop-mac { transition: opacity 0.32s ease; }
.cards-stage.crop.cut .mac.crop-mac { opacity: 0; }

/* ---------- Home: the notch open, big, and the two things it holds ---------- */
.home-stage { height: clamp(250px, 25vw, 330px); border-radius: 30px; box-shadow: 0 30px 70px var(--shadow); }
.home-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.home-note { position: relative; display: grid; gap: 6px; align-content: start; text-align: left; padding: 20px 24px 26px; border: 0; border-radius: 22px; background: transparent; color: var(--text-3); cursor: pointer; font: inherit; transition: background 0.3s, color 0.3s; }
.home-note b { font: 600 19px/1.3 var(--display); letter-spacing: -0.012em; color: inherit; }
.home-note span { font-size: 16px; line-height: 1.45; text-wrap: pretty; }
.home-note:hover { color: var(--text-2); }
.home-note.on { background: var(--surface); color: var(--text); }
.home-note.on span { color: var(--text-2); }
.home-note i { position: absolute; left: 24px; right: 24px; bottom: 12px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity 0.3s; }
.home-note.on i { opacity: 1; }
.home-note i::before { content: ""; position: absolute; inset: 0; background: var(--text-2); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform var(--ms, 6000ms) linear; }
.home-note:not(.on) i::before { transition: none; }
@media (max-width: 900px) {
  .home-stage { height: 240px; border-radius: 22px; }
  .home-notes { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Notices: the top of the screen, big; then two promises ---------- */
.notice-stage { position: relative; border-radius: 30px; overflow: hidden; background: #050506; box-shadow: 0 30px 70px var(--shadow); }
.notice-stage .notices { position: relative; height: clamp(300px, 30vw, 420px); overflow: hidden; }
/* The screen's wallpaper, its middle under the notch: 1512 by 982 points, as the demo Mac. */
.notices .reel-wall { position: absolute; top: 0; width: 1512px; height: 982px; background: #2a2140 url("../assets/wallpaper/unsplash-martin-martz.jpg") center / cover no-repeat; border-radius: 12px 12px 0 0; }
.notices .reel { height: 982px; }
.notice-more { margin-top: 16px; }
/* Focus in the notch, what waits for later under it: the top of the screen again. */
.tile-card .art.quiet { position: relative; flex: none; height: 300px; margin: 26px -36px 0; overflow: hidden; background: #2a2140 url("../assets/wallpaper/unsplash-martin-martz.jpg") center -9px / 1015px 677px no-repeat; }
.quiet .menu { height: 22px; background: rgba(0, 0, 0, 0.18); }
.quiet .queue div { background: rgba(20, 20, 22, 0.86); }
.quiet .queue .later { color: rgba(255, 255, 255, 0.8); }
/* Three promises, plainly. */
.private .promises { list-style: none; margin: 18px 0 34px; padding: 0; display: grid; gap: 10px; }
.private .promises li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.private .promises li::before { content: "✓"; grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #30d158; background: rgba(48, 209, 88, 0.14); }
.private .promises b { font: 600 17px/1.3 var(--display); letter-spacing: -0.01em; }
.private .promises span { font-size: 15px; color: var(--text-2); }
@media (max-width: 900px) { .notice-stage { border-radius: 22px; } .notice-stage .notices { height: 260px; } .tile-card .art.quiet { margin: 22px -24px 0; } }

/* ---------- Pip: big, on a stage of its own, in moments of its day ---------- */
.pip-play { min-height: 0; }
.pip-stage { position: relative; display: grid; justify-items: center; align-content: end; gap: 26px; width: 100%; min-height: 500px; padding: 120px 28px 30px; border-radius: 32px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pip-stage .who { display: grid; place-items: end center; }
.pip-stage .pip__say { font-size: 16px; line-height: 1.35; padding: 10px 15px; max-width: 280px; border-radius: 16px; }
.pip-stage .moments { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pip-stage .moment { border: 0; padding: 8px 14px; border-radius: 99px; background: transparent; color: var(--text-3); font: 600 14.5px var(--font); cursor: pointer; transition: background 0.3s, color 0.3s; }
.pip-stage .moment:hover { color: var(--text); }
.pip-stage .moment.on { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.pip-stage .hint { position: absolute; top: 22px; left: 0; right: 0; text-align: center; }
@media (max-width: 900px) { .pip-stage { min-height: 400px; padding-top: 96px; border-radius: 24px; } }

/* ---------- Agentic: the accounts Pip can use, as the app lists them ---------- */
.agentic .tile-card { padding-bottom: 36px; }
.accounts-art { margin-top: 22px; }
.accounts-art .accounts { border-radius: 20px; background: #161618; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 44px rgba(5, 3, 18, 0.35); }
.accounts-art .account { grid-template-columns: 34px 1fr auto; gap: 12px; padding: 14px 18px; }
.accounts-art .account .acc-logo img { width: 26px; height: 26px; }
.accounts-art .account .who { font-size: 13px; }
.accounts-art .account .who b { font-size: 15.5px; }
.accounts-art .account em { font-size: 12.5px; padding: 5px 12px; }

/* The places' tabs: a little screen before each name, its edge lit. */
.chapters.row li b { display: flex; align-items: center; gap: 8px; }
.edge-glyph { width: 22px; height: 17px; flex: none; }
.chapters.row li.on .edge-glyph g { color: var(--accent); }

/* ---------- FAQ: the question beside the answers ---------- */
.faq-section .wrap { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 64px; align-items: start; }
.faq-section .head.center { margin: 0; text-align: left; justify-items: start; position: sticky; top: 110px; }
.faq-section .faq { max-width: none; margin: 0; }
@media (max-width: 900px) { .faq-section .wrap { grid-template-columns: 1fr; gap: 28px; } .faq-section .head.center { position: static; } }

/* ---------- Coding agents: a click on the bar, and the session, live ---------- */
.coding-block { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 56px; align-items: center; margin-top: 120px; }
.coding-copy { display: grid; gap: 12px; align-content: center; }
.coding-copy h3 { font: 700 clamp(26px, 2.6vw, 36px) / 1.1 var(--display); letter-spacing: -0.03em; }
.coding-copy p { font-size: 17px; line-height: 1.5; color: var(--text-2); }
.coding-copy ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.coding-copy li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; color: var(--text-2); }
.coding-copy li::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); flex: none; transform: translateY(-2px); }
.coding-stage { position: relative; height: clamp(440px, 44vw, 600px); border-radius: 30px; overflow: hidden; background: #160f2c; box-shadow: 0 30px 70px var(--shadow); }
.coding-stage .backdrop { position: absolute; inset: 0; background: #2a2140 url("../assets/wallpaper/unsplash-martin-martz.jpg") no-repeat; }
.coding-stage .scene { position: absolute; left: 50%; top: 0; transform-origin: 50% 0; }
.coding-stage .bar { position: absolute; left: 0; right: 0; top: 0; background: rgba(0, 0, 0, 0.18); }
.coding-stage .shape { position: absolute; top: 0; overflow: visible; }
.coding-stage .shape path { fill: #000; }
.coding-stage .frame { position: absolute; top: 0; max-width: none; opacity: 0; transition: opacity 0.26s ease; }
.coding-stage .frame.on { opacity: 1; }
.coding-stage .spin { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #000; display: grid; place-items: center; opacity: 0; transition: opacity 0.26s ease; }
.coding-stage .spin.on { opacity: 1; }
.coding-stage .spin i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.22); border-top-color: #fff; animation: live-spin 0.85s linear infinite; }
.coding-stage .panel { position: absolute; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
.coding-stage .panel.on { opacity: 1; pointer-events: auto; }
.coding-stage .panel > img { width: 100%; height: 100%; max-width: none; }
/* Each agent's own panel, on top of one another: the one picked shows. */
.coding-stage .cp-session { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.coding-stage .cp-session.on { opacity: 1; pointer-events: auto; }
/* Above everything in the scene, the app's menu (60) too: the pointer is never under what it clicks. */
.coding-stage .arrow { position: absolute; left: 0; top: 0; z-index: 90; max-width: none; opacity: 0; pointer-events: none; transform-origin: 5px 5px; transition: opacity 0.3s ease; }
.coding-stage .arrow.there { opacity: 1; }
.coding-stage .arrow.tap { scale: 0.88; }
/* The app's "Apps and sessions" chip: the live agents' marks, overlapping, in a capsule. */
.cp-sessions { display: inline-flex; align-items: center; height: 24px; margin-left: 6px; padding: 0 6px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); cursor: pointer; }
.cp-sessions:hover { background: rgba(255, 255, 255, 0.09); }
.cp-sessions .marks { display: flex; }
.cp-sessions i { display: grid; place-items: center; width: 18px; height: 18px; margin-left: -5px; border-radius: 50%; background: #212121; }
.cp-sessions i:first-child { margin-left: 0; }
.cp-sessions img { width: 13px; height: 13px; object-fit: contain; }
.cp-menu { min-width: 260px; max-width: 330px; }
.cp-menu .row.heading { color: rgba(255, 255, 255, 0.45); font-size: 11.5px; font-weight: 600; }
.cp-menu .row.heading:hover { background: none; }
.cp-menu .row .name { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) {
  .coding-block { grid-template-columns: 1fr; gap: 28px; margin-top: 80px; }
  .coding-stage { height: 480px; border-radius: 22px; }
}
/* The FAQ opens one answer at a time (sections.js); the + turns as it opens. */
.faq details p { overflow: hidden; }
.faq details[open] summary::after { transform: none; }
.faq details.is-open summary::after { transform: rotate(45deg); }
.faq summary { transition: color 0.2s; }
.faq details:not(.is-open) summary:hover { color: var(--text-2); }
/* A file on its way up to the notch, as macOS drags one: its icon, its name, the pointer. */
.dragged-file { position: absolute; left: 0; top: 0; z-index: 40; display: grid; justify-items: center; gap: 4px; pointer-events: none; font: 500 10.5px -apple-system, BlinkMacSystemFont, sans-serif; color: #fff; }
.dragged-file .icon { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35)); }
.dragged-file span { padding: 1px 6px; border-radius: 4px; background: rgba(10, 132, 255, 0.92); white-space: nowrap; }
.dragged-file .arrow { position: absolute; left: 32px; top: 28px; width: 28px; height: 40px; max-width: none; }
.notch-shelf .file.landed { animation: land-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes land-in { from { opacity: 0; transform: scale(0.6); } }

/* ---------- The navigation's live activity: rolling words and numbers ---------- */
.roll { position: relative; display: inline-grid; overflow: hidden; height: 1.3em; line-height: 1.3em; vertical-align: middle; transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
.roll .line { grid-area: 1 / 1; white-space: nowrap; transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease; }
.odo { display: inline-flex; align-items: center; line-height: 1.3em; font-variant-numeric: tabular-nums; }
.odo .digits { display: inline-flex; }
.odo .col { display: block; height: 1.3em; overflow: hidden; }
.odo .strip { display: flex; flex-direction: column; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.odo .strip i { height: 1.3em; line-height: 1.3em; font-style: normal; text-align: center; }
.notchnav .now .pct { color: rgba(255, 255, 255, 0.45); font-weight: 600; }

/* ---------- Reply: a notice turns into a chat, in the notch ---------- */
.reply-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.reply-copy { display: grid; gap: 14px; }
.reply-points { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.reply-points li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; color: var(--text-2); }
.reply-points li::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); flex: none; transform: translateY(-2px); }
.reply-stage { height: clamp(420px, 40vw, 540px); border-radius: 30px; box-shadow: 0 30px 70px var(--shadow); }
@media (max-width: 900px) {
  .reply-layout { grid-template-columns: 1fr; gap: 28px; }
  .reply-stage { height: 440px; border-radius: 22px; }
}

/* ---------- Arrivals (sections.js): each section's entrance, played once ---------- */
/* A heading's words come up out of their line, sharpening as they come. */
.arrive-ready .words-in .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 0.05em 0.14em; margin: 0 -0.05em -0.14em; }
.arrive-ready .words-in .w > span { display: inline-block; transform: translate3d(0, 110%, 0) rotate(5deg); transform-origin: 0 100%; opacity: 0; filter: blur(8px); transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, filter 1s ease; transition-delay: calc(var(--i, 0) * 65ms + 80ms); }
.arrive-ready .words-in.arrived .w > span { transform: none; opacity: 1; filter: none; }
/* A stage tilts up into place, as a MacBook's lid opens and its screen lights. */
.arrive-ready .tilt-in { opacity: 0; transform: perspective(1600px) rotateX(22deg) translateY(100px) scale(0.9); transform-origin: 50% 100%; filter: brightness(0.5); transition: opacity 0.9s ease, transform 1.7s cubic-bezier(0.16, 1, 0.3, 1), filter 1.7s ease; }
.arrive-ready .tilt-in.arrived { opacity: 1; transform: none; filter: none; }
/* A band's shaped edge swells up from a flat line. */
.arrive-ready .tone-band::before { transform: scaleY(0.1); transform-origin: 50% 100%; transition: transform 1.9s cubic-bezier(0.16, 1, 0.3, 1); }
.arrive-ready .tone-band.arrived::before { transform: none; }
/* The notch's screen wakes: dark, then its wallpaper comes up, then the notch. */
.arrive-ready .theater .backdrop { transition: filter 2.2s cubic-bezier(0.4, 0, 0.2, 1); }
.arrive-ready .theater:not(.arrived) .backdrop { filter: brightness(0.05) saturate(0.3); }
.arrive-ready .theater .camera { transition: opacity 1.1s ease 0.7s; }
.arrive-ready .theater:not(.arrived) .camera { opacity: 0; }
/* Pip pops up onto its stage once the stage is in place. */
.arrive-ready .pip-stage .who { opacity: 0; transform: translateY(80px) scale(0.3); transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s, opacity 0.5s ease 0.55s; }
.arrive-ready .pip-stage.arrived .who { opacity: 1; transform: none; }
/* The questions, one after another. */
.arrive-ready .faq details { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: calc(var(--i, 0) * 75ms + 100ms); }
.arrive-ready .faq.arrived details { opacity: 1; transform: none; }

/* ---------- The hero ---------- */
/* Its word for SideDock: a little Mac, alive, in the heading's own size. */
.mini-mac { display: inline-block; width: 1.42em; height: 0.96em; margin: 0 0.16em 0 0.04em; padding: 0.045em; vertical-align: -0.14em; border-radius: 0.13em; background: #0a0a0c; box-shadow: 0 0 0 0.02em #2c2c31, 0 0.12em 0.3em rgba(5, 3, 18, 0.4); }
/* (A small copy of the wallpaper, resampled smoothly: the whole photo shrunk this far by the
   browser left the curves' edges stepped.) */
.mm-screen { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 0.085em 0.085em 0.04em 0.04em; background: #2a2140 url("../assets/wallpaper/mini.jpg") center / cover no-repeat; }
.mm-screen i { position: absolute; display: flex; gap: 0.018em; padding: 0.02em; border-radius: 0.045em; background: rgba(14, 14, 16, 0.82); opacity: 0; animation: mm-dock 7.2s cubic-bezier(0.2, 0.9, 0.3, 1) infinite; }
.mm-screen i b { display: block; width: 0.06em; height: 0.06em; border-radius: 0.016em; background: #fff; }
.mm-screen i b:nth-child(1) { background: #ff9f0a; }
.mm-screen i b:nth-child(2) { background: #30d158; }
.mm-screen i b:nth-child(3) { background: #0a84ff; }
.mm-screen i b:nth-child(4) { background: #bf5af2; }
.mm-screen .mm-left, .mm-screen .mm-right { flex-direction: column; top: 30%; }
/* (Each dock's turn: more specific than `.mm-screen i`, whose shorthand would reset it.) */
.mm-screen .mm-left { left: 0.025em; --from: translateX(-170%); animation-delay: 0s; }
.mm-screen .mm-tl { top: 0.025em; left: 12%; --from: translateY(-170%); animation-delay: 1.2s; }
.mm-screen .mm-tr { top: 0.025em; right: 12%; --from: translateY(-170%); animation-delay: 3.6s; }
.mm-screen .mm-right { right: 0.025em; --from: translateX(170%); animation-delay: 4.8s; }
.mm-screen .mm-bottom { bottom: 0.025em; left: 50%; margin-left: -0.17em; --from: translateY(170%); animation-delay: 6s; }
@keyframes mm-dock { 0%, 1% { opacity: 0; transform: var(--from); } 5%, 15% { opacity: 1; transform: none; } 19%, 100% { opacity: 0; transform: var(--from); } }
/* The notch, going live for its turn: wider, Pip's face in it. */
.mm-screen .mm-notch { top: 0; left: 50%; width: 0.2em; height: 0.065em; padding: 0; gap: 0; justify-content: flex-start; align-items: center; border-radius: 0 0 0.03em 0.03em; background: #000; opacity: 1; transform: translateX(-50%); animation: mm-notch 7.2s cubic-bezier(0.22, 0.61, 0.36, 1) infinite 2.4s; }
.mm-screen .mm-notch b, .mm-screen .mm-notch b:nth-child(n) { width: 0.045em; height: 0.045em; margin-left: 0.03em; border-radius: 50%; background: #fff; opacity: 0; animation: mm-face 7.2s ease infinite 2.4s; }
@keyframes mm-notch { 0%, 1% { width: 0.2em; height: 0.065em; } 5%, 15% { width: 0.5em; height: 0.085em; } 19%, 100% { width: 0.2em; height: 0.065em; } }
@keyframes mm-face { 0%, 4% { opacity: 0; } 6%, 14% { opacity: 1; } 17%, 100% { opacity: 0; } }
/* Pip, peeking up from the bottom of the wallpaper, as on the big demo Mac. */
.mm-screen .mm-pip { left: 50%; bottom: -0.11em; width: 0.26em; height: 0.26em; padding: 0; gap: 0.05em; justify-content: center; align-items: flex-start; padding-top: 0.06em; border-radius: 50%; background: #fff; opacity: 1; transform: translateX(-50%); animation: mm-peek 7.2s ease-in-out infinite; }
.mm-screen .mm-pip b, .mm-screen .mm-pip b:nth-child(n) { width: 0.026em; height: 0.05em; border-radius: 0.02em; background: #1c1c1e; }
@keyframes mm-peek { 0%, 100% { transform: translate(-50%, 0.04em); } 50% { transform: translate(-50%, -0.02em); } }
@media (prefers-reduced-motion: reduce) { .mm-screen i { animation: none; } .mm-left, .mm-right, .mm-tl, .mm-tr, .mm-bottom { opacity: 1; transform: none; } }

/* Its demo Mac arrives harder: from far back and tilted, its screen lighting as it comes up. */
.hero .mac { transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease, filter 2.4s ease; }
.hero .mac.arriving { opacity: 0; transform: rotateX(40deg) translateY(190px) scale(0.78); filter: brightness(0.2); }
/* The agents it reads, each on the dark round mark the app gives it (AgentMark). */
.agent-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; max-width: 470px; }
.agent-row span { display: inline-flex; align-items: center; gap: 9px; padding: 6px 15px 6px 6px; border-radius: 99px; background: rgba(12, 8, 24, 0.32); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); font: 600 15px var(--display); letter-spacing: -0.01em; color: var(--text); }
.agent-row i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #161618; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.agent-row img { width: 18px; height: 18px; object-fit: contain; }
/* Arriving, one after another. */
.arrive-ready .coding-copy:not(.arrived) .agent-row span { opacity: 0; transform: translateY(14px) scale(0.92); }
.arrive-ready .agent-row span { transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1); }
.arrive-ready .agent-row span:nth-child(2) { transition-delay: 0.08s; }
.arrive-ready .agent-row span:nth-child(3) { transition-delay: 0.16s; }
.arrive-ready .agent-row span:nth-child(4) { transition-delay: 0.24s; }
.arrive-ready .agent-row span:nth-child(5) { transition-delay: 0.32s; }
/* Hermes's mark is a drawing: a little bigger in its circle to be made out. */
.agent-row span:nth-child(5) img { width: 24px; height: 24px; border-radius: 50%; }

/* The hero's switch: the notch opens on a click or on a hover, as in Settings › Notch. */
.notch-mode { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.notch-mode span { padding: 0 10px 0 12px; font-size: 13px; color: var(--text-3); }
.notch-mode button { border: 0; padding: 7px 15px; border-radius: 99px; background: transparent; color: var(--text-2); font: 600 13px var(--font); cursor: pointer; transition: background 0.25s, color 0.25s; }
.notch-mode button:hover { color: var(--text); }
.notch-mode button[aria-checked="true"] { background: var(--pen, #ffd43b); color: var(--on-ink); }

/* Notices as a bar: Pip, the words and the buttons side by side under the camera
   (PipChipView.row: Pip 30 in 34, 13 pt words, 16 in from each end). */
.notice-tabs { justify-content: flex-start; margin: 0 0 16px; }
.notices .notice.bar-style { display: flex; align-items: center; gap: 10px; padding: 32px 16px 0; color: #fff; font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif; }
.notices .notice.bar-style .face { width: 34px; height: 34px; flex: none; display: grid; place-items: center; }
.notices .notice.bar-style .body { flex: 1; min-width: 0; flex-direction: row; align-items: center; gap: 10px; }
.notices .notice.bar-style .words { flex: 1; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; line-height: 16px; text-align: left; max-height: calc(16px * var(--lines)); overflow: hidden; }
.notices .notice.bar-style .actions { display: flex; gap: 8px; margin: 0; flex: none; }

/* Pip saying something from the page's notch (the hero's demo, Pip's turn, when the demo's
   own Pip is out of view): the navigation widens into a notice, Pip's face where it is. */
.notchnav .say { position: absolute; left: 50px; top: 50%; transform: translateY(-50%); max-height: 36px; overflow: hidden; font: 600 13.5px/18px var(--ui); color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.notchnav .say.measure { width: auto !important; white-space: nowrap; visibility: hidden; }
.notchnav.saying .say { opacity: 1; transition: opacity 0.2s 0.22s; }
.notchnav.saying .links, .notchnav.saying .button, .notchnav.saying .brand .name, .notchnav.saying .now { opacity: 0 !important; pointer-events: none; transition: opacity 0.1s !important; }
