/* Attentus — shared dark-cosmic styles (landing / sign-in / welcome).
   Evolves the app's #0e1116 + #6ea8fe→#845ef7 palette into a deeper void with
   a nebula + starfield, a single gradient locus (headline + primary CTA), and
   wallux-style hairline restraint. Vanilla CSS, no framework. */

:root {
  /* Backgrounds — darker void than the app's #0e1116 */
  --bg-deep:     #080b11;
  --bg-surface:  #0e1116;
  --bg-elevated: #141925;

  /* Accents (kept from the app) */
  --accent-blue:   #6689FF;
  --accent-violet: #3D5AFE;
  --accent-glow:   rgba(61, 90, 254, .40);
  --gradient:      linear-gradient(135deg, #6689FF 0%, #3D5AFE 100%);

  /* Text */
  --text-primary:   #eff3ff;
  --text-secondary: #aab6d0;
  --text-muted:     #8694b2;

  /* Hairlines & glass */
  --line:          rgba(150, 165, 200, .12);
  --line-strong:   rgba(61, 90, 254, .30);
  --surface-glass: rgba(20, 25, 37, .55);

  /* Type */
  --font-display: "Clash Display", "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body:    "Satoshi", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Geometry / motion */
  --r:      16px;
  --r-lg:   24px;
  --pad:    clamp(20px, 5vw, 48px);
  --maxw:   1100px;
  --ease:   cubic-bezier(.4, 0, .2, 1);
  --shadow: 0 30px 80px -42px rgba(0, 0, 0, .85);
}

* { margin: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
a { color: var(--accent-blue); text-decoration: none; }

/* ── Background motifs (fixed, behind everything) ───────────────────────── */
.nebula {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 22% 16%, rgba(80, 120, 255, .15), transparent 55%),
    radial-gradient(ellipse 70% 60% at 80% 28%, rgba(61, 90, 254, .13), transparent 55%),
    radial-gradient(ellipse 90% 70% at 50% 96%, rgba(61, 90, 254, .07), transparent 55%);
}
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px,  rgba(255, 255, 255, .70), transparent),
    radial-gradient(1px 1px at 90px 40px,  rgba(255, 255, 255, .50), transparent),
    radial-gradient(2px 2px at 200px 60px, rgba(80, 120, 255, .60), transparent),
    radial-gradient(1px 1px at 250px 150px, rgba(61, 90, 254, .60), transparent),
    radial-gradient(1.5px 1.5px at 320px 110px, rgba(255, 255, 255, .45), transparent);
  background-size: 340px 200px;
  animation: twinkle 8s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .40; } to { opacity: .80; } }

/* ── Glowing white card rim (shared auth / welcome theme) ───────────────────
   A slowly rotating conic ring of white light + a soft white halo behind the
   card. @property lets the angle animate smoothly; where unsupported it simply
   renders a static white ring. Matches the sign-in page. */
@property --bd { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes bd-spin { to { --bd: 360deg; } }

.card-shell { position: relative; width: 100%; max-width: 440px; margin: 0 auto; }

/* Soft white aura blooming behind the card */
.card-shell::before {
  content: ""; position: absolute; inset: -8px; border-radius: calc(var(--r-lg) + 10px);
  z-index: 0; pointer-events: none; transform: translateZ(0);
  background: conic-gradient(from var(--bd),
    rgba(255,255,255,.10) 0deg, rgba(210,225,255,.55) 60deg, rgba(255,255,255,.18) 130deg,
    rgba(190,215,255,.45) 210deg, rgba(255,255,255,.12) 290deg, rgba(210,225,255,.55) 360deg);
  filter: blur(22px); opacity: .55;
  animation: bd-spin 8s linear infinite;
}
.card-shell::after { content: none; }

.card { position: relative; z-index: 1; }
/* Crisp rotating white border line on the card edge */
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px;
  background: conic-gradient(from var(--bd),
    rgba(255,255,255,.35) 0deg, rgba(255,255,255,.95) 60deg, rgba(200,220,255,.45) 140deg,
    rgba(255,255,255,.90) 220deg, rgba(255,255,255,.35) 300deg, rgba(255,255,255,.95) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 6px rgba(180,205,255,.55));
  animation: bd-spin 8s linear infinite; pointer-events: none; z-index: 3;
}
/* Glass sheen across the top of the card */
.card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 48%;
  border-radius: var(--r-lg) var(--r-lg) 60% 60%;
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.012) 50%, transparent 100%);
  pointer-events: none; z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .card::before, .card-shell::before { animation: none !important; }
}

/* Shared button shimmer/sweep keyframes */
@keyframes btnShimmer { 0%, 100% { background-position: 0% center; } 50% { background-position: 100% center; } }
@keyframes btnSweep   { 0%, 40% { left: -100%; } 55% { left: 140%; } 100% { left: 140%; } }

