/* ═══════════════════════════════════════════════════════════════
   setup.css — the landing experience

   Two screens live here, both floating on the live wallpaper so
   every choice the user makes is visible *through* the glass they
   are making the choice on:

     .land  first-run setup wizard
     .lock  the personalised greeting screen on every later visit
   ═══════════════════════════════════════════════════════════════ */

.land, .lock {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(var(--edge-lo) / .22);
  backdrop-filter: blur(3px) saturate(115%);
  -webkit-backdrop-filter: blur(3px) saturate(115%);
  animation: landIn 520ms var(--ease);
}
@keyframes landIn { from { opacity: 0; } }
.land.out, .lock.out {
  animation: landOut 460ms var(--ease) forwards;
  pointer-events: none;
}
@keyframes landOut { to { opacity: 0; transform: scale(1.04); } }

/* ═══════════════════ SETUP WIZARD ═══════════════════ */
.land-card {
  position: relative;
  width: min(700px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  --g-blur: 34px;
  --g-alpha: .11;
  box-shadow: var(--g-inset), var(--shadow-deep);
  animation: cardIn 620ms var(--ease-back);
}
@keyframes cardIn { from { opacity: 0; transform: scale(.93) translateY(24px); } }
.land-card > * { position: relative; z-index: 3; }

.land-body {
  padding: 40px 44px 30px;
  overflow-y: auto;
  min-height: 0;
}
.land-body.anim { animation: stepIn 380ms var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(22px); } }
.land-body.back { animation: stepBack 380ms var(--ease); }
@keyframes stepBack { from { opacity: 0; transform: translateX(-22px); } }

.land-kicker {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.land-title {
  margin: 0;
  font-size: 33px;
  font-weight: 250;
  letter-spacing: -.015em;
  line-height: 1.14;
}
.land-title b { font-weight: 600; }
.land-sub {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text-2);
  max-width: 54ch;
}

/* the animated wordmark on step one */
.land-mark {
  width: 92px; height: 92px;
  margin-bottom: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--g-radius);
  color: var(--text);
  background: linear-gradient(155deg, rgb(var(--g-tint) / .22), rgb(var(--g-tint) / .04));
  box-shadow:
    inset 0 2px 14px -5px rgb(var(--refract-cool) / .95),
    inset 0 -2px 14px -5px rgb(var(--refract-warm) / .75),
    inset 0 1px 0 rgb(var(--edge-hi) / .55),
    0 0 0 .5px rgb(var(--edge-hi) / .22),
    0 14px 34px -12px rgb(var(--edge-lo) / .6);
  animation: markFloat 7s ease-in-out infinite;
}
@keyframes markFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-9px) rotate(3deg); }
}
.land-mark svg { animation: markSpin 26s linear infinite; }
@keyframes markSpin { to { transform: rotate(360deg); } }

/* ── footer: dots + navigation ── */
.land-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  box-shadow: inset 0 1px 0 rgb(var(--edge-hi) / .12);
}
.land-dots { display: flex; gap: 7px; flex: 1; padding-left: 8px; }
.land-dots i {
  width: 6px; height: 6px;
  border-radius: var(--r-round);
  background: rgb(var(--edge-hi) / .22);
  box-shadow: inset 0 0 0 .5px rgb(var(--edge-hi) / .3);
  transition: all 320ms var(--ease-back);
}
.land-dots i.on {
  width: 20px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, hsl(var(--accent) / .9), hsl(var(--accent-2) / .8));
  box-shadow: 0 0 10px -1px hsl(var(--accent) / .7);
}
.land-dots i.done { background: rgb(var(--edge-hi) / .42); }
.land-skip {
  font-size: 11.5px;
  color: var(--text-3);
  padding: 4px 8px;
  border-radius: var(--g-radius-2xs);
  transition: color 150ms linear, background 150ms linear;
}
.land-skip:hover { color: var(--text-2); background: rgb(var(--edge-hi) / .1); }

