/* The iPhone app's page (/iphone; server/app-page.js), in the homepage's type, palette and tinted
   panels (styles.css, company.css). Phones are sized by --w; everything in them scales with it.
   The pictures arrive once as the page opens or as their panel scrolls into view, and stay still
   for readers who prefer less motion. */

/* Hero: the words, then the app with its Live Activity, widget and notification around it. */
.app-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-bottom: clamp(28px, 4vw, 48px); }
.app-hero h1 { margin-top: 12px; font: 580 clamp(40px, 5.4vw, 66px)/1.06 var(--heading); letter-spacing: -.045em; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.app-store { min-height: 52px; padding-inline: 20px; font-size: 15px; font-weight: 550; }
.app-guide { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-dark); font-size: 14px; font-weight: 600; }
.app-guide:hover { text-decoration: underline; text-underline-offset: 3px; }
.app-tags { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.app-tags li { display: inline-flex; align-items: center; gap: 9px; }
.app-tags li::before { content: ''; width: 10px; height: 5px; margin-top: -3px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.app-qr { display: flex; align-items: center; gap: 14px; width: fit-content; margin-top: 30px; padding: 10px 18px 10px 10px; border-radius: 16px; background: var(--surface); box-shadow: var(--card); }
.app-qr svg { width: 88px; height: 88px; flex: 0 0 88px; color: var(--ink); }
.app-qr p { max-width: 168px; color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.5; }

.app-stage { --front: clamp(236px, 22vw, 272px); position: relative; height: clamp(560px, 50vw, 640px); }
.app-stage::before { content: ''; position: absolute; inset: 4% -6% 0 4%; border-radius: 50%; background: radial-gradient(closest-side, #b5a1f38c, #b5a1f300); }

/* A phone: a dark bezel, the screen, and the Dynamic Island over the screenshot's top. */
.app-phone { --w: 260px; position: relative; width: var(--w); margin: 0; padding: calc(var(--w) * .03); border-radius: calc(var(--w) * .165); background: #121214; box-shadow: inset 0 0 0 1.5px #3c3b42, 0 44px 70px -30px #3a2a7a73, 0 18px 30px -20px #19191b66; }
.app-phone img { display: block; width: 100%; height: auto; border-radius: calc(var(--w) * .136); background: #eef0f4; }
.app-phone::after { content: ''; position: absolute; top: calc(var(--w) * .054); left: 50%; width: calc(var(--w) * .27); height: calc(var(--w) * .079); border-radius: 99px; background: #000; transform: translateX(-50%); }
.app-stage .app-phone { position: absolute; }
.app-phone--front { --w: var(--front); z-index: 2; top: 3%; inset-inline-start: 34%; }
.app-phone--back { --w: clamp(204px, 19vw, 232px); z-index: 1; top: 10%; inset-inline-start: 6%; opacity: .96; transform: rotate(-7deg); }

.app-mark { width: 1em; height: 1em; flex: none; }
.app-up { width: 11px; height: 11px; flex: none; }
.app-progress { position: relative; display: block; height: 5px; overflow: hidden; border-radius: 99px; background: #ffffff33; }
.app-progress b { position: absolute; inset: 0 auto 0 0; width: 58.3%; border-radius: inherit; background: var(--lavender); }
[dir='rtl'] .app-progress b { inset: 0 0 0 auto; }

.app-island { position: absolute; z-index: 3; top: 3%; inset-inline-start: calc(34% + var(--front) / 2 - 146px); width: 292px; padding: 14px 18px 16px; border-radius: 30px; background: #0b0b0d; color: #fff; box-shadow: 0 22px 40px -18px #19191b99; }
.app-island-top { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.app-island-top .app-mark { color: var(--lavender); font-size: 18px; }
.app-island-top strong { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.app-island-top span { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.app-island p { margin: 8px 0 9px 28px; color: #ffffffb3; font-size: 12px; }
[dir='rtl'] .app-island p { margin: 8px 28px 9px 0; }

.app-widget { width: 158px; height: 158px; padding: 15px; border-radius: 26px; background: #fff; color: var(--ink); box-shadow: var(--pop); }
.app-widget p { margin: 0; }
/* One line each, as the widget's views set (lineLimit 1); the count may take two. */
.app-widget-label, .app-widget-change, .app-widget-time { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-widget-brand { display: flex; align-items: center; gap: 5px; overflow: hidden; color: #48454e; font-size: 11px; font-weight: 600; white-space: nowrap; }
.app-widget-brand .app-mark { color: var(--accent); font-size: 12px; }
.app-widget-number { margin-top: 14px !important; font: 700 38px/1 ui-rounded, "SF Pro Rounded", var(--body); letter-spacing: -.02em; }
.app-widget-label { color: var(--muted); font-size: 11px; }
.app-widget-change { display: flex; align-items: center; gap: 2px; margin-top: 10px !important; color: var(--accent); font-size: 11px; font-weight: 650; }
.app-widget-time { color: #9a98a3; font-size: 10px; }
.app-stage .app-widget--small { position: absolute; z-index: 3; bottom: 4%; inset-inline-start: 4%; }

.app-notice { display: flex; gap: 11px; width: 290px; padding: 12px 14px; border-radius: 22px; background: #fffffff0; color: var(--ink); box-shadow: var(--pop); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.app-notice-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 9px; background: #07111f; color: #fff; font-size: 22px; }
.app-notice > div { min-width: 0; flex: 1; }
.app-notice p { margin: 0; font-size: 13px; line-height: 1.35; }
.app-notice p:first-child { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.app-notice p:first-child strong { color: var(--ink); font-weight: 650; letter-spacing: .02em; }
.app-notice-title { margin-top: 2px !important; font-weight: 650; }
.app-stage .app-notice { position: absolute; z-index: 3; top: 50%; inset-inline-end: -2%; }

/* Tinted panels, as on the homepage. */
.app-panel { position: relative; margin-top: clamp(16px, 2.4vw, 28px); padding: clamp(28px, 4.6vw, 64px); overflow: hidden; border: 1px solid var(--edge, #e5deef); border-radius: 28px; background: var(--tint, var(--lavender-soft)); }
.app-panel h2 { font: 580 clamp(30px, 3.6vw, 44px)/1.1 var(--heading); letter-spacing: -.035em; }
.app-panel--butter { --tint: #f9f0d8; --edge: #e8dcbc; }
.app-panel--ink { --edge: #19191b; --tint: radial-gradient(90% 70% at 100% 0%, #3d2f78 0%, #232029 52%, #19191b 100%); color: #fff; }

/* Free check: the steps, then the result in the app with the check on the Lock Screen. */
.app-check { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); padding-bottom: 0; }
.app-check .app-panel-copy { padding-bottom: clamp(28px, 4.6vw, 64px); }
.app-check .resource-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.app-pill { padding: 4px 10px; border-radius: 99px; background: var(--surface); color: var(--ink); font-size: 11px; letter-spacing: .02em; text-transform: none; box-shadow: var(--card); }
.app-check h2 { margin-top: 14px; }
.app-lead { margin-top: 16px; max-width: 560px; color: #48454e; font-size: 16px; line-height: 1.75; }
.app-steps { display: grid; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: none; }
.app-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: 14px; font-weight: 600; box-shadow: var(--card); }
.app-steps span { display: inline-grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 50%; background: var(--lavender-soft); color: var(--accent-dark); font-size: 11px; font-weight: 700; }
.app-visual-note { max-width: 560px; margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.app-check-visual { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 560px; }
.app-check-visual .app-phone { --w: clamp(250px, 24vw, 284px); flex: none; margin-bottom: -72px; }
.app-live { position: absolute; z-index: 2; bottom: 22%; inset-inline-start: -6%; width: min(320px, 100%); padding: 14px 16px 16px; border-radius: 24px; background: #fffffff2; box-shadow: var(--pop); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.app-live-top { display: flex; align-items: center; gap: 10px; }
.app-live-top .app-mark { color: var(--accent); font-size: 22px; }
.app-live-top div { min-width: 0; flex: 1; }
.app-live-top strong { display: block; font-size: 14px; font-weight: 650; }
.app-live-top p { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.app-live-top > span { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.app-live .app-progress { height: 6px; margin-top: 12px; background: #ebe8f1; }
.app-live .app-progress b { background: var(--accent); }

/* At a glance: the Lock Screen, the Home Screen widgets, then what each surface does. */
.app-glance { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-bottom: 0; }
.app-glance-copy { align-self: center; padding-bottom: clamp(28px, 4.6vw, 64px); }
.app-glance h2 { color: #fff; }
.app-lock { position: relative; align-self: end; width: 290px; height: 540px; padding: 58px 18px 18px; overflow: hidden; border: 8px solid #121214; border-bottom: 0; border-radius: 48px 48px 0 0; background: radial-gradient(120% 60% at 30% 0%, #9d88ec 0%, #6350a9 38%, #2b2250 78%, #19161f 100%); box-shadow: inset 0 0 0 1px #ffffff1f, 0 0 0 1.5px #3c3b42, 0 40px 70px -30px #000000b3; color: #fff; text-align: center; }
.app-lock::before { content: ''; position: absolute; top: 11px; left: 50%; width: 82px; height: 24px; border-radius: 99px; background: #000; transform: translateX(-50%); }
.app-lock-inline { display: flex; align-items: center; justify-content: center; gap: 5px; color: #ffffffd9; font-size: 13px; font-weight: 600; }
.app-lock-time { margin-top: 2px; font: 700 76px/1 ui-rounded, "SF Pro Rounded", var(--body); letter-spacing: -.02em; color: #ffffffeb; }
.app-lock-widgets { display: flex; align-items: center; gap: 12px; margin-top: 16px; text-align: start; }
.app-ring { position: relative; display: grid; width: 64px; height: 64px; flex: 0 0 64px; place-content: center; border-radius: 50%; background: #ffffff2e; text-align: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.app-ring svg { position: absolute; inset: 4px; width: 56px; height: 56px; transform: rotate(-90deg); }
.app-ring circle { fill: none; stroke: #ffffff47; stroke-width: 3.4; }
.app-ring circle + circle { stroke: #fff; stroke-linecap: round; }
.app-ring strong { font: 700 15px/1 ui-rounded, "SF Pro Rounded", var(--body); }
.app-ring small { color: #ffffffb3; font-size: 9px; font-weight: 600; }
.app-lock-rect { min-width: 0; flex: 1; }
.app-lock-rect p { display: flex; align-items: center; gap: 5px; overflow: hidden; margin: 0; font-size: 14px; font-weight: 650; white-space: nowrap; }
.app-lock-rect p + p { color: #ffffffd9; font-size: 13px; font-weight: 600; }
.app-lock-rect strong { font-size: 15px; }
.app-lock-rect small { color: #ffffffa6; font-size: 11px; }
.app-lock-notice { margin-top: 34px; text-align: start; }
.app-lock-notice .app-notice { width: auto; background: #ffffffd1; }

.app-glance-copy { min-width: 0; }
.app-home { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.app-widget--medium { display: flex; gap: 14px; width: 338px; height: auto; min-height: 158px; }
.app-widget-half { width: 128px; flex: none; }
.app-widget-detail { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 6px; padding-inline-start: 14px; border-inline-start: .5px solid var(--line); }
.app-bar p { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 650; }
.app-bar p span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bar p span + span { color: #48454e; font-variant-numeric: tabular-nums; }
.app-bar i { position: relative; display: block; height: 5px; margin-top: 3px; overflow: hidden; border-radius: 99px; background: #efedf3; }
.app-bar b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--accent); }
[dir='rtl'] .app-bar b { inset: 0 0 0 auto; }
.app-bar--rival b { background: #c4c1cc; }
.app-widget-count { display: -webkit-box; margin-top: auto !important; overflow: hidden; color: #48454e; font-size: 11px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.app-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin: 34px 0 0; padding: 26px 0 0; border-top: 1px solid #ffffff21; list-style: none; }
.app-features li { display: flex; gap: 14px; }
.app-features svg { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; color: var(--lavender); }
.app-features h3 { font: 600 16px/1.35 var(--heading); letter-spacing: -.01em; }
.app-features p { margin-top: 6px; color: #ffffffad; font-size: 14px; line-height: 1.65; }

/* On the go: three screens cut by the panel, each with its words below. */
.app-go h2 { max-width: 640px; }
.app-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); margin-top: clamp(24px, 3vw, 36px); }
.app-shot-frame { position: relative; display: flex; justify-content: center; height: 370px; padding-top: 26px; overflow: hidden; border-radius: 22px; background: #fffaf0; box-shadow: var(--card); -webkit-mask-image: linear-gradient(#000 78%, #0000); mask-image: linear-gradient(#000 78%, #0000); }
.app-shot-frame .app-phone { --w: min(240px, 78%); flex: none; }
.app-changed { position: absolute; top: 222px; left: 50%; width: min(290px, 92%); padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: var(--pop); transform: translateX(-50%); }
.app-changed-head { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.app-changed-head svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.app-changed-head strong { font-weight: 650; }
.app-changed-head small { margin-inline-start: auto; color: var(--muted); font-size: 10.5px; }
.app-changed p + p { margin-top: 8px; color: #36333c; font-size: 13px; line-height: 1.55; }
.app-shot h3 { margin-top: 18px; font: 580 21px/1.3 var(--heading); letter-spacing: -.015em; }
.app-shot p { margin-top: 8px; color: #5b5560; font-size: 14px; line-height: 1.7; }

.app-faq { margin-top: clamp(28px, 4vw, 48px); }

/* Closing: the button, the guide, and the code to scan from a computer. */
.app-closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; margin-top: 12px; padding: clamp(28px, 4.6vw, 56px); border: 1px solid #e5deef; border-radius: 28px; background: radial-gradient(80% 120% at 100% 100%, #e3daf8 0%, #f3effa 60%); }
.app-closing-copy { max-width: 600px; }
.app-closing h2 { font: 580 clamp(28px, 3.4vw, 40px)/1.12 var(--heading); letter-spacing: -.035em; }
.app-closing p { margin-top: 14px; color: #48454e; font-size: 15px; line-height: 1.75; }
.app-closing .app-qr { margin-top: 0; }

/* Arriving: once as the page opens (the hero) or as a panel scrolls in (site.js data-reveal). */
@media (prefers-reduced-motion: no-preference) {
  .app-phone--front { animation: app-rise 900ms var(--ease-out) both; }
  .app-phone--back { animation: app-tilt 1100ms var(--ease-out) 120ms both; }
  .app-stage .app-island { animation: app-drop 800ms var(--ease-out) 420ms both; }
  .app-stage .app-progress b { animation: app-fill 2600ms var(--ease-out) 800ms both; }
  .app-stage .app-widget--small { animation: app-rise 800ms var(--ease-out) 640ms both; }
  .app-stage .app-notice { animation: app-slide 800ms var(--ease-out) 1500ms both; }
  [data-reveal='shown'] .app-live .app-progress b { animation: app-fill 2600ms var(--ease-out) 500ms both; }
  [data-reveal='shown'] .app-ring circle + circle { animation: app-ring 1600ms var(--ease-out) 400ms both; }
  [data-reveal='shown'] .app-bar b { animation: app-grow 1200ms var(--ease-out) 500ms both; }
}
@keyframes app-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes app-tilt { from { opacity: 0; transform: rotate(0deg) translateX(40px); } }
@keyframes app-drop { from { opacity: 0; transform: translateY(-16px) scale(.94); } }
@keyframes app-slide { from { opacity: 0; transform: translateX(24px); } }
@keyframes app-fill { from { width: 4%; } }
@keyframes app-ring { from { stroke-dasharray: 0 100; } }
@keyframes app-grow { from { width: 0; } }

@media (hover: none) { .app-hero .app-qr { display: none; } }
@media (max-width: 1020px) {
  .app-hero { grid-template-columns: minmax(0, 1fr); }
  .app-hero .app-qr { display: none; }
  .app-stage { width: min(560px, 100%); height: 600px; margin-inline: auto; }
  .app-check, .app-glance { grid-template-columns: minmax(0, 1fr); }
  .app-check .app-panel-copy { padding-bottom: 0; }
  .app-check-visual { min-height: 0; height: 520px; }
  .app-lock { order: 2; margin-inline: auto; }
  .app-glance-copy { padding-bottom: 8px; }
  .app-trio { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-inline: auto; }
}
@media (max-width: 620px) {
  .app-stage { height: 520px; }
  .app-stage { --front: 224px; }
  .app-phone--front { inset-inline-start: auto; inset-inline-end: 4%; top: 6%; }
  .app-phone--back { --w: 190px; top: 14%; inset-inline-start: 2%; }
  .app-island { width: 254px; padding: 12px 15px 14px; inset-inline-start: auto; inset-inline-end: calc(4% + var(--front) / 2 - 127px); top: 5%; }
  .app-stage .app-notice { top: auto; bottom: 0; inset-inline-end: 0; width: 262px; }
  .app-stage .app-widget--small { bottom: 22%; inset-inline-start: 0; width: 138px; height: 138px; padding: 13px; }
  .app-stage .app-widget-number { font-size: 32px; }
  .app-panel { border-radius: 22px; }
  .app-check-visual { height: 470px; }
  .app-live { inset-inline-start: 0; bottom: 26%; }
  .app-lock { width: min(290px, 100%); height: 470px; }
  .app-widget--medium { width: 100%; }
  .app-home .app-widget--small { display: none; }
  .app-features { grid-template-columns: minmax(0, 1fr); }
  .app-closing .app-qr { display: none; }
}
@media (hover: none) { .app-closing .app-qr { display: none; } }
