:root {
  color-scheme: dark;
  --bg: #090c10;
  --surface: #15181e;
  --ink: #f4f7fb;
  --text: #d7dee9;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, .22);
  --brand: #38bdf8;
  --brand-2: #2dd4bf;
  --shadow: 0 18px 48px rgba(0, 0, 0, .32);
  --radius: 8px;
  --landing-hero-image: url("/static/media/nas-hero.png");
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@supports (background-image: image-set(url("data:image/webp;base64,UklGRgAAAABXRUJQVlA4IAAAAAAAAA==") type("image/webp"))) {
  :root {
    --landing-hero-image: image-set(
      url("/static/media/nas-hero-1600.webp?v=20260716-perf-1") type("image/webp"),
      url("/static/media/nas-hero.png") type("image/png")
    );
  }
}

@media (max-width: 760px) {
  :root { --landing-hero-image: url("/static/media/nas-hero.png"); }

  @supports (background-image: image-set(url("data:image/webp;base64,UklGRgAAAABXRUJQVlA4IAAAAAAAAA==") type("image/webp"))) {
    :root {
      --landing-hero-image: image-set(
        url("/static/media/nas-hero-960.webp?v=20260716-perf-1") type("image/webp"),
        url("/static/media/nas-hero.png") type("image/png")
      );
    }
  }
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: landing-page-leave .12s ease-out both; }
::view-transition-new(root) { animation: landing-page-enter .22s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes landing-page-leave { to { opacity: 0; transform: translate3d(0, 3px, 0); } }
@keyframes landing-page-enter { from { opacity: 0; transform: translate3d(0, 7px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 260px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 120px);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, .button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(56, 189, 248, .42);
  border-radius: var(--radius);
  padding: 10px 15px;
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  color: #f8fafc;
  box-shadow: 0 12px 26px rgba(14, 165, 233, .16);
  cursor: pointer;
  font-weight: 800;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
button:hover, .button:hover { transform: translate3d(0, -1px, 0); }
button:active, .button:active { transform: translate3d(0, 0, 0); }
button.secondary, .button.secondary { border-color: var(--line); background: rgba(148, 163, 184, .12); color: #dbeafe; box-shadow: none; }
.button.compact, button.compact { min-height: 36px; padding: 8px 12px; font-size: 14px; }
.button.full { width: 100%; }
input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #0f131a;
  color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus { border-color: rgba(56, 189, 248, .78); outline: 0; box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
label { display: grid; gap: 7px; color: #e5e7eb; font-weight: 750; }
.stack { display: grid; gap: 14px; }
.eyebrow { margin: 0 0 10px; color: #7dd3fc; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.lead { max-width: 760px; margin: 20px 0 0; color: #dbe4f0; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.55; }
.form-note { color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.5; }
.alert { margin: 0 0 16px; border-radius: var(--radius); padding: 12px 14px; font-weight: 800; }
.alert.danger { border: 1px solid rgba(251, 113, 133, .36); background: rgba(251, 113, 133, .12); color: #fecdd3; }

.public-shell { background: #0b0d11; }
.public-nav {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  width: min(1180px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 18px 0;
}
.public-brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 900; }
.public-brand > span { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #061016; font-size: 14px; font-weight: 950; }
.public-links { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 6px; background: rgba(12, 15, 20, .64); backdrop-filter: blur(18px); }
.public-links > a:not(.button) { padding: 8px 10px; color: #d7dee9; font-weight: 800; }
.public-page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 70px 0; }
.public-hero {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  justify-content: flex-end;
  gap: 24px;
  padding: 120px 24px 64px;
  background:
    linear-gradient(90deg, rgba(8, 11, 16, .94) 0%, rgba(8, 11, 16, .78) 38%, rgba(8, 11, 16, .18) 72%),
    linear-gradient(180deg, rgba(8, 11, 16, .12), #0b0d11 96%),
    var(--landing-hero-image) center / cover no-repeat;
}
.public-hero-copy { width: min(1180px, 100%); max-width: 690px; margin: 0 auto max(0px, 36px) max(0px, calc((100vw - 1180px) / 2)); }
.public-hero h1 { margin: 0; color: var(--ink); font-size: clamp(44px, 8vw, 96px); line-height: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-status { display: grid; width: min(840px, 100%); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-left: max(0px, calc((100vw - 1180px) / 2)); }
.hero-status span { display: grid; min-height: 76px; gap: 3px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); padding: 14px; background: rgba(16, 20, 27, .78); color: var(--muted); backdrop-filter: blur(18px); }
.hero-status strong { color: var(--ink); font-size: 18px; }
.public-band { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.35fr); align-items: start; gap: 38px; }
.public-band h2, .public-feature h2 { margin: 0 0 12px; color: var(--ink); font-size: clamp(28px, 4vw, 46px); line-height: 1.02; }
.public-band p, .public-feature p { color: var(--muted); line-height: 1.7; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.info-card, .login-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.info-card { min-height: 150px; padding: 20px; }
.info-card h3 { margin: 0 0 10px; color: var(--ink); }
.info-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.public-feature { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 30px; border-top: 1px solid var(--line); }
.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 480px) minmax(0, 1fr);
  align-items: stretch;
  background: linear-gradient(90deg, #0b0d11 0%, #0b0d11 38%, rgba(11, 13, 17, .22) 68%), var(--landing-hero-image) center / cover no-repeat;
}
.login-panel { display: grid; width: 100%; min-height: 100vh; align-content: center; gap: 22px; border-width: 0 1px 0 0; border-radius: 0; padding: 40px; background: rgba(15, 19, 26, .96); box-shadow: none; }
.login-copy h1 { margin: 0 0 10px; color: var(--ink); font-size: 42px; line-height: 1; }
.login-copy p { margin: 0; color: var(--muted); line-height: 1.6; }
.login-aside { display: grid; align-content: end; padding: 60px; }
.login-aside > div { width: min(520px, 100%); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 22px; background: rgba(12, 15, 20, .68); backdrop-filter: blur(18px); }
.login-aside strong { display: block; margin-top: 8px; color: var(--ink); font-size: 28px; line-height: 1.12; }
.mini-kicker { color: #7dd3fc; font-weight: 900; }

@media (max-width: 1120px) {
  .public-band, .public-feature { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .public-nav { position: absolute; width: calc(100% - 24px); padding-top: 12px; }
  .public-links > a:not(.button) { display: none; }
  .public-hero { min-height: 100dvh; padding: 112px 16px 36px; background-position: 65% center; }
  .public-hero h1 { font-size: 46px; }
  .hero-status { grid-template-columns: 1fr; margin-left: 0; }
  .public-page { width: min(100% - 28px, 1180px); padding: 44px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; background-position: 68% center; }
  .login-panel { min-height: 100dvh; border: 0; padding: 28px; background: rgba(15, 19, 26, .94); }
  .login-aside { display: none; }
  .public-links, .hero-status span { backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce), (update: slow) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .public-links, .hero-status span, .login-aside > div { backdrop-filter: none; }
}
