/* AnonWare landing — mirrors the app's "Midnight" theme.
   Tokens copied from client/lib/theme_settings.dart (dark). */
:root {
  --background: #161616;
  --surface: #1f1f1f;
  --surface-alt: #272727;
  --surface-high: #323232;
  --border: #353535;
  --divider: #2e2e2e;
  --text: #f5f5f5;
  --text-dim: #b0b0b0;
  --text-muted: #7e7e7e;
  --accent: #00f782;
  --accent-dim: #00c167;
  --on-accent: #052b17;
  --radius-btn: 28px;
  --radius-card: 16px;
  --maxw: 920px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ambient neon-green glow behind the hero. */
.glow {
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 1100px;
  height: 80vh;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
              rgba(0, 247, 130, 0.16) 0%,
              rgba(0, 247, 130, 0.05) 35%,
              transparent 70%);
  filter: blur(8px);
  z-index: 0;
}

/* Faint grid texture. */
.grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 75%);
  z-index: 0;
}

/* ---- top bar ---- */
.topbar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); object-fit: cover; background: var(--surface);
}
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a { color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .15s; }
.topnav a:hover { color: var(--text); }
.topnav .topnav-cta { color: var(--accent); font-weight: 600; }

/* ---- hero ---- */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 4vh 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 0 auto;
  justify-content: center;
}

.logo-wrap {
  width: 132px; height: 132px;
  border-radius: 34px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: 0 0 0 6px rgba(0, 247, 130, 0.06), 0 24px 60px rgba(0, 0, 0, 0.55);
  margin-bottom: 26px;
}
.logo { width: 100%; height: 100%; object-fit: cover; }

.title {
  font-size: clamp(40px, 8vw, 60px);
  font-weight: 700;
  letter-spacing: -1.2px;
  margin: 0 0 6px;
  line-height: 1.02;
}
.tagline {
  font-size: clamp(16px, 2.6vw, 19px);
  color: var(--text-dim);
  margin: 0 0 22px;
  line-height: 1.45;
}
.intro {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin: 0 0 34px;
}

/* ---- buttons ---- */
.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 460px;
}
.btn {
  flex: 1 1 200px;
  min-height: 56px;
  padding: 0 26px;
  border-radius: var(--radius-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  border: 1.4px solid transparent;
  transition: transform .12s ease, background .15s, border-color .15s, box-shadow .15s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-icon { font-size: 13px; line-height: 1; opacity: .9; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 30px rgba(0, 247, 130, 0.22);
}
.btn-primary:hover { background: var(--accent-dim); box-shadow: 0 12px 36px rgba(0, 247, 130, 0.3); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); border-color: #4a4a4a; }

/* ---- other platforms ---- */
.other-link {
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color .15s;
}
.other-link:hover { color: var(--text-dim); }

.platform-menu {
  margin-top: 10px;
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.platform-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--divider);
  transition: background .12s;
}
.platform-item:last-child { border-bottom: none; }
.platform-item:hover { background: var(--surface-alt); }
.platform-meta { color: var(--text-muted); font-weight: 500; font-size: 12.5px; }

.reassure {
  margin-top: 30px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---- features ---- */
.features {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 28px 50px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  text-align: left;
}
.feature-icon { font-size: 22px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.feature p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }

/* ---- footer ---- */
.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  padding: 24px 28px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--divider);
  margin-top: auto;
}
.footer a { color: var(--text-dim); text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer .dot { opacity: .5; }

/* ---- web-app security warning modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: ww-fade .18s ease;
}
.modal-overlay[hidden] { display: none; }

@keyframes ww-fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: ww-rise .2s ease;
}
@keyframes ww-rise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-badge {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 26px;
  color: var(--warn, #ffb454);
  background: rgba(255, 180, 84, 0.12);
  border: 1px solid rgba(255, 180, 84, 0.3);
  margin-bottom: 16px;
}
.modal-title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.modal-body {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.modal-body strong { color: var(--text); }

.modal-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 22px;
  cursor: pointer;
  user-select: none;
}
.modal-check input {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.modal-actions .btn {
  flex: 1 1 160px;
  min-height: 50px;
  font-size: 14.5px;
}

.modal-dismiss {
  position: absolute;
  top: 14px; right: 16px;
  width: 32px; height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.modal-dismiss:hover { color: var(--text); background: var(--surface-alt); }

@media (max-width: 720px) {
  .topnav a:not(.topnav-cta) { display: none; }
  .features { grid-template-columns: 1fr; }
  .actions { max-width: 360px; }
  .btn { flex: 1 1 100%; }
}
