:root {
  --bg: #050816;
  --card-bg: rgba(5, 8, 22, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #f5f7ff;
  --muted: #b4bedf;
  --accent: #6ae4ff;
  --accent-2: #ff9a62;
  --shadow: 0 20px 60px rgba(3, 7, 18, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  opacity: 0;
  animation: body-fade 0.8s ease forwards;
}

.gradient-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(106, 228, 255, 0.3), transparent 45%),
              radial-gradient(circle at 80% 0%, rgba(255, 154, 98, 0.3), transparent 55%),
              radial-gradient(circle at 50% 80%, rgba(80, 90, 255, 0.35), transparent 50%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  animation: aurora 18s ease-in-out infinite alternate;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem min(5vw, 40px);
  background: rgba(5, 8, 22, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.top-nav.scrolled {
  background: rgba(5, 8, 22, 0.97);
  box-shadow: 0 18px 35px rgba(5, 8, 22, 0.55);
}

.nav-brand a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 60px;
    right: min(5vw, 40px);
    background: rgba(5, 8, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    display: none;
    min-width: 220px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
}

header {
  position: relative;
  z-index: 1;
  padding: 3rem 0 3rem;
}

.container {
  width: min(1100px, 90vw);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

header h1 {
  font-size: clamp(2.5rem, 5vw, 3.7rem);
  margin: 0 0 1rem;
}

header p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  animation: float-card 9s ease-in-out infinite;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.hero-card:hover::after {
  opacity: 1;
}

.hero-card strong {
  font-size: 2.8rem;
  display: block;
  margin: 0.2rem 0 1rem;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}

.hero-card li::before {
  content: "•";
  color: var(--accent);
  margin-right: 0.5rem;
}

.hero-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15rem;
  color: var(--muted);
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.deck {
  position: relative;
  padding-top: 2.5rem;
}

.deck::before,
.deck::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  z-index: -1;
  transform-origin: top left;
}

.deck::before {
  transform: translate(16px, -16px);
  opacity: 0.5;
}

.deck::after {
  transform: translate(32px, -32px);
  opacity: 0.3;
}

.deck-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.deck-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deck-tab.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--bg);
  box-shadow: 0 12px 25px rgba(106, 228, 255, 0.35);
}

.deck-panels {
  position: relative;
}

.deck-panel {
  display: none;
}

.deck-panel.active {
  display: block;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(25px);
  position: relative;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(5, 8, 22, 0.5);
}

.card h2 {
  margin-top: 0;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--muted);
}

input[type="number"],
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem;
}

.password-toggle-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle-field input {
  width: 100%;
  padding-right: 7.5rem;
}

.password-toggle-field .toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #111;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  box-shadow: none;
  text-transform: none;
}

.password-toggle-field .toggle-password:hover {
  transform: none;
  color: #000;
}

.password-toggle-field .toggle-password:focus {
  outline: none;
  color: #000;
}

.password-toggle-field .toggle-password .show-label {
  pointer-events: none;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(106, 228, 255, 0.2);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

button,
.button {
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--bg);
  border-radius: 999px;
  padding: 0.85rem 1.7rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 25px rgba(106, 228, 255, 0.35);
}

button:hover,
.button:hover {
  transform: translateY(-2px);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  box-shadow: none;
}

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.summary div {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary strong {
  display: block;
  color: var(--muted);
}

.summary span {
  font-size: 1.3rem;
}

.chart-card {
  min-height: 420px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 60vh;
}

.table-wrapper {
  overflow: auto;
  max-height: 400px;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: rgba(8, 15, 35, 0.95);
  backdrop-filter: blur(15px);
  z-index: 5;
  text-align: right;
}

table th:first-child,
table td:first-child {
  text-align: left;
}

table th,
table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

footer {
  padding: 1.5rem 0 3rem;
  text-align: center;
  color: var(--muted);
}

canvas {
  width: 100% !important;
}

.hint {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.hint.subtle {
  color: rgba(180, 190, 223, 0.85);
  font-size: 0.8rem;
}

.hint a,
a[href^="mailto"] {
  color: var(--text);
}

.actions {
  margin-top: 1rem;
}

.landing-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btc-card ul {
  margin-top: 0.5rem;
}

.trio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.trio-grid article {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  border-radius: 14px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.split img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  max-height: 320px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  margin-bottom: 0.6rem;
  padding-left: 1.2rem;
  position: relative;
}

.checklist li::before {
  content: "✔";
  color: var(--accent);
  position: absolute;
  left: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.flash-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  text-align: center;
}

.flash {
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-weight: 600;
  display: inline-block;
}

.flash.success {
  background: rgba(106, 228, 255, 0.15);
  color: var(--text);
}

.flash.error {
  background: rgba(255, 154, 98, 0.2);
  color: var(--text);
}

.legal p {
  line-height: 1.6;
}

@media (max-width: 640px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

.contact-form.narrow { max-width: 320px; margin: 0 auto; }

body.login-page header {
  padding-top: 4rem;
}

body.login-page .hero {
  display: flex;
  justify-content: center;
  text-align: center;
}

body.login-page .hero .card {
  max-width: 520px;
}

body.login-page main {
  display: flex;
  justify-content: center;
}

.login-card {
  max-width: 420px;
  margin: 0 auto 3rem;
  text-align: center;
}

.login-card .contact-form {
  width: 100%;
}

.lightning-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
}

.lightning-page .hero {
  justify-content: center;
}

.lightning-hero .hero-visual,
.split .hero-visual {
  text-align: center;
}

.hero-visual img {
  width: 100%;
  max-width: 270px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.split .hero-visual img {
  max-width: 720px;
}

@media (max-width: 640px) {
  .hero-visual img {
    max-width: 160px;
  }
}

.hero-visual small {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.lightning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.lightning-grid article {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  min-height: 180px;
}

.lightning-grid h3 {
  margin-top: 0;
}

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

@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate3d(-2%, -1%, 0) scale(1.05); opacity: 1; }
  100% { transform: translate3d(2%, 3%, 0) scale(1.08); opacity: 0.95; }
}

@keyframes float-card {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body, .gradient-bg, .hero-card, .card, .reveal {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  body { opacity: 1 !important; }
}

