/* ============================================================
   home.css · start screen
   ============================================================ */

/* ---------- scene: the planet at dawn ---------- */

.scene { position: fixed; inset: 0; overflow: hidden; z-index: 0; }

.backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 62% 76%,
      rgba(40, 72, 92, .40) 0%, rgba(10, 18, 26, 0) 60%),
    linear-gradient(180deg, #03050a 0%, #060c13 45%, #0a131b 100%);
}

.stars { position: absolute; inset: 0; }
.star  { position: absolute; border-radius: 50%; background: #cfe0ea; }

@media (prefers-reduced-motion: no-preference) {
  .star.twinkle { animation: twinkle 5s ease-in-out infinite; }
}
@keyframes twinkle { 0%, 100% { opacity: .85; } 50% { opacity: .18; } }

/* the sun, behind the planet */
.sun {
  position: absolute; left: 64%; top: 69%;
  width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(232,244,250,.95)  0%,
    rgba(176,212,231,.55)  2.2%,
    rgba(116,168,196,.30)  5.5%,
    rgba(70,118,148,.16)  12%,
    rgba(42,78,100,.07)   24%,
    rgba(20,40,56,0)      46%);
}

/* glow along the limb */
.atmosphere {
  position: absolute; left: 50%; top: 70%;
  width: 220vmax; height: 220vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 57% 2%,
    rgba(196,228,242,.85) 0%,
    rgba(126,182,208,.34) 1.1%,
    rgba(74,128,152,.14)  2.4%,
    rgba(40,78,96,0)      4.6%);
  filter: blur(6px);
}

.planet {
  position: absolute; left: 50%; top: 70.35%;
  width: 220vmax; height: 220vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 57% 1.5%,
      rgba(118,154,170,.20) 0%, rgba(50,76,90,.10) 2.4%, rgba(16,28,36,0) 7%),
    radial-gradient(circle at 40% 6%,
      rgba(60,92,78,.16) 0%, rgba(20,34,32,0) 9%),
    linear-gradient(180deg, #0c1419 0%, #070c11 22%, #04080c 100%);
}

.haze {
  position: absolute; left: 50%; top: 70.35%;
  width: 220vmax; height: 220vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: .5;
  background:
    radial-gradient(ellipse 30% 1.1% at 46% 2.4%, rgba(150,186,200,.16), transparent 70%),
    radial-gradient(ellipse 22% .9%  at 66% 3.4%, rgba(132,176,192,.12), transparent 70%),
    radial-gradient(ellipse 26% .8%  at 38% 4.6%, rgba(110,150,168,.09), transparent 70%);
}

.vignette {
  position: fixed; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%,
    rgba(0,0,0,0) 38%, rgba(0,0,0,.62) 100%);
}

/* ---------- layout ---------- */

.layer {
  position: relative; z-index: 10;
  height: 100%;
  display: flex; flex-direction: column;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

/* ---------- avatar ---------- */

.avatar {
  display: none;
  align-items: center;
  gap: 13px;
  background: rgba(13, 20, 27, .72);
  border: 1px solid var(--border);
  padding: 7px 15px 7px 8px;
  backdrop-filter: blur(3px);
}
.avatar.on { display: flex; }

.helmet {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  background: #121b22;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
}
.helmet svg { width: 24px; height: 24px; display: block; }

.avatar-info   { line-height: 1.45; }
.avatar-name   { font-size: 12.5px; color: var(--ice); }
.avatar-status { font-size: 10.5px; letter-spacing: .14em; color: var(--green); }

/* ---------- language ---------- */

.lang { position: relative; margin-left: auto; }

.lang-btn {
  display: flex; align-items: center; gap: 14px;
  background: rgba(13, 20, 27, .72);
  border: 1px solid var(--border);
  color: var(--grey);
  font: inherit;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(3px);
  transition: border-color .15s, color .15s;
}
.lang-btn:hover, .lang-btn:focus-visible {
  color: var(--ice); border-color: var(--border-strong); outline: none;
}
.lang-btn .caret { font-size: 9px; color: var(--faint); }

.query-btn {
  display: flex; flex-direction: column;
  font-size: 11.5px; line-height: 1.55;
  letter-spacing: .04em; white-space: nowrap;
}
.query-btn .l2 { padding-left: 1.7em; }
.query-btn .kw { color: var(--green); }

.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 100%;
  background: rgba(8, 13, 18, .95);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  display: none;
}
.lang-menu.open { display: block; }

.lang-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  background: none; border: none;
  color: var(--grey);
  font: inherit; font-size: 13px;
  text-align: left; padding: 11px 14px;
  cursor: pointer;
}
.lang-option:hover, .lang-option:focus-visible {
  background: rgba(32, 48, 58, .5); color: var(--ice); outline: none;
}
.lang-option .n { color: var(--faint); font-size: 11px; width: 14px; }
.lang-option[aria-checked="true"] .n { color: var(--green); }

/* ---------- centre ---------- */

