/* ==========================================================================
   QwikWarcs — landing page ("scenery flow") + account system · 2026-11-13/14
   Mobile-first. Brand tokens mirror qwik-warcs-brand-assets/web/brand-tokens.json:
   electric blue #00A3FF · violet #7B3DFF · deep ink #1A1F2B · slate #2B313D · soft white #E6E6E6
   ========================================================================== */

:root {
  --blue:   #00A3FF;
  --violet: #7B3DFF;
  --ink:    #1A1F2B;
  --slate:  #2B313D;
  --white:  #E6E6E6;
  --grad: linear-gradient(90deg, var(--blue), var(--violet));
  --nav-h: 64px;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a { color: inherit; }

::selection { background: rgba(0, 163, 255, .35); }

/* ---------- fixed scenery backdrop (scenery flow) ---------- */

.scenery {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 72% 18%, rgba(123, 61, 255, .20), transparent 62%),
    radial-gradient(60% 45% at 22% 78%, rgba(0, 163, 255, .16), transparent 60%),
    var(--ink);
}

.scenery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease;
  will-change: opacity, transform;
}

.scenery img.is-active {
  opacity: 1;
  animation: scene-breathe 18s ease-in-out infinite alternate;
}

@keyframes scene-breathe {
  from { transform: scale(1.05); }
  to   { transform: scale(1.13); }
}

/* readability scrim over whichever scene is active */
.scenery::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 31, 43, .72) 0%,
    rgba(26, 31, 43, .30) 28%,
    rgba(26, 31, 43, .38) 62%,
    rgba(26, 31, 43, .85) 100%
  );
}

/* ---------- scroll progress hairline ---------- */

.progress {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--grad);
  z-index: 60;
  opacity: .85;
}

/* ---------- site header / nav ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}

.site-header.scrolled {
  background: rgba(26, 31, 43, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: rgba(230, 230, 230, .08);
}

.nav {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }

.nav-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* header meta (clock + auth) — no section links in the header bar (owner direction 2026-11-14) */
@media (min-width: 880px) {
  .nav-meta { padding-left: 4px; }
}

/* clock — visitor-local time, gradient tabular digits, pulsing colons */
.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  font-family: var(--font-mono);
}

.clock small {
  font-size: .56rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(230, 230, 230, .45);
}

.clock-time {
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.clock-time i {
  font-style: normal;
  animation: colon-pulse 1s ease-in-out infinite;
}

@keyframes colon-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* login / register / logout pills */
.btn-login {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 163, 255, .5);
  background: linear-gradient(135deg, rgba(0, 163, 255, .16), rgba(123, 61, 255, .16));
  color: var(--white);
  font-size: .9rem;
  font-family: inherit;
  text-decoration: none;
  letter-spacing: .02em;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.btn-login:hover {
  border-color: var(--blue);
  box-shadow: 0 0 20px rgba(0, 163, 255, .35);
  transform: translateY(-1px);
}

.btn-login-solid {
  background: linear-gradient(135deg, rgba(0, 163, 255, .85), rgba(123, 61, 255, .85));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.btn-login-solid:hover { box-shadow: 0 0 24px rgba(123, 61, 255, .5); }

.btn-logout { padding: 8px 14px; font-size: .85rem; opacity: .9; }
.inline-form { display: inline; margin: 0; }

/* authenticated user chip */
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(230, 230, 230, .18);
  background: rgba(43, 49, 61, .55);
  font-size: .88rem;
  letter-spacing: .02em;
  text-decoration: none;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color .2s ease;
}

.nav-user:hover { border-color: rgba(0, 163, 255, .6); }

.nav-user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  flex: none;
  box-shadow: 0 0 8px rgba(0, 163, 255, .8);
}

/* very small phones: tighten the top bar */
@media (max-width: 479px) {
  .brand img { height: 32px; }
  .clock-time .ss { display: none; }
  .btn-login { padding: 7px 12px; font-size: .82rem; }
  .nav-user { max-width: 96px; }
}

/* ---------- scenes (scenery-flow sections) ---------- */

main { position: relative; }

.scene {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 32px) 20px 56px;
  scroll-margin-top: var(--nav-h);
}

.scene-inner {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

.kicker {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scene-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.015em;
}

.scene-copy {
  margin: 0 auto;
  max-width: 56ch;
  font-size: clamp(1rem, 2.4vw, 1.13rem);
  color: rgba(230, 230, 230, .84);
  text-shadow: 0 1px 14px rgba(26, 31, 43, .55);
}

/* hero */
.scene-hero { flex-direction: column; }

.hero-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 8vh;
}

.hero-logo {
  width: min(86vw, 620px);
  height: auto;
  margin: 0 0 26px;
  filter: drop-shadow(0 12px 44px rgba(0, 163, 255, .28));
}

.hero-sub {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: rgba(230, 230, 230, .78);
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(230, 230, 230, .5);
}

.scroll-cue em {
  font-style: normal;
  font-size: .68rem;
  letter-spacing: .34em;
  text-transform: uppercase;
}

