/* =====================================================
   jsnmalang.net — Under Maintenance  |  style.css
   ===================================================== */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:          #060810;
  --surface:     rgba(255,255,255,0.042);
  --border:      rgba(125,211,252,0.13);
  --text:        #dde6ff;
  --muted:       rgba(210,220,255,0.42);
  --sky:         #7dd3fc;
  --violet:      #a78bfa;
  --grad:        linear-gradient(135deg, var(--sky), var(--violet));
  --card-grad:   linear-gradient(145deg, rgba(125,211,252,0.055), rgba(167,139,250,0.035));
  --radius:      22px;
  --f-head:      'Syne', sans-serif;
  --f-body:      'DM Sans', sans-serif;
}

/* ── Base ── */
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background canvas ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Orbs ── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .2;
  pointer-events: none;
  z-index: 0;
  animation: orbDrift 16s ease-in-out infinite;
}
.orb-1 { width: 480px; height: 480px; background: radial-gradient(#3b82f6,transparent 70%); top: -160px; left: -160px; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(#7c3aed,transparent 70%); bottom: -140px; right: -120px; animation-delay:-7s; }
.orb-3 { width: 280px; height: 280px; background: radial-gradient(#0891b2,transparent 70%); top:50%; left:50%; transform:translate(-50%,-50%); animation-delay:-3.5s; animation-duration:20s; }
@keyframes orbDrift {
  0%,100% { transform: translate(0,0); }
  40%     { transform: translate(20px,-28px); }
  70%     { transform: translate(-14px,18px); }
}
.orb-3 { animation-name: orbDrift3; }
@keyframes orbDrift3 {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50%     { transform: translate(calc(-50% + 12px), calc(-50% - 14px)) scale(1.05); }
}

/* ── Grid overlay ── */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(125,211,252,.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,.032) 1px, transparent 1px);
  background-size: 54px 54px;
  pointer-events: none;
  z-index: 0;
}

/* ── Page wrapper — enables scrolling on tiny screens ── */
.page-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100dvh;          /* dynamic viewport height */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;          /* top/bottom space + side gutter */
  padding-top:  max(40px, env(safe-area-inset-top,  40px));
  padding-bottom: max(40px, env(safe-area-inset-bottom, 40px));
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── Fade-up animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .65s cubic-bezier(.22,.68,0,1.15) forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes fadeUp {
  to { opacity:1; transform:translateY(0); }
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 34px; height: 34px;
  animation: spin 20s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name {
  font-family: var(--f-head);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .07em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Card ── */
.card {
  width: 100%;
  background: var(--card-grad), var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow:
    0 0 0 1px rgba(125,211,252,.06),
    0 20px 56px rgba(0,0,0,.55),
    inset 0 0 70px rgba(99,102,241,.06);
  transition: box-shadow .4s ease;
}
.card:hover {
  box-shadow:
    0 0 0 1px rgba(125,211,252,.12),
    0 26px 68px rgba(0,0,0,.62),
    inset 0 0 90px rgba(99,102,241,.09);
}

/* ── Illustration ── */
.illustration {
  width: 100%;
  max-width: 280px;
}
.net-svg { width:100%; height:auto; overflow:visible; }

/* travelling dots */
.td1 { animation: td1anim 3.2s ease-in-out infinite; }
.td2 { animation: td2anim 4s   ease-in-out infinite; animation-delay:-1.6s; }
@keyframes td1anim {
  0%   { transform: translate(0,0);     opacity:.9; }
  50%  { transform: translate(46px,19px); opacity:1; }
  100% { transform: translate(-46px,-18px); opacity:0; }
}
@keyframes td2anim {
  0%   { transform: translate(0,0);     opacity:.85; }
  50%  { transform: translate(-46px,19px); opacity:1; }
  100% { transform: translate(46px,-18px);  opacity:0; }
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(125,211,252,.07);
  border: 1px solid rgba(125,211,252,.2);
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  font-size: .67rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--sky);
  text-transform: uppercase;
  white-space: nowrap;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sky);
  flex-shrink: 0;
  animation: pulseDot 2s ease-out infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0   rgba(125,211,252,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(125,211,252,0);  }
  100% { box-shadow: 0 0 0 0   rgba(125,211,252,0);  }
}

/* ── Headline ── */
.headline {
  font-family: var(--f-head);
  font-size: clamp(2.2rem, 9vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  letter-spacing: -.02em;
  color: var(--text);
  animation: glowPulse 3.6s ease-in-out infinite;
}
.accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
@keyframes glowPulse {
  0%,100% { filter: drop-shadow(0 0 18px rgba(125,211,252,.18)); }
  50%     { filter: drop-shadow(0 0 34px rgba(125,211,252,.5));  }
}

/* ── Subtext ── */
.subtext {
  font-size: clamp(.85rem, 2.4vw, .96rem);
  font-weight: 300;
  color: var(--muted);
  text-align: center;
  line-height: 1.75;
  max-width: 380px;
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(125,211,252,.28) 35%,
    rgba(167,139,250,.28) 65%,
    transparent);
}

/* ── Progress ── */
.progress-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.prog-label {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.prog-pct {
  font-family: var(--f-head);
  font-weight: 700;
  color: var(--sky);
}
.prog-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
}
.prog-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--grad);
  position: relative;
  z-index: 1;
  transition: width .28s ease;
}
.prog-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,transparent,rgba(125,211,252,.22),transparent);
  animation: shimmer 2.4s linear infinite;
  z-index: 2;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(220%);  }
}

/* ── Return note ── */
.return-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .83rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* ── Footer ── */
.footer {
  font-size: .7rem;
  color: rgba(210,220,255,.22);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Helpers ── */
.desk-only { display: none; }
@media (min-width: 500px) { .desk-only { display: inline; } }

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Tablet / large mobile */
@media (max-width: 540px) {
  .card {
    padding: 28px 22px 26px;
    gap: 16px;
    border-radius: 18px;
  }
  .badge { font-size: .63rem; }
}

/* Small phones */
@media (max-width: 380px) {
  .page-wrapper { padding: 28px 12px; }
  .card { padding: 24px 16px 22px; gap: 14px; border-radius: 16px; }
  .headline { font-size: 2rem; }
  .badge { padding: 4px 10px 4px 8px; }
}

/* Very small / landscape squeeze */
@media (max-height: 580px) {
  .illustration { display: none; }   /* hide SVG to save vertical space */
  .card { gap: 14px; }
}
