@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg-deep: #071018;
  --bg-mid: #0c1a24;
  --ink: #f2f7fa;
  --muted: #a8c0cc;
  --line: rgba(180, 220, 230, 0.18);
  --accent: #2ec4b6;
  --accent-2: #f0a202;
  --accent-soft: rgba(46, 196, 182, 0.16);
  --panel: rgba(12, 28, 38, 0.72);
  --panel-solid: #102533;
  --danger: #ff6b6b;
  --ok: #3ddc97;
  --radius: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: 'Syne', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(46, 196, 182, 0.18), transparent 55%),
    radial-gradient(900px 600px at 95% 8%, rgba(240, 162, 2, 0.12), transparent 50%),
    radial-gradient(700px 500px at 50% 110%, rgba(46, 120, 180, 0.16), transparent 60%),
    linear-gradient(165deg, var(--bg-deep), var(--bg-mid) 45%, #08141c);
  background-attachment: fixed;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 28% 62%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 48% 28%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 72% 44%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 88% 16%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 64% 78%, rgba(255, 255, 255, 0.28), transparent),
    radial-gradient(1px 1px at 18% 88%, rgba(255, 255, 255, 0.25), transparent);
  opacity: 0.7;
  animation: drift 28s linear infinite;
  z-index: 0;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-28px); }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
}

.site {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  animation: rise 0.55s ease both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 12px;
  background:
    conic-gradient(from 210deg, var(--accent), var(--accent-2), var(--accent));
  position: relative;
  box-shadow: 0 0 24px rgba(46, 196, 182, 0.35);
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  background: var(--bg-deep);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
  background: var(--accent-soft);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  gap: 1.5rem 2rem;
  align-items: center;
  min-height: min(62vh, 560px);
  padding: 1.5rem 0 0.5rem;
  animation: rise 0.7s ease 0.08s both;
}

.hero-copy {
  max-width: 680px;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 10vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  background: linear-gradient(120deg, #f7fbff 10%, var(--accent) 55%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.hero p,
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1aa896);
  color: #04201c;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: rgba(46, 196, 182, 0.45);
  background: var(--accent-soft);
}

.btn-amber {
  background: linear-gradient(135deg, var(--accent-2), #d48900);
  color: #1a1200;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 20, 28, 0.55);
  color: var(--muted);
  font-size: 0.85rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.online {
  background: var(--ok);
  animation: pulse-dot 2s ease infinite;
}

.status-dot.offline {
  background: var(--danger);
}

.orbit {
  position: relative;
  height: 260px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  animation: rise 0.8s ease 0.16s both;
}

.orbit-ring {
  position: absolute;
  inset: 10% 18%;
  border: 1px solid rgba(46, 196, 182, 0.28);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.orbit-ring::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-2);
  top: -6px;
  left: 50%;
  box-shadow: 0 0 18px rgba(240, 162, 2, 0.7);
}

.orbit-core {
  position: absolute;
  inset: 32% 40%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #dff9f5, var(--accent) 45%, #0b3d38 100%);
  box-shadow: 0 0 40px rgba(46, 196, 182, 0.45);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.portal-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.5rem;
  animation: rise 0.75s ease 0.22s both;
}

.portal {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.4rem 1.35rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 40, 52, 0.85), rgba(10, 22, 30, 0.9));
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.portal::before {
  content: '';
  position: absolute;
  inset: auto auto -40% -20%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 196, 182, 0.22), transparent 70%);
  transition: transform 0.3s ease;
}

.portal:nth-child(2)::before {
  background: radial-gradient(circle, rgba(240, 162, 2, 0.2), transparent 70%);
}

.portal:nth-child(3)::before {
  background: radial-gradient(circle, rgba(90, 160, 220, 0.22), transparent 70%);
}

.portal:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 196, 182, 0.4);
  box-shadow: var(--shadow);
}

.portal:hover::before {
  transform: scale(1.35);
}

.portal-kicker {
  position: relative;
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.portal h2 {
  position: relative;
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.portal p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-header {
  margin: 0.5rem 0 2rem;
  animation: rise 0.55s ease both;
}

.page-header .eyebrow {
  display: inline-block;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.15rem;
  animation: rise 0.6s ease both;
}

.panel:nth-of-type(2) { animation-delay: 0.06s; }
.panel:nth-of-type(3) { animation-delay: 0.12s; }
.panel:nth-of-type(4) { animation-delay: 0.18s; }

.panel h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.panel p {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

.panel p:last-child {
  margin-bottom: 0;
}

.stack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.stack-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.stack-list li::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(46, 196, 182, 0.6);
}

.timeline {
  display: grid;
  gap: 0.9rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: start;
}

.timeline-item strong {
  color: var(--accent-2);
  font-size: 0.9rem;
}

.tools-layout {
  display: grid;
  gap: 1rem;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
  animation: rise 0.5s ease both;
}

.tool-tab {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tool-tab:hover {
  color: var(--ink);
  border-color: rgba(46, 196, 182, 0.35);
}

.tool-tab.is-active {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: rgba(46, 196, 182, 0.45);
}

.tool-pane[hidden] {
  display: none !important;
}

.tool-pane.is-active {
  display: block;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 14, 20, 0.65);
  color: var(--ink);
  padding: 0.8rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.9rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(46, 196, 182, 0.55);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.15);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.output {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(5, 14, 20, 0.7);
  border: 1px dashed rgba(46, 196, 182, 0.28);
  color: var(--ink);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 3rem;
}

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

.meta-item {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.meta-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.meta-item strong {
  font-size: 1rem;
  font-weight: 600;
}

.donate-layout {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}

.qr-stage {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(18, 42, 54, 0.9), rgba(10, 22, 30, 0.95));
  animation: rise 0.6s ease both;
}

.qr-stage img {
  width: min(260px, 100%);
  height: auto;
  border-radius: 18px;
  background: #fff;
  padding: 0.65rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.qr-stage p {
  margin: 1rem 0 0;
  color: var(--muted);
}

.amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 1rem;
}

.amount-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.amount-chip:hover,
.amount-chip.is-active {
  background: rgba(240, 162, 2, 0.16);
  border-color: rgba(240, 162, 2, 0.5);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  background: #143040;
  color: var(--ink);
  border: 1px solid rgba(46, 196, 182, 0.35);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 50;
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  animation: rise 0.7s ease 0.25s both;
}

@media (max-width: 860px) {
  .portal-grid,
  .donate-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .orbit {
    height: 180px;
    max-width: 240px;
    order: -1;
  }
}

@media (max-width: 640px) {
  .site {
    width: min(100% - 1.25rem, 1080px);
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