.scroll-cue span {
  position: relative;
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: rgba(230, 230, 230, .15);
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  left: 0;
  top: -50%;
  width: 100%;
  height: 50%;
  background: var(--grad);
  animation: cue-drop 1.8s cubic-bezier(.4, 0, .2, 1) infinite;
}

@keyframes cue-drop {
  to { top: 110%; }
}

/* ---------- auth pages (login / register / verify / account) ---------- */

.auth-scene { min-height: auto; padding-top: calc(var(--nav-h) + 8vh); }

.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 34px 30px 30px;
  border-radius: 18px;
  border: 1px solid rgba(230, 230, 230, .1);
  background: linear-gradient(165deg, rgba(43, 49, 61, .88), rgba(26, 31, 43, .92));
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 163, 255, .06) inset;
  text-align: left;
}

.auth-card .kicker { margin-bottom: 6px; }

.auth-title {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.01em;
}

.auth-sub {
  margin: 26px 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
}

.auth-hint { margin: 0 0 16px; color: rgba(230, 230, 230, .8); font-size: .95rem; }

.auth-alt { margin: 18px 0 0; text-align: center; color: rgba(230, 230, 230, .65); font-size: .92rem; }
.auth-alt a { color: var(--blue); text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* fields */
.field { display: block; margin: 0 0 14px; }

.field span {
  display: block;
  margin-bottom: 6px;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(230, 230, 230, .55);
}

.field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(230, 230, 230, .16);
  background: rgba(26, 31, 43, .65);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input::placeholder { color: rgba(230, 230, 230, .32); }

.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, .18);
}

/* primary button */
.btn-primary {
  width: 100%;
  padding: 12px 18px;
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: box-shadow .2s ease, transform .15s ease, filter .2s ease;
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(0, 163, 255, .4);
  transform: translateY(-1px);
}

/* password requirements checklist (js toggles .ok / .fail) */
.req-list {
  list-style: none;
  margin: -4px 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(26, 31, 43, .5);
  border: 1px solid rgba(230, 230, 230, .08);
  font-size: .85rem;
  color: rgba(230, 230, 230, .6);
}

.req-list li { padding-left: 24px; position: relative; margin: 2px 0; }

.req-list li::before {
  content: "○";
  position: absolute;
  left: 2px;
  color: rgba(230, 230, 230, .4);
}

.req-list li.ok { color: rgba(230, 230, 230, .92); }
.req-list li.ok::before { content: "✓"; color: var(--blue); }
.req-list li.fail { color: #ff8f8f; }
.req-list li.fail::before { content: "✕"; color: #ff6b6b; }

/* flash messages */
.flash {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .92rem;
  border: 1px solid transparent;
}

.flash-ok {
  background: rgba(0, 163, 255, .1);
  border-color: rgba(0, 163, 255, .35);
  color: #bfe7ff;
}

.flash-err {
  background: rgba(255, 107, 107, .08);
  border-color: rgba(255, 107, 107, .4);
  color: #ffb3b3;
}

.flash-notice {
  background: rgba(123, 61, 255, .1);
  border-color: rgba(123, 61, 255, .4);
  color: #d9c8ff;
}

/* account facts */
.acct-facts { margin: 0 0 8px; }
.acct-facts > div { padding: 8px 0; border-bottom: 1px solid rgba(230, 230, 230, .07); }
.acct-facts dt {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(230, 230, 230, .5);
}
.acct-facts dd { margin: 2px 0 0; font-size: .98rem; }

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .04em;
  vertical-align: middle;
}

.badge-ok { background: rgba(0, 163, 255, .18); color: #bfe7ff; border: 1px solid rgba(0, 163, 255, .4); }
.badge-wait { background: rgba(230, 230, 230, .08); color: rgba(230, 230, 230, .6); border: 1px solid rgba(230, 230, 230, .2); }

/* verify page */
.resend-form { margin-top: 14px; text-align: center; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue);
  font-family: inherit;
  font-size: .9rem;
  cursor: pointer;
}

.link-btn:hover { text-decoration: underline; }

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

.site-footer {
  position: relative;
  padding: 64px 20px 44px;
  text-align: center;
  background: linear-gradient(180deg, rgba(26, 31, 43, .92), var(--ink) 160px);
  border-top: 1px solid rgba(230, 230, 230, .08);
}

.foot-mark {
  height: 46px;
  width: auto;
  margin: 0 auto 16px;
  display: block;
  opacity: .95;
}

.foot-tagline {
  margin: 0 0 10px;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-meta { margin: 0 0 10px; color: rgba(230, 230, 230, .55); font-size: .9rem; }
.foot-credit { margin: 0 0 8px; color: rgba(230, 230, 230, .68); font-size: .85rem; letter-spacing: .01em; }
.foot-copy { margin: 0; color: rgba(230, 230, 230, .38); font-size: .8rem; }

/* ---------- accessibility ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scenery img { transform: none; animation: none; transition: opacity .3s ease; }
  .clock-time i, .scroll-cue span::after { animation: none; }
}
