/* v04 Coach on Text: tokens, page, avatar, lock screen (landing) */
:root {
  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --bg: #ffffff;
  --page: #e9ecf2;
  --ink: #0b0d12;
  --ink-2: #5d6370;
  --ink-3: #9aa0ab;
  --in: #e9e9eb;          /* the coach's bubbles */
  --out: #1b7cff;         /* your bubbles */
  --out-2: #0a6cf0;
  --green: #22c55e;
  --green-ink: #0f8a3e;
  --red: #ff3b30;
  --amber: #ff9f0a;
  --line: rgba(11, 13, 18, .08);
  --card: #ffffff;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--ink);
  font: 16px/1.35 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--out); outline-offset: 3px; }
.notif:focus-visible, .reply:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px var(--out); }

/* Coach Alp's face, cropped from the team photo */
.av {
  --s: 34px;
  flex: none;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: #c9302c url(../../assets/coaches.jpg) no-repeat;
  background-size: calc(var(--s) * 4.1) auto;
  background-position: calc(var(--s) * -.62) calc(var(--s) * -.16);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
}
.av--sm { --s: 22px; border-radius: 6px; }
.av--md { --s: 46px; }
.av--lg { --s: 64px; }

/* ---------- landing: the lock screen ---------- */
.lock {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--sat) + 54px) 16px calc(var(--sab) + 28px);
  color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, #1d2a44 0%, #0b0f17 70%);
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
body.has-pitch .lock { background: transparent; }
.lock__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 8, 14, .55) 0%, rgba(5, 8, 14, .1) 38%, rgba(5, 8, 14, .25) 62%, rgba(5, 8, 14, .78) 100%);
}
.lock__top { position: relative; text-align: center; animation: lockIn .8s var(--ease) both; }
.lock__lockicon { display: block; opacity: .9; margin-bottom: 8px; }
.lock__date { font-weight: 600; font-size: 18px; opacity: .92; letter-spacing: .01em; }
.lock__time {
  font-weight: 700; font-size: clamp(84px, 26vw, 120px); line-height: 1; letter-spacing: -.04em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
  font-variant-numeric: tabular-nums;
}
.lock__stack {
  position: relative; margin-top: auto; width: 100%; max-width: 420px;
  display: grid; gap: 14px; justify-items: center;
}
.lock__hint { margin: 0; font-size: 14px; opacity: .8; text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.lock.is-leaving { opacity: 0; transform: scale(1.06); pointer-events: none; }

.notif {
  width: 100%; text-align: left; border: 0; cursor: pointer;
  display: grid; gap: 6px;
  padding: 14px 14px 12px;
  border-radius: 24px;
  color: var(--ink);
  background: rgba(246, 246, 248, .86);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  animation: notifIn .9s var(--spring) .35s both;
  transition: transform .2s var(--ease);
}
.notif:active:not(:disabled) { transform: scale(.97); }
.notif:disabled { cursor: progress; }
.notif__head { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.notif__app { font-weight: 600; }
.notif__when { margin-left: auto; letter-spacing: 0; }
.notif__body { display: grid; gap: 2px; font-size: 16px; line-height: 1.3; }
.notif__body b { font-size: 16px; }
.notif__go {
  margin-top: 8px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; border-radius: 16px;
  background: var(--out); color: #fff; font-weight: 700; font-size: 17px;
  transition: background .3s, transform .3s var(--spring);
}
.notif:disabled .notif__go { background: #c6cbd5; color: #4b5260; }
.notif.is-ready .notif__go { animation: goPulse 2.2s ease-in-out 1s infinite; }
.notif.is-failed .notif__go { background: var(--ink); color: #fff; }
.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
.notif.is-ready .spin, .notif.is-failed .spin { display: none; }

@keyframes lockIn { from { opacity: 0; transform: translateY(-14px); } }
@keyframes notifIn { from { opacity: 0; transform: translateY(-40px) scale(.94); } }
@keyframes goPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  .lock { padding-top: 70px; padding-bottom: 60px; }
  .lock__time { font-size: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
