/* ============================================================
   billyung — premium design system
   ============================================================ */
:root {
  --bg: #08090d;
  --bg-2: #0c0e14;
  --panel: rgba(22, 25, 34, 0.72);
  --panel-solid: #14171f;
  --panel-2: rgba(30, 34, 46, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f7;
  --muted: #9aa3b2;
  --faint: #6b7280;
  --brand: #7c8cff;
  --brand-2: #a874ff;
  --brand-3: #4dd0ff;
  --green: #37d99a;
  --red: #ff6b7d;
  --yellow: #ffc34d;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 8px 30px -6px rgba(124, 140, 255, 0.45);
  --grad: linear-gradient(120deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(124, 140, 255, 0.18), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(168, 116, 255, 0.14), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(77, 208, 255, 0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: #a6b2ff; }

h1, h2, h3 { letter-spacing: -0.025em; font-weight: 750; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px; max-width: 1140px; margin: 0 auto;
  position: relative; z-index: 5;
}
.logo { font-weight: 850; font-size: 21px; letter-spacing: -0.04em; display: inline-flex; align-items: center; gap: 8px; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); box-shadow: var(--shadow-glow); }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  --pad-y: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) 18px; border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text); font-weight: 650; font-size: 14px; font-family: inherit;
  cursor: pointer; transition: transform 0.12s ease, border-color 0.15s, background 0.15s, box-shadow 0.2s;
  text-decoration: none; white-space: nowrap; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.btn:hover { border-color: var(--brand); background: rgba(124, 140, 255, 0.08); color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 12px 34px -6px rgba(124, 140, 255, 0.6); }
.btn-danger { color: var(--red); border-color: rgba(255, 107, 125, 0.28); background: rgba(255, 107, 125, 0.06); }
.btn-danger:hover { border-color: var(--red); background: rgba(255, 107, 125, 0.12); color: var(--red); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: var(--border); }

/* ---------- hero ---------- */
.hero { max-width: 860px; margin: 70px auto 30px; padding: 0 26px; text-align: center; position: relative; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px;
  padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(55,217,154,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(55,217,154,.5)} 70%{box-shadow:0 0 0 8px rgba(55,217,154,0)} 100%{box-shadow:0 0 0 0 rgba(55,217,154,0)} }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.04; margin: 0 0 20px; font-weight: 820; }
.hero p { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); margin: 0 auto 32px; max-width: 600px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn { padding: 14px 24px; font-size: 15px; }

/* dashboard preview mock */
.preview {
  max-width: 940px; margin: 60px auto 0; padding: 0 26px; position: relative; z-index: 2;
}
.preview-frame {
  border: 1px solid var(--border-strong); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: 0 40px 120px -30px rgba(0,0,0,0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.preview-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.preview-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c3140; display: block; }
.preview-body { padding: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------- features ---------- */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
  max-width: 1000px; margin: 70px auto; padding: 0 26px; position: relative; z-index: 2;
}
.feature {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: left; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform 0.15s, border-color 0.15s;
}
.feature:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.feature .ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 21px;
  background: rgba(124,140,255,0.12); border: 1px solid rgba(124,140,255,0.2); margin-bottom: 14px;
}
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 30px; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 8vh auto; padding: 0 22px; position: relative; z-index: 2; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.card h1 { margin: 0 0 6px; font-size: 26px; }
.card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 15px 0 7px; font-weight: 550; }
input, textarea, select {
  width: 100%; padding: 12px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: rgba(8, 9, 13, 0.5); color: var(--text);
  font-size: 14px; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,140,255,0.16); }
