/* The Liquid Glass & Prismatic Horizon startup and "Who's Watching?" (TVOS-LAUNCHER-MERGE-SPEC.md Part 2 §1,
 * MAHITTV-PROFILES-SPEC.md §3). Only transform and opacity animate; the startup's canvas draws the rest. */

/* The startup covers the screen from the first paint (studio midnight, as its first frame), so the home screen never
 * flashes before the lock. At the hand-off it turns transparent: the lock's identical Horizon is already under it. */
#intro { z-index: 7; background: #070B12; }
#intro.handoff { background: none; }
#intro canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
/* While the startup and the lock cover the screen, the home's background (art, aerial, blur) doesn't paint yet: its
 * first paint is a second of raster work, which would stall the startup (intro.js and lock.js set and clear this). */
.covered #sky { visibility: hidden; }
#intro .veil { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: rgba(255, 255, 255, 0.1); }
.night #intro .veil { background: rgba(0, 0, 0, 0.14); }

/* Over the Frosted Horizon: dark text by day, white at night. */
#lock { z-index: 6; color: #1D1D1F; visibility: hidden; opacity: 0; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; }
.night #lock { color: #FFF; }
/* The Frosted Horizon behind the cards and the PIN pad (over Settings too), a faint frost over it. */
#lock .bg { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; background: #DCE6EF; }
.night #lock .bg { background: #1C2638; }
#lock .bg .veil { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.1); }
.night #lock .bg .veil { background: rgba(0, 0, 0, 0.14); }

#lock .title {
  position: absolute;
  left: 0;
  right: 0;
  top: 214px;
  text-align: center;
  font-size: 57px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* A card: a 240 px squircle; focused it grows 1.18× (lock.js) with a ring (gold for the manager), its name and a lock. */
#lock .card { position: absolute; left: 0; top: 0; width: 240px; height: 240px; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; }
#lock .card .face {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  height: 240px;
  border-radius: 56px;
  overflow: hidden;
  background-color: #2A2B31;
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 34px rgba(22, 33, 45, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
/* A round avatar fills the squircle (lock.js checks its corners). */
#lock .card .face.roundface { background-size: 142%; }
#lock .card .spec {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 46%);
  background: linear-gradient(rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 46%);
}
#lock .card .shadow { position: absolute; left: 10px; top: 24px; width: 220px; height: 220px; border-radius: 56px; box-shadow: 0 30px 60px rgba(22, 33, 45, 0.42); opacity: 0; }
#lock .card .ring {
  position: absolute;
  left: -9px;
  top: -9px;
  width: 258px;
  height: 258px;
  border-radius: 64px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.95), 0 0 0 6px rgba(22, 33, 45, 0.12), 0 0 32px rgba(255, 255, 255, 0.5);
  opacity: 0;
}
#lock .card.manager .ring { box-shadow: 0 0 0 6px #E9C55A, 0 0 0 7px rgba(122, 90, 18, 0.25), 0 0 36px rgba(245, 208, 97, 0.6); }
#lock .card .label {
  position: absolute;
  left: -80px;
  right: -80px;
  top: 262px;
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
}

/* The lock glyph, drawn: a body and a shackle. */
.glyph-lock {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 14px;
  margin-left: 14px;
  border-radius: 3px;
  background: currentColor;
  vertical-align: 0;
  opacity: 0.8;
}
.glyph-lock::before {
  content: '';
  position: absolute;
  left: 2px;
  top: -10px;
  width: 9px;
  height: 11px;
  border: 2.5px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

/* The PIN HUD: a prompt, four dots, the glass 0–9 row, a message. */
#lock .hud { position: absolute; left: 0; top: 520px; width: 1920px; opacity: 0; visibility: hidden; }
#lock .prompt { text-align: center; font-size: 30px; font-weight: 600; opacity: 0.86; }
#lock .dots { margin: 34px auto 0; width: 224px; height: 26px; font-size: 0; text-align: center; }
#lock .dot {
  display: inline-block;
  width: 26px;
  height: 26px;
  margin: 0 14px;
  border-radius: 13px;
  box-sizing: border-box;
  border: 2.5px solid rgba(29, 29, 31, 0.6);
  -webkit-transition: background-color 0.12s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  transition: background-color 0.12s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
#lock .dot.on { background: #1D1D1F; border-color: #1D1D1F; }
.night #lock .dot { border-color: rgba(255, 255, 255, 0.72); }
.night #lock .dot.on { background: #FFF; border-color: #FFF; }
#lock .dots.gold .dot.on { background: #F5D061; border-color: #F5D061; box-shadow: 0 0 18px rgba(245, 208, 97, 0.75); }
#lock .pad {
  position: relative;
  margin: 48px auto 0;
  width: 966px;
  height: 104px;
  border-radius: 52px;
  font-size: 0;
  white-space: nowrap;
  background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.4));
  background: linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.4));
  box-shadow: 0 24px 60px rgba(22, 33, 45, 0.22), inset 0 1.5px 0 rgba(255, 255, 255, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.night #lock .pad {
  background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09));
  background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1.5px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
#lock .pad .digit {
  display: inline-block;
  width: 80px;
  height: 80px;
  margin: 12px 0 0 14px;
  border-radius: 40px;
  font-size: 38px;
  font-weight: 600;
  line-height: 80px;
  text-align: center;
  -webkit-font-feature-settings: 'tnum';
  font-feature-settings: 'tnum';
  -webkit-transition: background-color 0.12s cubic-bezier(0.22, 1, 0.36, 1), color 0.12s cubic-bezier(0.22, 1, 0.36, 1);
  transition: background-color 0.12s cubic-bezier(0.22, 1, 0.36, 1), color 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}
#lock .pad .digit:first-child { margin-left: 20px; }
#lock .pad .digit.focus { background: #1D1D1F; color: #FFF; box-shadow: 0 10px 24px rgba(22, 33, 45, 0.3); }
.night #lock .pad .digit.focus { background: #FFF; color: #1C1C1E; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35); }
#lock .msg { margin-top: 30px; height: 34px; text-align: center; font-size: 26px; font-weight: 500; opacity: 0.7; }

/* Control Center's Lock card uses the same glyph, larger. */
#drawer .key .glyph-lock { position: absolute; left: 26px; top: 32px; width: 22px; height: 17px; margin: 0; opacity: 1; }
#drawer .key .glyph-lock::before { left: 2.5px; top: -12px; width: 11px; height: 13px; border-width: 3px; }

.lite #lock .dot, .lite #lock .pad .digit { -webkit-transition: none; transition: none; }
.lite #lock .card .shadow { display: none; }
