/* ============================================================
   Encrypt — SecureNote SPA
   Trust-forward secure-vault aesthetic, cosmic-neon dark accent.
   ============================================================ */

:root {
  --bg: #07090f;
  --bg-2: #0b0f1a;
  --ink: #eaf0ff;
  --ink-soft: #9aa6c4;
  --ink-faint: #5e6b8c;
  --line: rgba(140, 160, 220, 0.14);
  --card: rgba(20, 26, 44, 0.72);
  --accent: #6ce0ff;
  --accent-2: #a98bff;
  --accent-3: #5af2c0;
  --danger: #ff7a90;
  --ok: #5af2c0;
  --glow: 0 0 0 1px rgba(108, 224, 255, 0.18), 0 18px 60px -20px rgba(108, 224, 255, 0.35);
  --radius: 22px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #131a30 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 110%, #11182b 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ---------- ambient aurora ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; filter: blur(60px); opacity: 0.55; }
.orb { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 18s ease-in-out infinite; }
.orb-a { width: 46vmax; height: 46vmax; left: -10vmax; top: -14vmax; background: radial-gradient(circle, #1f6dff 0%, transparent 70%); }
.orb-b { width: 40vmax; height: 40vmax; right: -12vmax; top: 8vmax; background: radial-gradient(circle, #8b5cff 0%, transparent 70%); animation-delay: -6s; }
.orb-c { width: 38vmax; height: 38vmax; left: 30vmax; bottom: -18vmax; background: radial-gradient(circle, #00d6a6 0%, transparent 70%); animation-delay: -11s; }
@keyframes drift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(2vmax, 3vmax, 0) scale(1.08); }
}

/* ---------- stage / card ---------- */
.stage {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 520px;
  padding: 32px 22px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px 22px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glow);
  position: relative;
  overflow: hidden;
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(108,224,255,0.45), transparent 40%, transparent 60%, rgba(169,139,255,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.brand-mark {
  color: var(--accent);
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(108,224,255,0.16), rgba(169,139,255,0.10));
  border: 1px solid rgba(108,224,255,0.28);
  box-shadow: inset 0 0 18px rgba(108,224,255,0.12);
}
.brand-name {
  font-weight: 700; font-size: 20px; letter-spacing: 0.2px;
  background: linear-gradient(90deg, #eaf0ff, #bcd6ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- views ---------- */
.view { animation: fade 0.45s ease both; }
.is-hidden { display: none !important; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

.eyebrow { margin: 0; color: var(--ink-soft); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.headline {
  margin: 4px 0 14px;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(95deg, #ffffff 10%, #9fd6ff 55%, #c6b3ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.headline.sm { font-size: clamp(24px, 5.5vw, 30px); }

.lede { margin: 0 0 22px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }
.lede strong { color: var(--ink); font-weight: 600; }

.assurances { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.assurances li { display: flex; align-items: center; gap: 11px; color: var(--ink-soft); font-size: 14px; }
.tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  color: var(--accent-3);
  background: rgba(90, 242, 192, 0.10);
  border: 1px solid rgba(90, 242, 192, 0.28);
}

/* ---------- button ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  border: none; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 650;
  padding: 15px 22px; border-radius: 14px;
  color: #06121a;
  background: linear-gradient(180deg, #7ee7ff, #4cc8ff);
  box-shadow: 0 10px 30px -8px rgba(76, 200, 255, 0.6), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.btn[disabled] { cursor: progress; opacity: 0.92; }

.btn-spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.4px solid rgba(6,18,26,0.35); border-top-color: #06121a;
  display: none; animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.fineprint { margin: 12px 2px 6px; color: var(--ink-faint); font-size: 12.5px; text-align: center; line-height: 1.5; }

/* ---------- state icons ---------- */
.state-icon {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  margin: 4px 0 18px;
}
.state-ok { color: var(--ok); background: rgba(90,242,192,0.10); border: 1px solid rgba(90,242,192,0.3); }
.state-gone { color: var(--danger); background: rgba(255,122,144,0.10); border: 1px solid rgba(255,122,144,0.3); }

/* ---------- footer ---------- */
.card-foot {
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px;
  color: var(--ink-faint); font-size: 12.5px;
}
.card-foot strong { color: var(--ink-soft); font-weight: 600; }
.lock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }

.invalid-note { margin-top: 18px; color: var(--ink-faint); font-size: 13px; text-align: center; }

@media (max-width: 420px) {
  .card { padding: 28px 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .card, .view, .btn-spinner { animation: none !important; }
  .btn { transition: none; }
}
