:root {
  --bg-ink: #050a17;
  --panel-bg: rgba(9, 20, 48, 0.86);
  --panel-border: rgba(95, 129, 203, 0.26);
  --brand-panel: rgba(8, 25, 63, 0.84);
  --chip-bg: rgba(10, 24, 56, 0.72);
  --chip-border: rgba(94, 126, 191, 0.34);
  --text-main: #e8f0ff;
  --text-sub: #a6b5d8;
  --action: #2f68ea;
  --action-hover: #255ad4;
  --shadow-soft: 0 24px 56px rgba(2, 6, 22, 0.46);
  --safe-top: max(20px, env(safe-area-inset-top));
  --safe-bottom: max(20px, env(safe-area-inset-bottom));
  --startup-overlay-top: rgba(3, 9, 24, 0.86);
  --startup-overlay-bottom: rgba(3, 11, 33, 0.96);
  --startup-card-border: rgba(145, 170, 228, 0.38);
  --startup-glow: rgba(74, 129, 240, 0.36);
  --startup-ring: rgba(136, 169, 233, 0.42);
  --startup-fade-ms: 280ms;
  --startup-rise-ms: 320ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg-ink);
  color: var(--text-main);
  font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/austin_map.jpg") center center / cover no-repeat;
  filter: grayscale(0.34) contrast(1.05) brightness(0.56);
  transform: scale(1.04);
  z-index: -3;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(96% 46% at 50% 0%, rgba(43, 98, 228, 0.37), transparent 58%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.26), rgba(3, 8, 22, 0.78) 44%, rgba(3, 7, 18, 0.9));
  z-index: -2;
}

.startup-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 92% at 50% 8%, rgba(73, 128, 238, 0.24), transparent 58%),
    linear-gradient(180deg, var(--startup-overlay-top), var(--startup-overlay-bottom));
  backdrop-filter: blur(12px);
  opacity: 1;
  visibility: visible;
  transition: opacity var(--startup-fade-ms) ease, visibility var(--startup-fade-ms) ease;
}

.startup-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.startup-card {
  width: min(420px, 92vw);
  border-radius: 24px;
  border: 1px solid var(--startup-card-border);
  background: linear-gradient(145deg, rgba(9, 24, 62, 0.86), rgba(7, 18, 47, 0.84));
  box-shadow:
    0 30px 64px rgba(2, 8, 28, 0.54),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: clamp(24px, 4vw, 36px);
  text-align: center;
  animation: startupFloat 560ms ease both;
}

.startup-logo-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  position: relative;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(120, 158, 236, 0.28), rgba(11, 24, 58, 0.84));
  box-shadow: 0 14px 34px rgba(3, 10, 32, 0.5);
  overflow: hidden;
}

.startup-ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid var(--startup-ring);
  animation: startupRingPulse 1.8s ease-in-out infinite;
}

.startup-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 0 24px var(--startup-glow);
  animation: startupLogoPulse 1.5s ease-in-out infinite;
}

.startup-title {
  margin: 0;
  color: #edf3ff;
  font-size: clamp(30px, 6vw, 40px);
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
}

.startup-subtitle {
  margin: 10px 0 0;
  color: #b8c7ea;
  font-size: clamp(14px, 2.8vw, 18px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

body.is-startup-gated .hero-shell {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
}

body.is-startup-ready .hero-shell {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--startup-rise-ms) ease, transform var(--startup-rise-ms) ease;
}

.hero-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--safe-top) 20px var(--safe-bottom);
  gap: 14px;
  position: relative;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}