/* ── Top-right corner nav (homepage / pricing) ──────────────────────────── */
.topnav { position: fixed; top: 20px; right: 22px; z-index: 5;
          display: flex; align-items: center; gap: 10px;
          animation: fadeInUp .8s var(--ease) .2s both; }
.topnav .btn-ghost { padding: 9px 20px; font-size: .9rem; }

/* ── Hero / layout ──────────────────────────────────────────────────────── */
.wrap { position: relative; z-index: 1; width: 100%; max-width: var(--maxw);
        padding: var(--pad); text-align: center; }

.eyebrow {
  display: inline-block; font-family: var(--font-display);
  font-size: .8rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .18em; color: var(--accent-blue); margin-bottom: 22px;
  animation: fadeInUp .8s var(--ease) .05s both;
}

.title {
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(3.5rem, 11vw, 6rem); letter-spacing: -.035em; margin-bottom: 18px;
  background: var(--gradient); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite, fadeInUp .8s var(--ease) .15s both;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; }
}

.tagline {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 500;
  color: var(--text-secondary); letter-spacing: .02em; margin-bottom: 14px;
  animation: fadeInUp .8s var(--ease) .30s both;
}
.lede {
  font-size: 1.05rem; line-height: 1.7; color: var(--text-muted);
  max-width: 520px; margin: 0 auto 34px; animation: fadeInUp .8s var(--ease) .40s both;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
           animation: fadeInUp .8s var(--ease) .50s both; }

.btn-primary {
  position: relative; overflow: hidden; isolation: isolate;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 14px 32px; border-radius: 999px; color: #fff; border: 0; cursor: pointer;
  background: linear-gradient(100deg,
    #4f8bff 0%, #5a6cff 24%, #7d5cff 46%, #9a5cff 60%, #5a6cff 80%, #4f8bff 100%);
  background-size: 280% auto;
  animation: btnShimmer 4.5s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(190,205,255,.40),
    0 6px 22px -4px rgba(110,90,255,.70),
    0 16px 46px -8px rgba(130,100,255,.50),
    0 0 40px -6px rgba(120,110,255,.45),
    inset 0 1.5px 0 rgba(255,255,255,.55),
    inset 0 -10px 22px -10px rgba(0,0,0,.35);
  transition: transform .15s var(--ease), filter .15s var(--ease), box-shadow .15s var(--ease);
}
/* Glossy glass sheen across the top half */
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 55%;
  border-radius: inherit; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.08) 55%, transparent 100%);
}
.btn-primary:hover {
  transform: translateY(-2px); filter: brightness(1.1) saturate(1.08);
  box-shadow:
    0 0 0 1px rgba(210,220,255,.55),
    0 10px 30px -4px rgba(120,95,255,.88),
    0 24px 56px -8px rgba(135,105,255,.62),
    0 0 54px -6px rgba(125,110,255,.55),
    inset 0 1.5px 0 rgba(255,255,255,.60),
    inset 0 -10px 22px -10px rgba(0,0,0,.30);
}

.btn-ghost {
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px; color: var(--text-secondary);
  border: 1px solid var(--line); background: var(--surface-glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--line-strong); }

.req { margin-top: 22px; font-size: .85rem; color: var(--text-muted); opacity: .7;
       animation: fadeInUp .8s var(--ease) .60s both; }

/* ── Glass card (sign-in / welcome) ─────────────────────────────────────── */
.card {
  position: relative; z-index: 1; width: 100%;
  padding: 42px clamp(24px, 5vw, 40px);
  /* Deep near-black blue: a faint blue glow at the top fading into near-black,
     so the white rim + halo read as light against it. */
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(28,40,86,.55) 0%, transparent 60%),
    linear-gradient(180deg, rgba(8,11,24,.94), rgba(4,6,15,.97));
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,.30),
    inset 0 0 90px rgba(40,60,140,.10),
    0 40px 90px rgba(0,0,0,.82),
    0 12px 32px rgba(0,0,0,.60);
  animation: fadeInUp .7s var(--ease) both;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display);
         font-weight: 700; letter-spacing: -.01em; font-size: 1.1rem; margin-bottom: 6px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gradient);
              box-shadow: 0 0 18px 2px var(--accent-glow); }
.card h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
           letter-spacing: -.02em; margin: 14px 0 6px; }
.card p.sub { color: var(--text-muted); font-size: .95rem; line-height: 1.6; margin-bottom: 22px; }

/* status / spinner */
.status { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 14px 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%;
           border: 3px solid var(--line); border-top-color: var(--accent-violet);
           animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.check { width: 52px; height: 52px; border-radius: 50%; background: var(--gradient);
         display: grid; place-items: center; color: #fff; font-size: 26px;
         box-shadow: 0 8px 28px var(--accent-glow); }

footer { position: relative; z-index: 1; margin-top: 40px; color: var(--text-muted);
         font-size: .8rem; opacity: .75; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
