/* The "forward a flight" demo phone (demos/forward-flight.js). The screen is
   drawn at 390 x 844, an iPhone's points, and scaled to fit the bezel, so every
   size below is in app points. App colours are the dark theme in
   packages/tokens/src/native.ts and status.ts. */

.ffd { width: 100%; max-width: 320px; position: relative; z-index: 2; }
.ffd-frame { box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.08) inset,
    0 50px 90px -28px rgba(0, 0, 0, 0.8),
    0 0 60px -10px rgba(101, 113, 238, 0.25); }
.ffd-viewport {
  position: relative; width: 100%; height: 100%;
  border-radius: 32px; overflow: hidden; background: #111113;
}
.ffd-screen {
  --bg: #111113; --card: #19191b; --raised: #232326; --comp: #2b2b30; --line: #3a3a40;
  --tx: #eeeef0; --mut: #a0a0ab; --acc: #6571ee; --on-acc: #0d0f26; --acc-mut: #1a1d4a;
  --flight: #ff802b; --hotel: #9d5bd2; --venue: #369eff; --green: #3dd68c;
  position: absolute; top: 0; left: 0; width: 390px; height: 844px;
  transform-origin: 0 0; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Roboto, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px; line-height: 1.35; color: var(--tx); letter-spacing: 0;
  -webkit-user-select: none; user-select: none;
}
.ffd-screen b { font-weight: 700; }
.ffd-i { flex-shrink: 0; display: block; }
.ffd-scene { position: absolute; inset: 0; transform-origin: 50% 40%; }
.ffd-muted { color: var(--mut); }
.ffd-sub { color: var(--mut); font-size: 13px; }
.ffd-row { display: flex; gap: 8px; align-items: baseline; }