.brand-pill {
  width: min(380px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(106, 134, 198, 0.26);
  background: linear-gradient(135deg, rgba(8, 31, 85, 0.9), rgba(8, 22, 54, 0.82));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  padding: clamp(14px, 2.2vw, 20px);
  margin-top: clamp(10px, 4.8vh, 64px);
  animation: riseIn 0.68s 0.1s ease both;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-icon {
  width: clamp(38px, 7.2vw, 56px);
  height: clamp(38px, 7.2vw, 56px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(98, 126, 182, 0.44);
  background: rgba(5, 12, 35, 0.72);
  box-shadow: 0 12px 24px rgba(2, 8, 27, 0.5);
  flex: 0 0 auto;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-wordmark {
  letter-spacing: 0.24em;
  font-size: clamp(28px, 5.6vw, 48px);
  font-weight: 700;
  line-height: 1;
  color: #e8f0ff;
  text-shadow: 0 8px 20px rgba(7, 16, 42, 0.42);
}

.brand-tagline {
  margin: 8px 0 0;
  text-align: center;
  color: var(--text-sub);
  font-size: clamp(14px, 2.3vw, 22px);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.auth-panel {
  width: min(560px, 100%);
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(9, 22, 55, 0.86), rgba(8, 19, 47, 0.9));
  box-shadow: 0 30px 68px rgba(2, 6, 22, 0.5);
  backdrop-filter: blur(12px);
  padding: clamp(18px, 3vw, 28px);
  margin-top: clamp(32px, 9vh, 120px);
  animation: riseIn 0.76s 0.14s ease both;
}

.panel-rule,
.panel-divider {
  height: 1px;
  width: min(100%, 560px);
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(111, 141, 203, 0.48), transparent);
}

.panel-rule {
  margin-bottom: 18px;
}

.panel-kicker {
  margin: 0 0 12px;
  text-align: center;
  color: #9cb5ec;
  font-size: clamp(12px, 1.6vw, 15px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flow-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.flow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(132, 160, 225, 0.3);
  background: rgba(12, 28, 68, 0.62);
  color: #c4d7ff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  letter-spacing: 0.02em;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 16px;
  color: #f5f8ff;
  font-family: "Manrope", "Outfit", sans-serif;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.panel-links a:focus-visible,
.signal-chip-link:focus-visible,
.modal-close:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(143, 177, 251, 0.98);
  outline-offset: 2px;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.cta-btn {
  background: linear-gradient(135deg, var(--action), #3b79ff);
  font-size: clamp(16px, 3.8vw, 30px);
  letter-spacing: 0.01em;
  padding: clamp(14px, 2.9vw, 20px) 18px;
  box-shadow: 0 15px 36px rgba(36, 91, 219, 0.38);
  animation: pulseGlow 2.2s ease-in-out infinite;
}

.cta-btn:hover {
  background: linear-gradient(135deg, var(--action-hover), #2f6ded);
  box-shadow: 0 18px 40px rgba(33, 87, 210, 0.43);
}

.oauth-btn {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(243, 246, 255, 0.2), rgba(209, 221, 255, 0.16));
  border: 1px solid rgba(186, 205, 255, 0.45);
  color: #f5f8ff;
  font-size: clamp(14px, 2.6vw, 20px);
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: clamp(12px, 2.4vw, 16px) 18px;
  box-shadow: 0 10px 26px rgba(8, 20, 54, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.oauth-btn:hover {
  background: linear-gradient(135deg, rgba(243, 246, 255, 0.28), rgba(209, 221, 255, 0.22));
}

.oauth-google-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, #ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
  box-shadow: inset 0 0 0 2px rgba(7, 17, 44, 0.75);
}

.oauth-apple-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(214, 226, 252, 0.55);
  background: linear-gradient(135deg, rgba(235, 242, 255, 0.38), rgba(187, 205, 245, 0.25));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(8, 20, 50, 0.4);
}

.oauth-apple-mark svg {
  width: 11px;
  height: 11px;
  fill: #f5f8ff;
  opacity: 0.95;
}

.panel-copy {
  margin: 14px auto 0;
  text-align: center;
  color: #c5d3f4;
  line-height: 1.42;
  font-size: clamp(14px, 2.2vw, 20px);
  max-width: 640px;
  font-weight: 500;
}

.install-prompt-card {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(108, 139, 204, 0.44);
  background: linear-gradient(145deg, rgba(17, 35, 82, 0.82), rgba(12, 25, 62, 0.86));
  padding: 12px;
  display: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.install-prompt-card.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.install-prompt-copy {
  margin: 0;
  color: #d4e2ff;
  font-size: clamp(13px, 2vw, 16px);
  line-height: 1.35;
  text-align: center;
}

.install-prompt-link {
  margin-top: 8px;
  display: inline-flex;
  justify-content: center;
  width: 100%;
  color: #8ec5ff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.install-prompt-link:hover {
  color: #b4d8ff;
}

.install-prompt-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.install-prompt-action {
  border: 1px solid rgba(98, 128, 194, 0.5);
  border-radius: 999px;
  background: rgba(20, 43, 99, 0.7);
  color: #e8f1ff;
  font-weight: 700;
  font-size: 12px;
  padding: 7px 11px;
  cursor: pointer;
}

.install-prompt-action-subtle {
  background: rgba(11, 23, 56, 0.6);
  color: #bcc9e7;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.signal-chip {
  border-radius: 16px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: #d8e2fb;
  padding: 11px 12px;
  font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.signal-chip-wide {
  grid-column: 1 / -1;
}

.signal-chip-link {
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.signal-chip-link:hover {
  transform: translateY(-1px);
  border-color: rgba(128, 161, 236, 0.62);
  box-shadow: 0 12px 26px rgba(35, 84, 198, 0.32);
}

.signal-chip-pop {
  background: linear-gradient(135deg, rgba(43, 100, 232, 0.38), rgba(18, 46, 112, 0.66));
  border-color: rgba(124, 158, 234, 0.58);
  font-weight: 700;
  color: #edf4ff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.signal-chip-pop::after {
  content: "";
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: 0;
  width: 42%;
  transform: translateX(-180%) skewX(-20deg);
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(235, 242, 255, 0.14) 35%,
      rgba(248, 250, 255, 0.62) 50%,
      rgba(235, 242, 255, 0.16) 65%,
      rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  animation: chipShimmer 4s ease-in-out infinite;
}

.signal-chip .chip-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9ec0ff;
  flex: 0 0 auto;
}

.panel-links {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 12px;
}

.panel-links a {
  color: #aab9dc;
  text-decoration: none;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 500;
  transition: color 0.18s ease;
}

.panel-links a:hover {
  color: #dce7ff;
}

.status {
  margin-top: 0;
  text-align: center;
  color: #95a5ce;
  font-size: clamp(13px, 1.5vw, 17px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  animation: riseIn 0.92s 0.2s ease both;
  min-height: 1.4em;
  max-width: min(92vw, 680px);
}

.landing-legal {
  margin-top: 6px;
  text-align: center;
  color: #8ea0c7;
  font-size: clamp(11px, 1.3vw, 14px);
  line-height: 1.4;
  animation: riseIn 1s 0.24s ease both;
}

.landing-legal p {
  margin: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal {
  width: min(440px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(124, 145, 198, 0.28);
  background: #0d1631;
  box-shadow: 0 28px 54px rgba(2, 6, 23, 0.56);
  padding: 18px;
  font-family: "Outfit", "Avenir Next", sans-serif;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-title {
  margin: 0;
  font-size: 18px;
  color: #e5e7eb;
}

.modal-close {
  border: 1px solid rgba(124, 145, 198, 0.35);
  background: rgba(19, 35, 82, 0.76);
  color: #cfe0ff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
}

.modal-label {
  color: #9ca3af;
  font-size: 13px;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #39507f;
  background: #0f1b3f;
  color: #e5edff;
  font-size: 16px;
  margin-top: 6px;
}

.modal-btn {
  margin-top: 12px;
  background: linear-gradient(135deg, #2f68ea, #3b79ff);
  font-size: 17px;
  letter-spacing: 0.01em;
  padding: 12px 16px;
  box-shadow: 0 12px 24px rgba(36, 91, 219, 0.28);
}

.modal-btn:hover {
  background: linear-gradient(135deg, #255ad4, #326fee);
}

.code-section {
  display: none;
  margin-top: 16px;
}

.turnstile-wrap {
  display: none;
  margin-top: 12px;
}

.modal-hint {
  margin: 10px 0 0;
  color: #8ea4d7;
  font-size: 13px;
  line-height: 1.35;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes startupFloat {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes startupLogoPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 24px var(--startup-glow);
  }

  50% {
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(103, 152, 250, 0.5);
  }
}

@keyframes startupRingPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 15px 36px rgba(36, 91, 219, 0.38);
  }

  50% {
    box-shadow: 0 20px 46px rgba(50, 113, 255, 0.46);
  }
}

@keyframes chipShimmer {
  0% {
    transform: translateX(-180%) skewX(-20deg);
  }

  34%,
  100% {
    transform: translateX(320%) skewX(-20deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .startup-card,
  .startup-logo,
  .startup-ring {
    animation: none;
  }

  .startup-overlay,
  body.is-startup-ready .hero-shell {
    transition: none;
  }

  .signal-chip-pop::after {
    animation: none;
  }
}

@media (max-width: 720px) {
  .install-prompt-card.is-visible {
    display: block;
  }
}

@media (min-width: 721px) {
  .install-prompt-card {
    display: none !important;
  }
}

@media (min-width: 761px) {
  .hero-shell {
    justify-content: flex-start;
    padding-top: max(22px, env(safe-area-inset-top));
  }

  .brand-pill {
    margin-top: clamp(20px, 6vh, 72px);
  }
}

@media (max-width: 760px) {
  .hero-shell {
    gap: 12px;
  }

  .brand-wordmark {
    letter-spacing: 0.21em;
  }

  .brand-pill {
    width: min(360px, 100%);
    margin-top: clamp(8px, 4vh, 38px);
  }

  .auth-panel {
    width: min(520px, 100%);
    border-radius: 20px;
    margin-top: clamp(24px, 8vh, 100px);
  }

  .signal-row {
    grid-template-columns: 1fr;
  }

  .panel-links {
    gap: 12px 18px;
  }
}

@media (max-width: 420px) {
  .hero-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .auth-panel {
    padding: 16px;
  }

  .flow-row {
    gap: 6px;
  }

  .flow-pill {
    font-size: 11px;
    padding: 5px 9px;
  }
}
