@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-var.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
body { font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; }

/* Family Doorway — login page only. Layers over style.css + theme.css. */

.doorway {
  --door-a: #0e6d7c;
  --door-b: #06323b;
  --card: #fbfaf7;
  --gold: #d4af37;
  --gold-bright: #e6c65c;
  --ink: #12303a;
  --ink-soft: #4a6670;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(212,175,55,0.16), transparent 60%),
    linear-gradient(160deg, var(--door-a), var(--door-b));
  background-attachment: fixed;
  color: var(--card);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.doorway .door {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 3.2rem 1.4rem 2.4rem;
  text-align: center;
  /* override theme.css `main` card styling — the doorway floats on the gradient */
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* ---- header ---- */
.door-head { margin-bottom: 2rem; }
.door-emblem { color: var(--gold); margin: 0 auto 0.6rem; width: 34px; height: 34px; }
.door-emblem svg { display: block; width: 100%; height: 100%; }
.door-brand {
  margin: 0;
  font-family: 'Fraunces', "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.door-greeting {
  margin: 0.35rem 0 0;
  font-family: 'Fraunces', "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.15;
  color: #fdfbf5;
}

/* ---- shared small text ---- */
.door-error {
  background: rgba(255,255,255,0.95);
  color: #9c1c1c;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.door-note {
  background: rgba(255,255,255,0.95);
  color: #1a7f37;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.pick-label, .pin-label {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: rgba(253,251,245,0.82);
  margin: 0 0 1.1rem;
}

/* ---- person tiles ---- */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}
.tile {
  --accent: var(--gold);
  background: var(--card);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 16px;
  padding: 1.1rem 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 26px rgba(0,0,0,0.26);
  outline: none;
}
.tile:focus-visible { box-shadow: 0 0 0 3px var(--gold-bright), 0 12px 26px rgba(0,0,0,0.26); }
.tile-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.15rem;
  background: color-mix(in srgb, var(--accent) 16%, white);
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--gold) inset;
}
.tile-name { font-weight: 600; font-size: 1rem; }
.tile-role { font-size: 0.72rem; color: var(--ink-soft); text-transform: capitalize; }

/* ---- pin pad ---- */
.pinpad { position: relative; }
.back {
  position: absolute; top: -0.4rem; left: 0;
  background: none; border: none; color: rgba(253,251,245,0.85);
  font-size: 0.95rem; cursor: pointer; padding: 0.3rem 0.4rem;
}
.back:focus-visible { outline: 2px solid var(--gold-bright); border-radius: 6px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.who-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1.3rem;
  background: color-mix(in srgb, var(--accent, var(--gold)) 22%, white);
  color: var(--accent, var(--gold));
  box-shadow: 0 0 0 2px var(--gold) inset, 0 8px 18px rgba(0,0,0,0.22);
}
.who-name {
  font-family: 'Fraunces', "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.3rem; color: #fdfbf5;
}
.dots { display: flex; gap: 0.55rem; justify-content: center; min-height: 16px; margin-bottom: 1.4rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  max-width: 300px;
  margin: 0 auto;
}
.key {
  aspect-ratio: 3 / 2;
  background: var(--card);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 14px;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.16);
  transition: transform 0.08s ease, background 0.12s ease;
}
.key:hover { background: #fffdf6; }
.key:active { transform: scale(0.95); }
.key:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gold-bright); }
.key-enter { background: linear-gradient(180deg, var(--gold-bright), #c99a2e); color: #3a2a06; border-color: #b98e28; font-weight: 700; }
.key-ghost { background: rgba(255,255,255,0.14); color: #fdfbf5; border-color: rgba(255,255,255,0.22); box-shadow: none; }

/* ---- forgot / links ---- */
.linkish {
  background: none; border: none; cursor: pointer;
  color: var(--gold-bright); font-size: 0.9rem; text-decoration: underline;
  text-underline-offset: 3px; padding: 0.3rem;
}
.linkish:focus-visible { outline: 2px solid var(--gold-bright); border-radius: 6px; }

/* ---- reset section: dense form, keep on a readable white card ---- */
.reset {
  background: var(--card);
  color: var(--ink);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 16px;
  padding: 1.2rem 1.1rem;
  text-align: left;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
}
.reset h2 { margin: 0 0 0.8rem; font-size: 1.15rem; color: var(--ink); }
.reset label { color: var(--ink); }

/* ---- motion ---- */
@keyframes doorRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.door-head, .pick-label, .linkish { animation: doorRise 0.5s ease both; }
.tile { animation: doorRise 0.5s ease both; }
.tile:nth-child(1) { animation-delay: 0.05s; }
.tile:nth-child(2) { animation-delay: 0.12s; }
.tile:nth-child(3) { animation-delay: 0.19s; }
.tile:nth-child(4) { animation-delay: 0.26s; }
.pin-step-enter { animation: doorRise 0.32s ease both; }

@media (prefers-reduced-motion: reduce) {
  .door-head, .pick-label, .linkish, .tile, .pin-step-enter { animation: none; }
  .doorway * { transition: none !important; }
}

@media (max-width: 360px) {
  .door { padding-top: 2.2rem; }
  .door-greeting { font-size: 1.7rem; }
}