.center {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding-bottom: 5vh;
}

/* To change the title typeface, edit only this family.
   Others that fit: "Archivo", "Syne", "Space Grotesk", "Saira". */
.wordmark {
  font-family: var(--sans);
  display: inline-flex; flex-direction: column;
  color: var(--ice);
}
.wordmark-main {
  font-weight: 200;
  font-size: clamp(44px, 10vw, 112px);
  line-height: 1;
  letter-spacing: .15em;
  margin-right: -.15em;          /* drops the trailing letter-space */
  text-shadow: 0 0 52px rgba(143, 192, 216, .3);
}
.wordmark-sub {
  display: flex; justify-content: space-between;
  font-weight: 300;
  font-size: clamp(13px, 2.72vw, 30px);
  line-height: 1;
  margin-top: .5em;
  color: var(--grey);
}
.wordmark-sub i { font-style: normal; }

.tagline {
  font-size: 12.5px;
  letter-spacing: .26em;
  color: var(--faint);
  margin-top: 24px;
}

/* ---------- views ---------- */

.view { display: none; width: min(340px, 100%); margin-top: 46px; }
.view.on { display: block; }

.view-title {
  font-size: 11px; letter-spacing: .28em;
  color: var(--faint); margin-bottom: 18px; text-align: left;
}

.actions { display: flex; flex-direction: column; gap: 10px; }

.btn {
  width: 100%;
  background: rgba(13, 20, 27, .7);
  border: 1px solid var(--border);
  color: var(--grey);
  font: inherit; font-size: 13px; letter-spacing: .17em;
  padding: 15px 18px;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: color .15s, border-color .15s, background .15s;
}
.btn:hover, .btn:focus-visible {
  color: var(--ice);
  border-color: var(--border-strong);
  background: rgba(22, 34, 43, .78);
  outline: none;
}

.btn-primary {
  color: var(--ice);
  border-color: rgba(127, 184, 164, .5);
  background: rgba(18, 36, 36, .6);
}
.btn-primary:hover, .btn-primary:focus-visible {
  border-color: var(--green);
  background: rgba(26, 52, 50, .7);
  box-shadow: 0 0 26px rgba(127, 184, 164, .14);
}

.btn[hidden] { display: none; }

/* text link, no box */
.btn-link {
  display: block;
  width: 100%;
  margin-top: -2px;
  background: none;
  border: none;
  backdrop-filter: none;
  color: var(--grey);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: none;
  padding: 5px 0 4px;
}
.btn-link:hover, .btn-link:focus-visible {
  background: none;
  border: none;
  color: var(--ice);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
}

.back {
  background: none; border: none;
  color: var(--faint);
  font: inherit; font-size: 12px;
  letter-spacing: .1em;
  cursor: pointer;
  margin-top: 20px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.back:hover, .back:focus-visible {
  color: var(--grey); border-bottom-color: var(--border-strong); outline: none;
}

/* ---------- forms ---------- */

.field { text-align: left; margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px; letter-spacing: .16em;
  color: var(--faint); margin-bottom: 7px;
}
.field input {
  width: 100%;
  background: rgba(6, 10, 14, .8);
  border: 1px solid var(--border);
  color: var(--ice);
  font: inherit; font-size: 13px;
  padding: 12px 13px;
}
.field input:focus { outline: none; border-color: var(--border-strong); }
.field input:disabled { color: var(--dim); cursor: not-allowed; }

.form-note {
  font-size: 11.5px; line-height: 1.7;
  color: var(--dim); text-align: left;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin: 18px 0 4px;
}

/* ---------- guest confirmation ---------- */

.confirm {
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(8, 13, 18, .88);
  backdrop-filter: blur(4px);
  padding: 22px;
}
.confirm-title {
  font-size: 12px; letter-spacing: .2em;
  color: var(--ice); margin-bottom: 14px;
}
.confirm-text {
  font-size: 12.5px; line-height: 1.8;
  color: var(--grey); margin-bottom: 22px;
}
.confirm-actions { display: flex; flex-direction: column; gap: 9px; }

/* ---------- footer ---------- */

.footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 11px; letter-spacing: .14em; color: #3a464f;
}

.sound {
  display: flex; align-items: center; gap: 9px;
  background: none; border: 1px solid transparent;
  color: #3a464f;
  font: inherit; font-size: 11px;
  letter-spacing: .14em;
  padding: 6px 10px;
  cursor: pointer;
}
.sound:hover, .sound:focus-visible {
  color: var(--grey); border-color: var(--border); outline: none;
}
.sound-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2d3a43;
  transition: background .2s, box-shadow .2s;
}
.sound.active .sound-dot {
  background: var(--green);
  box-shadow: 0 0 9px var(--green);
}

@media (max-width: 560px) {
  .layer { padding: 16px; }
  .view { margin-top: 34px; }
  .footer { font-size: 10px; }
  .avatar-info { display: none; }
  .avatar { padding: 7px; }
}