textarea { resize: vertical; min-height: 82px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa3b2' d='M6 8L2 4h8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.form-actions { margin-top: 22px; }
.form-actions .btn { width: 100%; padding: 13px; }
.alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.msg { margin-top: 14px; padding: 11px 13px; border-radius: var(--radius-sm); font-size: 14px; display: none; }
.msg.error { display: block; background: rgba(255,107,125,0.1); color: var(--red); border: 1px solid rgba(255,107,125,0.25); }
.msg.ok { display: block; background: rgba(55,217,154,0.1); color: var(--green); border: 1px solid rgba(55,217,154,0.25); }

/* ---------- dashboard ---------- */
.dash { max-width: 1140px; margin: 0 auto; padding: 8px 26px 70px; position: relative; z-index: 2; }
.section {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; margin-bottom: 22px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.section h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.section h2 .ic { font-size: 20px; }
.section .hint { color: var(--muted); font-size: 13px; margin: 6px 0 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1; min-width: 130px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
th { color: var(--faint); font-weight: 650; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
td .mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.table-wrap { overflow-x: auto; margin: 0 -6px; }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.pill.paid, .pill.on { background: rgba(55,217,154,0.12); color: var(--green); }
.pill.pending { background: rgba(255,195,77,0.12); color: var(--yellow); }
.pill.failed { background: rgba(255,107,125,0.12); color: var(--red); }
.pill.off, .pill.capped { background: rgba(255,255,255,0.06); color: var(--muted); }
.pill.capped { color: var(--yellow); background: rgba(255,195,77,0.10); }
.empty { color: var(--muted); font-size: 14px; padding: 18px 0; text-align: center; }
.copy-link { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--brand); font-size: 13px; font-weight: 600; }
.copy-link:hover { color: #a6b2ff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat {
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px;
}
.stat .n { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat .n.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.inline-input { width: 68px; padding: 7px 8px; font-size: 13px; }
.inline-input.cap { width: 84px; }
.mini-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.seg button { background: transparent; border: none; color: var(--muted); padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.seg button.active { background: var(--grad); color: #fff; }
.acct-label { font-weight: 650; }
.acct-email { color: var(--muted); font-size: 12px; }
.progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; margin-top: 5px; min-width: 90px; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }

/* ---------- checkout / product / success ---------- */
.checkout-body { display: flex; align-items: center; justify-content: center; padding: 26px; min-height: 100vh; }
.product-card {
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: 22px;
  padding: 38px; max-width: 440px; width: 100%; text-align: center;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 30px 90px -25px rgba(0,0,0,0.8);
}
.product-card .brand { font-weight: 850; letter-spacing: -0.03em; margin-bottom: 22px; font-size: 18px; }
.product-card .brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.product-card h1 { margin: 0 0 12px; font-size: 27px; }
.product-card .desc { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.product-card .price { font-size: 40px; font-weight: 850; margin: 8px 0; letter-spacing: -0.03em; }
.product-card .stock { color: var(--yellow); font-size: 13px; margin: 0 0 16px; }
.buy {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 15px; margin-top: 14px; border-radius: 13px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 16px; font-weight: 750; text-decoration: none;
  box-shadow: var(--shadow-glow); transition: filter 0.15s, transform 0.12s;
}
.buy:hover { filter: brightness(1.06); transform: translateY(-1px); color: #fff; }
.buy:disabled { background: #262b36; box-shadow: none; cursor: not-allowed; color: var(--faint); }
.secure { color: var(--muted); font-size: 13px; margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }

.delivery-box {
  margin-top: 18px; padding: 17px; border-radius: 13px;
  background: rgba(8,9,13,0.55); border: 1px solid var(--border-strong);
  text-align: left; word-break: break-word; white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
}
.spinner {
  width: 36px; height: 36px; margin: 22px auto; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--brand); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hide { display: none !important; }
.center { text-align: center; }
.fade-in { animation: fade 0.5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .preview-body { grid-template-columns: 1fr; }
  .section, .card { padding: 20px; }
  .nav { padding: 14px 18px; }
}

/* ============================================================
   marketing sections + policies
   ============================================================ */
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 26px; position: relative; z-index: 2; }
.block { padding: 70px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 12px; text-align: center; }
.block h2 { text-align: center; font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; }
.block .lead { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 44px; font-size: 17px; }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); position: relative; }
.step .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 17px; background: var(--grad); color: #fff; margin-bottom: 16px; box-shadow: var(--shadow-glow); }
.step h3 { margin: 0 0 7px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.faq summary { padding: 18px 20px; cursor: pointer; font-weight: 650; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 20px 18px; color: var(--muted); font-size: 14.5px; }

/* cta band */
.cta-band { text-align: center; padding: 64px 26px; }
.cta-band h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.cta-band p { color: var(--muted); margin: 0 0 26px; }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 46px 26px 30px; }
.footer-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer-grid .brand { font-weight: 850; font-size: 19px; display: inline-flex; align-items: center; gap: 8px; }
.footer-grid .brand span.t { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-grid p { color: var(--muted); font-size: 13.5px; margin: 12px 0 0; max-width: 280px; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { max-width: 1000px; margin: 34px auto 0; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 13px; }

/* legal / prose pages */
.legal { max-width: 780px; margin: 40px auto 0; padding: 0 26px 60px; position: relative; z-index: 2; }
.legal .updated { color: var(--faint); font-size: 13px; margin-bottom: 8px; }
.legal h1 { font-size: 34px; margin: 0 0 10px; }
.legal h2 { font-size: 20px; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--brand); }
.legal .back { display: inline-block; margin-bottom: 24px; font-size: 14px; }

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .brand-col { grid-column: 1 / -1; }
  .block { padding: 50px 0; }
}
