:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #02050b;
  color: #e6eef8;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(52, 94, 186, 0.18), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(99, 76, 191, 0.1), transparent 22%),
    linear-gradient(180deg, #060910 0%, #03060b 55%, #010308 100%);
}

.flashlight-page {
  position: relative;
  overflow-x: hidden;
}

.flashlight-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background:
    radial-gradient(circle 180px at var(--mx) var(--my), rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.015) 95px, rgba(4, 7, 13, 0.12) 145px, rgba(3, 5, 10, 0.74) 245px, rgba(1, 2, 5, 0.94) 420px),
    linear-gradient(180deg, rgba(1, 2, 5, 0.48), rgba(1, 2, 5, 0.72));
}

.page {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 18px 56px;
  z-index: 1;
}

.page-landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-center {
  align-items: center;
}

.card {
  position: relative;
  background: rgba(10, 14, 22, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 26px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px;
}

.hero,
.hero-panel {
  margin-bottom: 18px;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
  width: 100%;
}

.hero-layout-single {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.hero h1,
.hero-panel h1,
.card h2 {
  margin: 0 0 10px;
}

.hero-panel h1 {
  font-size: clamp(2.35rem, 4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 10ch;
}

.hero-panel-minimal {
  text-align: center;
  padding-block: 56px;
  background: rgba(8, 12, 20, 0.34);
}

.hero-panel-minimal h1 {
  max-width: none;
  margin-bottom: 0;
}

.hero-panel-glyph {
  overflow: hidden;
}

.lead {
  max-width: 60ch;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(169, 194, 239, 0.74);
  font-size: 0.74rem;
}

.muted { color: rgba(199, 212, 237, 0.72); }
.small { font-size: 0.9rem; }

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.grid.two-up {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.three-up {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.app-card {
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-card:hover,
.app-card:focus-visible {
  border-color: rgba(143, 180, 255, 0.24);
  transform: translateY(-1px);
}

.actions,
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 26px;
}

.hero-actions-minimal {
  justify-content: center;
}

.spread { justify-content: space-between; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, #c7dbff 0%, #9cbcff 100%);
  color: #08111f;
  box-shadow: 0 12px 30px rgba(70, 120, 219, 0.2);
}

.button.secondary,
.ghost-button {
  background: rgba(143, 180, 255, 0.06);
  color: rgba(230, 238, 248, 0.86);
  border-color: rgba(143, 180, 255, 0.16);
}

.login-reveal {
  margin-top: 26px;
}

.login-reveal-visible {
  animation: revealFade 220ms ease forwards;
}

@keyframes revealFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glyph-corner {
  position: fixed;
  z-index: 2;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(223, 235, 255, calc(0.015 + var(--reveal, 0) * 0.75));
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  padding: 12px;
  border-radius: 999px;
  cursor: pointer;
  transform: scale(calc(0.95 + var(--reveal, 0) * 0.18));
  filter: blur(calc((1 - var(--reveal, 0)) * 7px));
  text-shadow: 0 0 calc(18px * var(--reveal, 0)) rgba(198, 221, 255, 0.4);
  transition: color 140ms ease, transform 140ms ease, filter 140ms ease, text-shadow 140ms ease;
}

.glyph-corner:hover,
.glyph-corner:focus-visible {
  outline: none;
}

.glyph-top-left { top: 18px; left: 18px; }
.glyph-top-right { top: 18px; right: 18px; }
.glyph-bottom-left { bottom: 18px; left: 18px; }
.glyph-bottom-right { bottom: 18px; right: 18px; }

.glyph-corner.glyph-correct {
  color: rgba(159, 193, 255, 0.95);
}

.glyph-corner.glyph-error {
  color: rgba(255, 145, 145, 0.82);
}

.form-card {
  margin-top: 8px;
}

.request-panel {
  max-width: 860px;
}

.page-request-access {
  align-items: center;
}

.request-shell {
  width: min(100%, 760px);
  margin-inline: auto;
}

.request-shell-flashlight {
  background: rgba(8, 12, 20, 0.44);
}

.request-shell-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.compact-form,
.request-form-standalone {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label span {
  display: block;
  margin-bottom: 6px;
  color: rgba(177, 199, 239, 0.78);
  font-size: 0.88rem;
}

input,
textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 12, 0.58);
  color: inherit;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(143, 180, 255, 0.48);
  box-shadow: 0 0 0 4px rgba(143, 180, 255, 0.08);
  background: rgba(2, 8, 23, 0.74);
}

textarea { resize: vertical; }

.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  margin-top: 2px;
}

.status-line {
  min-height: 1.3em;
  margin: 0;
}

ul {
  padding-left: 20px;
  margin: 0;
}

li + li { margin-top: 8px; }

@media (pointer: coarse) {
  .flashlight-layer {
    background: linear-gradient(180deg, rgba(1, 2, 5, 0.32), rgba(1, 2, 5, 0.56));
  }

  .glyph-corner {
    color: rgba(223, 235, 255, 0.32);
    filter: none;
  }
}

@media (max-width: 840px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page { padding: 20px 14px 40px; }
  .hero-panel h1 { font-size: 2.2rem; }
  .compact-form,
  .request-form-standalone { grid-template-columns: 1fr; }
  .button { width: 100%; }
  .hero-actions { align-items: stretch; }
  .request-shell-head { align-items: stretch; }
  .glyph-top-left { top: 10px; left: 10px; }
  .glyph-top-right { top: 10px; right: 10px; }
  .glyph-bottom-left { bottom: 10px; left: 10px; }
  .glyph-bottom-right { bottom: 10px; right: 10px; }
}