/* ── name field, oversized ── */
.land-name {
  width: 100%;
  height: 56px;
  margin-top: 22px;
  padding: 0 18px;
  border: 0;
  outline: 0;
  border-radius: var(--g-radius-sm);
  font-size: 22px;
  font-weight: 300;
  color: var(--text);
  background: rgb(var(--edge-lo) / .16);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  box-shadow:
    inset 0 1px 6px rgb(var(--edge-lo) / .3),
    inset 0 0 0 .5px rgb(var(--edge-hi) / .2),
    inset 0 -1px 10px -4px rgb(var(--refract-warm) / .4);
  user-select: text;
  cursor: text;
  transition: box-shadow 200ms var(--ease);
}
[data-theme="lumen"] .land-name { background: rgb(255 255 255 / .4); }
.land-name::placeholder { color: var(--text-3); }
.land-name:focus {
  box-shadow:
    inset 0 1px 6px rgb(var(--edge-lo) / .3),
    inset 0 0 0 1.5px hsl(var(--accent) / .6),
    0 0 0 4px hsl(var(--accent) / .13),
    inset 0 -1px 12px -4px rgb(var(--refract-cool) / .6);
}
.land-echo {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
  min-height: 20px;
}
.land-echo b { color: var(--text); font-weight: 600; }

/* ── avatar picker ── */
.av {
  display: grid;
  place-items: center;
  border-radius: var(--r-round);
  font-size: 18px;
  line-height: 1;
  color: rgb(255 255 255 / .96);
  text-shadow: 0 1px 3px rgb(0 0 0 / .35);
  box-shadow:
    inset 0 1.5px 0 rgb(255 255 255 / .5),
    inset 0 -2px 8px -3px rgb(0 0 0 / .4),
    0 0 0 .5px rgb(var(--edge-hi) / .3),
    0 4px 12px -5px rgb(var(--edge-lo) / .55);
}
.av-lg { width: 76px; height: 76px; font-size: 30px; }
.av-md { width: 42px; height: 42px; font-size: 18px; }
.av-sm { width: 21px; height: 21px; font-size: 10px; }

.land-avrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}
.land-avgrid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  flex: 1;
}
.land-avgrid .av {
  width: 100%;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 180ms var(--ease-back), box-shadow 200ms var(--ease);
}
.land-avgrid .av:hover { transform: translateY(-3px) scale(1.08); }
.land-avgrid .av.on {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    inset 0 1.5px 0 rgb(255 255 255 / .6),
    0 0 0 2px hsl(var(--accent) / .9),
    0 6px 16px -5px hsl(var(--accent) / .6);
}
.land-glyphs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.land-glyphs button {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--g-radius-xs);
  font-size: 15px;
  color: var(--text-2);
  background: rgb(var(--g-tint) / calc(var(--tint-a) * 1.3));
  box-shadow: inset 0 0 0 .5px rgb(var(--edge-hi) / .18),
              inset 0 1px 6px -3px rgb(var(--refract-cool) / .5);
  transition: all 160ms var(--ease);
}
.land-glyphs button:hover { color: var(--text); transform: translateY(-2px); }
.land-glyphs button.on {
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px hsl(var(--accent) / .8),
              inset 0 1px 8px -3px rgb(var(--refract-cool) / .7);
}

/* ── theme + preset cards ── */
.land-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.land-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px;
  border-radius: var(--g-radius-sm);
  text-align: left;
  background: rgb(var(--g-tint) / calc(var(--tint-a) * 1.2));
  box-shadow:
    inset 0 0 0 .5px rgb(var(--edge-hi) / .18),
    inset 0 1px 8px -4px rgb(var(--refract-cool) / .55);
  transition: transform 180ms var(--ease), box-shadow 220ms var(--ease);
}
.land-tile:hover { transform: translateY(-3px); }
.land-tile.on {
  box-shadow:
    inset 0 0 0 1.5px hsl(var(--accent) / .75),
    inset 0 1px 12px -4px rgb(var(--refract-cool) / .85),
    0 8px 22px -9px hsl(var(--accent) / .55);
}
.land-tile .sw {
  height: 54px;
  border-radius: var(--g-radius-xs);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45),
              0 0 0 .5px rgb(var(--edge-hi) / .25);
}
.land-tile b { font-size: 12.5px; font-weight: 600; }
.land-tile i {
  font-size: 10.5px;
  font-style: normal;
  color: var(--text-3);
  line-height: 1.45;
}

