:root {
  color-scheme: dark;
  --ink: #f9f4e8;
  --muted: #b6c4d1;
  --line: rgba(229, 192, 111, .32);
  --gold: #e5c06f;
  --deep: #04101d;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--deep); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(1, 6, 16, .44) 0%, rgba(3, 15, 29, .26) 46%, rgba(1, 7, 14, .68) 100%),
    radial-gradient(circle at 50% 36%, transparent 0, rgba(1, 8, 16, .14) 44%, rgba(1, 6, 12, .42) 100%),
    url("/assets/polaris-twilight.jpeg") center 50% / cover no-repeat;
}

.welcome {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 100vh;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 3rem);
  overflow: hidden;
}

.ambient {
  position: absolute;
  z-index: -1;
  width: 22rem;
  aspect-ratio: 1;
  border: 1px solid rgba(229, 192, 111, .08);
  border-radius: 50%;
  filter: blur(.2px);
}

.ambient-one { top: -12rem; left: -9rem; }
.ambient-two { right: -12rem; bottom: -13rem; width: 30rem; }

.hero { text-align: center; }

.eyebrow {
  position: absolute;
  z-index: 1;
  top: clamp(2rem, 5vw, 4.5rem);
  right: 0;
  left: 0;
  margin: 0;
  color: #f0d99a;
  font-size: .96rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .8);
  text-transform: uppercase;
}

.navigator-shell {
  width: clamp(8.015625rem, min(23.625vw, 21.9375vh), 16.453125rem);
  aspect-ratio: 1;
  margin: clamp(1.25rem, 3vh, 2rem) auto clamp(.65rem, 1.5vh, 1.1rem);
  filter: drop-shadow(0 0 34px rgba(229, 192, 111, .18));
}

.navigator-shell > [data-polaris-navigator] { width: 100%; height: 100%; }

h1 {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(3.25rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.055em;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .72);
}

.intro {
  max-width: 42rem;
  margin: 1.4rem auto 0;
  color: var(--muted);
  font-size: clamp(.98rem, 1.8vw, 1.2rem);
  line-height: 1.55;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .84);
}

.home-auth { width:min(470px,100%); margin:clamp(2.2rem,5vh,3.5rem) auto 0; padding:clamp(1.3rem,3vw,1.8rem); background:linear-gradient(135deg,rgba(5,17,31,.9),rgba(3,11,22,.8)); border:1px solid var(--line); border-radius:1rem; box-shadow:0 22px 70px rgba(0,0,0,.42); backdrop-filter:blur(16px); }
.home-auth[hidden],.portals[hidden]{display:none}.home-auth-kicker{margin:0 0 .55rem;color:var(--gold);font-size:.68rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase}.home-auth h2{margin:0;font:400 clamp(1.55rem,3vw,2rem)/1.1 Georgia,"Times New Roman",serif}.home-auth-copy{margin:.7rem 0 1.25rem;color:var(--muted);font-size:.84rem;line-height:1.5}.home-auth-form{display:grid;gap:.55rem;text-align:left}.home-auth-form label{margin-top:.25rem;color:#d7e0e8;font-size:.72rem;font-weight:750;letter-spacing:.03em}.home-auth-form input{width:100%;border:1px solid rgba(229,192,111,.28);border-radius:.7rem;padding:.78rem .9rem;color:var(--ink);background:rgba(1,8,16,.7);outline:none}.home-auth-form input:focus{border-color:rgba(229,192,111,.72);box-shadow:0 0 0 3px rgba(229,192,111,.1)}.home-auth-form button{margin-top:.55rem;border:0;border-radius:.7rem;padding:.82rem 1rem;color:#172033;background:linear-gradient(#f1d279,#d8ae45);font-weight:850;cursor:pointer}.home-auth-form button:disabled{cursor:wait;opacity:.65}.home-auth-message{min-height:1.2rem;margin:.75rem 0 0;color:#f0a39c;font-size:.78rem}

.portals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  width: min(1000px, 90%);
  margin: clamp(2.4rem, 5vh, 4rem) auto 0;
}

@media (max-width: 940px) and (min-width: 701px) {
  .portals { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(720px, 90%); }
  .portals .portal:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.portal {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .825rem;
  align-items: center;
  min-height: 6.75rem;
  padding: clamp(1rem, 2.25vw, 1.5rem);
  color: inherit;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(5, 17, 31, .84), rgba(3, 11, 22, .7));
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .4);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.portal:hover,
.portal:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(229, 192, 111, .65);
  background: linear-gradient(135deg, rgba(35, 38, 39, .82), rgba(5, 17, 31, .76));
  outline: none;
}

.portal-number {
  align-self: start;
  color: var(--gold);
  font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
}

.portal-copy { display: grid; gap: .4rem; }
.portal-copy strong { font: 400 clamp(1.2rem, 2.25vw, 1.6rem)/1.05 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: -.025em; }
.portal-copy span { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.portal-arrow { color: var(--gold); font-size: 1.05rem; transition: transform 180ms ease; }
.portal:hover .portal-arrow { transform: translate(3px, -3px); }

@media (max-width: 700px) {
  .welcome { align-content: start; padding-top: 2rem; }
  .navigator-shell { width: min(37.125vw, 10.546875rem); margin: 1.4rem auto .8rem; }
  .portals { grid-template-columns: 1fr; width: min(32rem, 100%); }
  .portal { min-height: 6.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .portal { transition: none; }
}