/* Status bar */
.ffd-status { height: 54px; padding: 18px 30px 0 34px; display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; }
.ffd-status--dark { color: #000; }
.ffd-status-r { display: flex; gap: 6px; align-items: center; }
.ffd-bars { width: 18px; height: 11px; background: linear-gradient(90deg, currentColor 0 3px, transparent 3px 5px, currentColor 5px 8px, transparent 8px 10px, currentColor 10px 13px, transparent 13px 15px, currentColor 15px 18px); -webkit-mask: linear-gradient(0deg, #000 0 100%); clip-path: polygon(0 75%, 18% 75%, 18% 55%, 28% 55%, 28% 35%, 55% 35%, 55% 15%, 83% 15%, 83% 0, 100% 0, 100% 100%, 0 100%); }
.ffd-batt { width: 25px; height: 12px; border-radius: 3.5px; background: currentColor; box-shadow: 0 0 0 1px currentColor; opacity: 0.9; }

/* ---- Mail (light, like the system mail app) ---- */
.ffd-mail { background: #fff; color: #1c1c1e; }
.ffd-blue { color: #007aff; display: inline-flex; align-items: center; }
.ffd-grey { color: #8a8a8e; font-size: 13px; }
.ffd-mail-nav { height: 44px; padding: 0 8px; display: flex; align-items: center; font-size: 17px; }
.ffd-mail-body { padding: 6px 20px; font-size: 15px; }
.ffd-mail-body p { margin: 0 0 12px; }
.ffd-mail-subject { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 0 0 14px; letter-spacing: -0.3px; }
.ffd-mail-from { display: flex; gap: 10px; align-items: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #e5e5ea; font-size: 15px; line-height: 1.3; }
.ffd-av { width: 38px; height: 38px; border-radius: 50%; background: #c7c7cc; color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; flex-shrink: 0; }
.ffd-av--kippy { background: #6571ee; }
.ffd-itin { border: 1px solid #e5e5ea; border-radius: 12px; padding: 14px 16px; margin: 4px 0 16px; background: #f7f7fa; }
.ffd-itin-date { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #8a8a8e; margin-bottom: 10px; }
.ffd-itin-route { display: flex; align-items: center; gap: 12px; }
.ffd-itin-route > div:not(.ffd-itin-line) { display: flex; flex-direction: column; }
.ffd-itin-route b { font-size: 26px; letter-spacing: -0.5px; line-height: 1.1; }
.ffd-itin-route span { font-size: 13px; color: #3a3a3c; }
.ffd-itin-line { flex: 1; height: 0; border-top: 2px dashed #c7c7cc; }
.ffd-itin-foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e5e5ea; font-size: 13px; color: #3a3a3c; }
.ffd-mail-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; padding: 12px 34px 0; display: flex; justify-content: space-between; align-items: flex-start; color: #007aff; border-top: 1px solid #e5e5ea; background: #f9f9f9; }

/* Compose sheet */
.ffd-sheet { position: absolute; left: 0; right: 0; top: 58px; bottom: 0; background: #fff; color: #1c1c1e; border-radius: 12px 12px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.18); padding: 14px 18px; visibility: hidden; }
.ffd-sheet-top { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.ffd-send { width: 32px; height: 32px; border-radius: 50%; background: #007aff; color: #fff; display: grid; place-items: center; }
.ffd-sheet-title { font-size: 26px; font-weight: 700; line-height: 1.15; margin: 14px 0 10px; letter-spacing: -0.4px; }
.ffd-field { display: flex; gap: 8px; align-items: center; min-height: 44px; border-bottom: 1px solid #e5e5ea; font-size: 15px; }
.ffd-to { display: inline-flex; align-items: center; gap: 2px; }
.ffd-chip { display: none; background: #007aff; color: #fff; border-radius: 6px; padding: 2px 8px; font-weight: 500; }
.ffd-caret { display: inline-block; width: 2px; height: 20px; background: #007aff; margin-left: 2px; }
.ffd-suggest { position: absolute; left: 12px; right: 12px; top: 160px; z-index: 2; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.2); font-size: 15px; line-height: 1.3; opacity: 0; }
.ffd-quoted { margin-top: 14px; color: #8a8a8e; font-size: 14px; line-height: 1.45; }
.ffd-quoted b { color: #3a3a3c; font-weight: 600; }

/* ---- Kippy (dark) ---- */
.ffd-app, .ffd-review { background: var(--bg); }
.ffd-head { height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.ffd-head span { font-size: 20px; font-weight: 600; }
.ffd-head-pad { width: 24px; }
.ffd-cal { border-bottom: 1px solid var(--line); padding: 4px 8px 6px; }
.ffd-cal-top { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; height: 36px; }
.ffd-cal-top span { font-size: 17px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.ffd-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-top: 4px; }
.ffd-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ffd-day-l { font-size: 13px; color: var(--mut); }
.ffd-day-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.ffd-day.is-sel .ffd-day-n { background: var(--acc); color: var(--on-acc); font-weight: 600; }
.ffd-day-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mut); }
.ffd-day.is-sel .ffd-day-dot { background: var(--acc); }
.ffd-day-dot.is-none { visibility: hidden; }
.ffd-tabs { display: flex; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.ffd-tabs span { padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--mut); border: 1px solid transparent; }
.ffd-tabs .is-on { color: var(--tx); font-weight: 600; background: var(--acc-mut); border-color: var(--line); }
.ffd-list { padding: 12px 16px 0; }

.ffd-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.ffd-card--venue { border-left: 3px solid var(--venue); }
.ffd-card--hotel { border-left: 3px solid var(--hotel); }
.ffd-card--flight { border-left: 3px solid var(--flight); }
.ffd-card-head { display: flex; gap: 12px; align-items: center; padding: 12px; min-height: 44px; }
.ffd-card-main { flex: 1; min-width: 0; font-size: 15px; }
.ffd-c-venue { color: var(--venue); } .ffd-c-hotel { color: var(--hotel); } .ffd-c-flight { color: var(--flight); }
.ffd-btns { display: flex; gap: 10px; padding: 0 12px 12px; }
.ffd-btns i { width: 40px; height: 40px; border-radius: 50%; background: var(--comp); display: grid; place-items: center; color: var(--tx); }
.ffd-kv { display: flex; gap: 28px; padding: 0 12px 12px; font-size: 14px; }
.ffd-kv span { display: block; font-size: 12px; color: var(--mut); letter-spacing: 0.5px; }

/* The flight's place on the day: grows open when it lands. */
.ffd-slot { --glow: 0; height: 0; overflow: visible; position: relative; }
.ffd-slot .ffd-card { position: relative; margin-bottom: 0; box-shadow: 0 0 calc(28px * var(--glow)) calc(2px * var(--glow)) rgba(255, 128, 43, calc(0.55 * var(--glow))); }
.ffd-slot .ffd-card-head { padding: 12px; }
.ffd-chev { display: block; }
.ffd-more { position: absolute; left: 0; right: 0; top: 66px; margin: 0; padding: 10px 12px 12px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--flight); border-top: 0; border-radius: 0 0 10px 10px; opacity: 0; }
.ffd-more .ffd-btns { padding: 0 0 10px; }
.ffd-conf { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.ffd-conf i { width: 22px; height: 18px; border-radius: 5px; background: var(--comp); display: grid; place-items: center; }
.ffd-term { font-size: 14px; font-weight: 600; margin-top: 6px; }

.ffd-day-sched { padding: 12px 16px 6px; margin-top: 8px; }
.ffd-ds-title { font-size: 16px; color: var(--mut); margin-bottom: 8px; }
.ffd-ds-row { display: flex; align-items: center; gap: 14px; height: 34px; font-size: 15px; }
.ffd-ds-row span { width: 70px; color: var(--mut); font-size: 14px; }
.ffd-ds-row i { width: 9px; height: 9px; border-radius: 50%; }
.ffd-c-flight-bg { background: var(--flight); } .ffd-c-green-bg { background: #299764; }

.ffd-tabbar { position: absolute; left: 14px; right: 14px; bottom: 22px; height: 70px; border-radius: 26px; background: var(--raised); border: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; }
.ffd-tabbar span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 18px; }
.ffd-tabbar .is-on { background: var(--acc-mut); color: var(--acc); }

/* Import notice (NotificationToast) */
.ffd-banner { position: absolute; left: 12px; right: 12px; top: 52px; z-index: 5; padding: 12px 14px; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 2px; transform: translateY(-150px); }
.ffd-banner b { font-size: 15px; }
.ffd-banner span { font-size: 14px; color: var(--mut); }

/* Review import */
.ffd-review { visibility: hidden; box-shadow: -20px 0 40px rgba(0,0,0,.4); }
.ffd-rv { padding: 8px 16px; }
.ffd-rv-sum { padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 18px; font-size: 17px; }
.ffd-rv-sum .ffd-sub { margin-top: 4px; }
.ffd-rv-org { display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 8px; background: var(--acc-mut); color: #8b96ff; font-size: 13px; font-weight: 600; }
.ffd-rv-h { font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--mut); margin: 0 2px 8px; }
.ffd-review .ffd-card { margin-bottom: 0; border-radius: 10px 10px 0 0; }
.ffd-new { font-size: 11px; font-weight: 700; color: var(--green); background: rgba(61, 214, 140, 0.12); padding: 3px 8px; border-radius: 6px; }
.ffd-kv--rv { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--flight); border-top: 0; padding: 4px 12px 12px; margin: 0; gap: 18px; font-size: 13px; }
.ffd-kv--rv > div { flex: 1; }
.ffd-kv--rv em { display: block; font-style: normal; color: var(--mut); }
.ffd-rv-conf { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--flight); border-top: 0; border-radius: 0 0 10px 10px; padding: 0 12px 12px; font-size: 14px; }
.ffd-rv-foot { position: absolute; left: 16px; right: 16px; bottom: 40px; }
.ffd-add { height: 50px; border-radius: 12px; background: var(--acc); color: var(--on-acc); font-weight: 700; font-size: 16px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.ffd-added { display: none; text-align: center; color: var(--green); font-weight: 600; font-size: 16px; line-height: 50px; }

/* Touch indicator */
.ffd-finger { position: absolute; left: 0; top: 0; z-index: 10; width: 44px; height: 44px; opacity: 0; pointer-events: none; --press: 0; }
.ffd-finger i { position: absolute; inset: 0; border-radius: 50%; background: rgba(140, 140, 160, 0.45); border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 calc(14px * var(--press)) rgba(140, 140, 160, calc(0.3 * var(--press))), 0 4px 12px rgba(0,0,0,.3); }

/* Loop seam */
.ffd-blank { position: absolute; inset: 0; z-index: 20; background: #000; opacity: 0; pointer-events: none; }

/* ---- The section around it ---- */
.demo { padding: 40px 0 90px; overflow: hidden; }
.demo-inner { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 900px) { .demo-inner { grid-template-columns: 1fr 1fr; gap: 40px; } }
.demo h2 {
  font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 46px); font-weight: 800;
  letter-spacing: -1.4px; line-height: 1.05; margin-bottom: 14px;
}
.demo-sub { text-align: left; margin: 0 0 28px; }
.demo-steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.demo-steps li {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  border: 1px solid transparent; color: var(--text-muted); cursor: pointer;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.demo-steps li strong { color: var(--text); font-weight: 700; }
.demo-steps li.is-active { background: var(--surface); border-color: var(--border-lit); color: var(--text); }
.demo-step-n {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--text-muted);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.demo-steps li.is-active .demo-step-n { background: var(--accent); color: #fff; }
@media (prefers-reduced-motion: reduce) { .demo-steps li { cursor: default; } }
.demo-stage { position: relative; display: flex; justify-content: center; }
.demo-stage .showcase-glow { top: 15%; left: 15%; }