/* ── accent hue slider ── */
.hue-range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; }
.hue-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg,
    hsl(0 100% 62%), hsl(60 100% 62%), hsl(120 100% 62%),
    hsl(180 100% 62%), hsl(240 100% 62%), hsl(300 100% 62%), hsl(360 100% 62%));
  box-shadow: inset 0 1px 4px rgb(var(--edge-lo) / .34),
              inset 0 0 0 .5px rgb(var(--edge-hi) / .28);
}
.hue-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin-top: -5px;
  border-radius: var(--r-round);
  background: linear-gradient(155deg, rgb(255 255 255 / .6), rgb(255 255 255 / .18));
  backdrop-filter: blur(6px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .9),
    inset 0 -1px 5px -1px rgb(var(--refract-warm) / .7),
    0 0 0 1px rgb(var(--edge-hi) / .45),
    0 2px 8px rgb(var(--edge-lo) / .4);
  transition: transform 130ms var(--ease-back);
}
.hue-range::-webkit-slider-thumb:hover { transform: scale(1.16); }
.hue-range::-moz-range-thumb {
  width: 18px; height: 18px; border: 0; border-radius: var(--r-round);
  background: rgb(255 255 255 / .55);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .5), 0 2px 6px rgb(0 0 0 / .4);
}

/* ── summary on the final step ── */
.land-summary { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.land-srow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 12.5px;
  box-shadow: inset 0 -1px 0 rgb(var(--edge-hi) / .09);
}
.land-srow span { color: var(--text-3); min-width: 92px; }
.land-srow b { font-weight: 550; }
.land-srow .sw { width: 34px; height: 18px; border-radius: var(--g-radius-2xs);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 0 0 .5px rgb(var(--edge-hi) / .25); }

/* ═══════════════════ LOCK / GREETING SCREEN ═══════════════════ */
.lock { flex-direction: column; gap: 0; cursor: pointer; }
.lock-time {
  font-size: clamp(58px, 12vw, 116px);
  font-weight: 150;
  letter-spacing: -.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 40px rgb(var(--edge-lo) / .45);
  animation: lockUp 760ms var(--ease-back);
}
[data-theme="lumen"] .lock-time { text-shadow: 0 4px 40px rgb(255 255 255 / .6); }
.lock-date {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text-2);
  animation: lockUp 760ms 60ms var(--ease-back) backwards;
}
@keyframes lockUp { from { opacity: 0; transform: translateY(26px); } }

.lock-user {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 42px;
  padding: 10px 20px 10px 10px;
  border-radius: var(--r-pill);
  --g-alpha: .1;
  box-shadow: var(--g-inset), var(--shadow-lift);
  animation: lockUp 760ms 140ms var(--ease-back) backwards;
}
.lock-user > * { position: relative; z-index: 3; }
.lock-hi { font-size: 15px; font-weight: 500; }
.lock-hi i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; }

.lock-enter {
  margin-top: 26px;
  height: 42px;
  padding: 0 26px;
  font-size: 13.5px;
  animation: lockUp 760ms 220ms var(--ease-back) backwards;
}
.lock-hint {
  margin-top: 30px;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
  max-width: 42ch;
  line-height: 1.6;
  animation: lockUp 760ms 300ms var(--ease-back) backwards;
}
.lock-hint b { color: var(--text-2); font-weight: 550; }
.lock-tip {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-3);
  opacity: .8;
  transition: opacity 400ms linear;
}

@media (max-width: 640px) {
  .land-body { padding: 28px 22px 22px; }
  .land-title { font-size: 26px; }
  .land-avgrid { grid-template-columns: repeat(5, 1fr); }
}


/* ═══════════════════ PASSCODE KEYPAD ═══════════════════
   One component, used by the greeting screen and by the Settings
   challenge, so entering a passcode looks the same everywhere. */
.pin { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pin.shake { animation: pinShake 420ms var(--ease); }
@keyframes pinShake {
  10%, 90% { transform: translateX(-3px); }
  20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.pin-dots { display: flex; gap: 13px; height: 15px; align-items: center; }
.pin-dots i {
  width: 13px; height: 13px;
  border-radius: var(--r-round);
  background: rgb(var(--edge-hi) / .12);
  box-shadow: inset 0 1px 3px rgb(var(--edge-lo) / .35),
              inset 0 0 0 .5px rgb(var(--edge-hi) / .3);
  transition: all 200ms var(--ease-back);
}
.pin-dots i.on {
  background: linear-gradient(150deg, hsl(var(--accent) / .95), hsl(var(--accent-2) / .7));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .5),
    0 0 12px -1px hsl(var(--accent) / .8);
  transform: scale(1.12);
}

.pin-msg {
  font-size: 11.5px;
  color: var(--text-3);
  min-height: 16px;
  text-align: center;
  transition: color 200ms linear;
}
.pin-msg.bad { color: hsl(var(--danger) / 1); }

.pin-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: 10px;
}
.pin-key {
  position: relative;
  isolation: isolate;
  height: 52px;
  border-radius: var(--g-radius-sm);
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(158deg,
    rgb(var(--g-tint) / calc(var(--tint-a) * 2)) 0%,
    rgb(var(--g-tint) / calc(var(--tint-a) * .5)) 55%,
    rgb(var(--g-tint) / calc(var(--tint-a) * 1.4)) 100%);
  backdrop-filter: blur(12px) saturate(170%) brightness(1.07);
  -webkit-backdrop-filter: blur(12px) saturate(170%) brightness(1.07);
  box-shadow:
    inset 0 1.5px 8px -4px rgb(var(--refract-cool) / calc(var(--g-disperse) * .95)),
    inset 0 -1.5px 8px -4px rgb(var(--refract-warm) / calc(var(--g-disperse) * .7)),
    inset 0 1px 0 rgb(var(--edge-hi) / .34),
    0 0 0 .5px rgb(var(--edge-hi) / .14),
    0 3px 10px -5px rgb(var(--edge-lo) / .45);
  transition: transform 120ms var(--ease), box-shadow 160ms var(--ease);
}
.pin-key::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(70px 44px at var(--mx, 50%) var(--my, 0%),
    rgb(var(--edge-hi) / .22), transparent 72%);
  opacity: 0;
  transition: opacity 180ms linear;
}
.pin-key:hover::after { opacity: 1; }
.pin-key:hover { transform: translateY(-1px); }
.pin-key:active {
  transform: scale(.94);
  box-shadow:
    inset 0 2px 8px -2px rgb(var(--edge-lo) / .34),
    inset 0 1px 0 rgb(var(--edge-hi) / .2);
}
.pin-aux { font-size: 12px; color: var(--text-2); }
.pin-aux svg { margin: 0 auto; }

.pin-dlg { width: min(320px, 90vw); }
.pin-dlg .pin { margin-top: 4px; }

/* the greeting screen variant sits a little lower and wider */
.lock .pin { margin-top: 26px; animation: lockUp 760ms 200ms var(--ease-back) backwards; }
.lock .pin-grid { grid-template-columns: repeat(3, 70px); }


/* the honesty notice on the Lock pane */
.lk-warn {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 6px;
}
.lk-warn > span { flex: none; color: hsl(var(--accent) / 1); display: flex; padding-top: 1px; }
.lk-warn b { font-size: 12.5px; font-weight: 600; display: block; }
.lk-warn p {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
}


/* ── other accounts on the greeting screen ── */
.lock-switch {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: lockUp 760ms 260ms var(--ease-back) backwards;
}
.lock-swlabel {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.lock-others { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.lock-other {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: var(--g-radius-sm);
  font-size: 11.5px;
  color: var(--text-2);
  transition: transform 180ms var(--ease-back), background 160ms linear, color 160ms linear;
}
.lock-other:hover {
  transform: translateY(-3px);
  background: rgb(var(--edge-hi) / .1);
  color: var(--text);
}
.lock-other .av { transition: box-shadow 200ms var(--ease); }
.lock-other:hover .av {
  box-shadow:
    inset 0 1.5px 0 rgb(255 255 255 / .55),
    0 0 0 2px hsl(var(--accent) / .8),
    0 6px 16px -5px hsl(var(--accent) / .6);
}

/* user rows in Settings */
.us-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  box-shadow: inset 0 -1px 0 rgb(var(--edge-hi) / .08);
}
.us-row .us-meta { flex: 1; min-width: 0; }
.us-row .us-meta b { display: block; font-size: 12.5px; font-weight: 600; }
.us-row .us-meta i {
  display: block; font-style: normal; font-size: 10.5px;
  color: var(--text-3); margin-top: 2px;
}


/* asking for a name on the greeting screen, when it is still default */
.lock-name {
  margin-top: 20px;
  width: min(320px, 80vw);
  height: 44px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  border-radius: var(--g-radius-sm);
  font-size: 15px;
  text-align: center;
  color: var(--text);
  background: rgb(var(--edge-lo) / .18);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 5px rgb(var(--edge-lo) / .3),
    inset 0 0 0 .5px rgb(var(--edge-hi) / .22);
  user-select: text;
  cursor: text;
  animation: lockUp 760ms 180ms var(--ease-back) backwards;
  transition: box-shadow 200ms var(--ease);
}
.lock-name::placeholder { color: var(--text-3); }
.lock-name:focus {
  box-shadow:
    inset 0 1px 5px rgb(var(--edge-lo) / .3),
    inset 0 0 0 1.5px hsl(var(--accent) / .6),
    0 0 0 4px hsl(var(--accent) / .13);
}
