/* ===== RYDE Labs - iBox : deep-space theme ===== */
:root {
  --bg: #04030f;
  --ink: #e8ecff;
  --muted: #9aa3c7;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --lime: #a3e635;
  --glass: rgba(20, 18, 46, 0.55);
  --stroke: rgba(150, 160, 255, 0.18);
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --font: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100%;
}

/* ---------- background layers ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -3;
  display: block;
}

.nebula {
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38rem 30rem at 12% 18%, rgba(139, 92, 246, 0.30), transparent 60%),
    radial-gradient(34rem 28rem at 85% 12%, rgba(34, 211, 238, 0.22), transparent 62%),
    radial-gradient(40rem 34rem at 70% 88%, rgba(244, 114, 182, 0.20), transparent 60%),
    radial-gradient(30rem 26rem at 20% 90%, rgba(56, 189, 248, 0.16), transparent 60%);
  filter: blur(10px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.grid-floor {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 40vh;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.16) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px;
  transform: perspective(340px) rotateX(62deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  opacity: 0.55;
}

/* ---------- layout ---------- */
.wrap { width: min(1180px, 92vw); margin-inline: auto; }

header.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(4, 3, 15, 0.85), rgba(4, 3, 15, 0.35));
  border-bottom: 1px solid var(--stroke);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.25rem;
}

.brand-logo {
  display: block;
  width: 56px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.65));
}

.brand span.i { color: var(--cyan); }

.brand-lockup { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand-lab {
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.brand-divider { color: var(--muted); font-weight: 400; }

.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}

.nav-links a.link {
  color: var(--muted);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: 0.2s;
}

.nav-links a.link:hover { color: #fff; background: rgba(139, 92, 246, 0.16); }

/* ---------- buttons ---------- */
.btn {
  border: 0;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 999px;
  color: #0a0620;
  background: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--pink));
  background-size: 220% 220%;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.45);
  transition: transform 0.18s, box-shadow 0.18s, background-position 0.6s;
  text-decoration: none;
  display: inline-block;
}

.btn:hover { transform: translateY(-2px); background-position: 100% 50%; box-shadow: 0 14px 34px rgba(34, 211, 238, 0.45); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border: 1px solid var(--stroke);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(139, 92, 246, 0.18); box-shadow: none; }

.btn.block { width: 100%; text-align: center; }
.btn.sm { padding: 8px 16px; font-size: 0.85rem; }

.linkish {
  background: none; border: 0; padding: 0;
  color: var(--cyan); cursor: pointer;
  font: inherit; font-size: 0.88rem; text-decoration: underline;
}

/* ---------- hero ---------- */
.hero { padding: 76px 0 40px; text-align: center; }

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto 28px;
}

.hero-brand img {
  display: block;
  width: 280px;
  height: auto;
  filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.7));
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  margin: 0 0 18px;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(100deg, #fff, var(--cyan), var(--violet), var(--pink), #fff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
}

@keyframes shine { to { background-position: 300% 0; } }

.hero p.sub {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 640px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(139, 92, 246, 0.12);
  color: var(--cyan);
  font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 22px;
}

.pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.7); } }

/* ---------- quote banner ---------- */
.quote-banner {
  position: relative;
  margin: 26px auto 60px;
  padding: 40px 34px 34px;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-banner::before {
  content: "";
  position: absolute;
  inset: -60% -10%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(34, 211, 238, 0.16), transparent 100%);
  animation: spin 14s linear infinite;
  pointer-events: none;
}

.quote-banner .qmark {
  position: absolute; top: -22px; left: 18px;
  font-size: 9rem; line-height: 1;
  color: rgba(139, 92, 246, 0.22);
  font-family: Georgia, serif;
  pointer-events: none;
}

.quote-text {
  position: relative;
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 14px;
}

.quote-author { position: relative; color: var(--cyan); letter-spacing: 1px; font-size: 0.95rem; }

.quote-fade { animation: quoteIn 0.7s ease; }

@keyframes quoteIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

.quote-dots { display: flex; gap: 7px; justify-content: center; margin-top: 20px; position: relative; }

.quote-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer; transition: 0.25s;
}

.quote-dots i.on { background: var(--cyan); width: 24px; border-radius: 999px; box-shadow: 0 0 12px var(--cyan); }

/* ---------- sections / cards ---------- */
section.block { padding: 56px 0; }

h2.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

p.section-sub { color: var(--muted); margin: 0 0 32px; font-size: 1.02rem; }

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--glass);
  backdrop-filter: blur(14px);
  padding: 24px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(20rem 12rem at var(--mx, 50%) var(--my, 0%), rgba(139, 92, 246, 0.22), transparent 65%);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}

.card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 22px 50px rgba(34, 211, 238, 0.15); }
.card:hover::after { opacity: 1; }

.card h3 { margin: 0 0 10px; font-size: 1.18rem; }
.card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 0.95rem; }

.card .tag {
  display: inline-block; margin-bottom: 12px;
  font-size: 0.7rem; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--lime); border: 1px solid rgba(163, 230, 53, 0.35);
  padding: 4px 10px; border-radius: 999px;
  background: rgba(163, 230, 53, 0.08);
}

.card .meta {
  margin-top: 16px; display: flex; align-items: center; justify-content: space-between;
  font-size: 0.8rem; color: var(--muted);
}

.step-num {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 1.1rem; color: #0a0620;
  background: linear-gradient(140deg, var(--cyan), var(--violet));
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(139, 92, 246, 0.4);
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin-top: 10px; }
.stat { text-align: center; padding: 22px 12px; border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--glass); }
.stat b { display: block; font-size: 2rem; background: linear-gradient(120deg, var(--cyan), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 2, 12, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}

.modal-backdrop.open { display: flex; animation: fadeIn 0.25s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(460px, 100%);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(28, 24, 62, 0.94), rgba(10, 8, 30, 0.96));
  box-shadow: var(--shadow), 0 0 90px rgba(139, 92, 246, 0.28);
  padding: 30px;
  position: relative;
  max-height: 92vh; overflow-y: auto;
  animation: popIn 0.32s cubic-bezier(0.2, 1.1, 0.4, 1);
}

@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(0.95); } to { opacity: 1; transform: none; } }

.modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.05);
  color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.modal .close:hover { color: #fff; background: rgba(244, 114, 182, 0.25); }

.modal h2 { margin: 0 0 6px; font-size: 1.55rem; }
.modal .lead { color: var(--muted); font-size: 0.92rem; margin: 0 0 22px; line-height: 1.6; }

.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); margin-bottom: 22px; }
.tabs button {
  flex: 1; border: 0; cursor: pointer; padding: 10px; border-radius: 999px;
  background: transparent; color: var(--muted); font: inherit; font-size: 0.9rem; font-weight: 600; transition: 0.2s;
}
.tabs button.on { background: linear-gradient(120deg, var(--cyan), var(--violet)); color: #0a0620; }

.pane { display: none; }
.pane.on { display: block; animation: fadeIn 0.3s ease; }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.4px; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit; font-size: 0.95rem;
  transition: 0.2s;
}

.field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.07);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.field input[readonly] { opacity: 0.65; cursor: not-allowed; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.form-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.msg {
  display: none;
  margin-bottom: 16px; padding: 11px 14px; border-radius: 12px;
  font-size: 0.88rem; line-height: 1.5;
}
.msg.show { display: block; animation: fadeIn 0.25s; }
.msg.err { background: rgba(244, 114, 182, 0.14); border: 1px solid rgba(244, 114, 182, 0.4); color: #ffc7e2; }
.msg.ok  { background: rgba(163, 230, 53, 0.12); border: 1px solid rgba(163, 230, 53, 0.4); color: #dcffa8; }
.msg.info{ background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34, 211, 238, 0.4); color: #b9f2ff; }

/* OTP boxes */
.otp { display: flex; gap: 10px; justify-content: space-between; margin: 6px 0 4px; }
.otp input {
  width: 100%; aspect-ratio: 1 / 1.15;
  text-align: center; font-size: 1.4rem; font-weight: 800;
  border-radius: 12px; border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04); color: var(--ink);
}
.otp input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14); }

.demo-note {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  border: 1px dashed rgba(163, 230, 53, 0.45);
  background: rgba(163, 230, 53, 0.07);
  font-size: 0.82rem; color: #d7f5a1; line-height: 1.55;
}
.demo-note b { color: #fff; letter-spacing: 3px; font-size: 1.05rem; }

/* ---------- dashboard ---------- */
.dash-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding: 46px 0 8px;
}
.dash-head h1 { margin: 0 0 6px; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -1px; }
.dash-head p { margin: 0; color: var(--muted); }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 30px; }
.toolbar input, .toolbar select {
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.04);
  color: var(--ink); font: inherit; font-size: 0.9rem;
}
.toolbar input { flex: 1; min-width: 220px; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--cyan); }

.idea-card { cursor: pointer; display: flex; flex-direction: column; }
.idea-card .excerpt { flex: 1; }
.idea-card .more { margin-top: 16px; color: var(--cyan); font-size: 0.88rem; font-weight: 700; }
.idea-card .more::after { content: " →"; transition: 0.2s; }
.idea-card:hover .more::after { margin-left: 5px; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #0a0620;
  background: linear-gradient(140deg, var(--cyan), var(--pink));
}

.author-row { display: flex; align-items: center; gap: 9px; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); grid-column: 1 / -1; }
.empty .big { font-size: 3rem; margin-bottom: 12px; }

/* ---------- detail page ---------- */
.detail {
  border-radius: 24px; border: 1px solid var(--stroke);
  background: var(--glass); backdrop-filter: blur(14px);
  padding: 40px; box-shadow: var(--shadow); margin: 34px 0 60px;
}
.detail h1 { margin: 12px 0 16px; font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -1px; line-height: 1.15; }
.detail .body { color: #cbd2f0; line-height: 1.85; font-size: 1.03rem; white-space: pre-wrap; }
.detail .divider { height: 1px; background: var(--stroke); margin: 26px 0; }
.detail .info { display: flex; gap: 26px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.detail .info b { color: var(--ink); display: block; font-size: 0.95rem; margin-top: 3px; font-weight: 600; }

.back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none; font-size: 0.9rem; margin-top: 30px;
}
.back:hover { color: var(--cyan); }

/* ---------- submit page ---------- */
.form-shell {
  border-radius: 24px; border: 1px solid var(--stroke);
  background: var(--glass); backdrop-filter: blur(14px);
  padding: 36px; box-shadow: var(--shadow); margin: 30px 0 60px;
}

/* ---------- footer ---------- */
footer.foot {
  border-top: 1px solid var(--stroke);
  padding: 34px 0;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 40px;
}

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(140%);
  z-index: 200; padding: 14px 26px; border-radius: 999px;
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  color: #0a0620; font-weight: 700; font-size: 0.92rem;
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.5);
  transition: transform 0.4s cubic-bezier(0.2, 1.1, 0.4, 1);
}
#toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 760px) {
  .nav-links a.link, .nav-links .author-row { display: none; }
}

@media (max-width: 620px) {
  .row2 { grid-template-columns: 1fr; }
  .detail, .form-shell { padding: 24px; }
  .hero-brand img { width: 200px; }
  .brand-logo { width: 48px; }
  .brand-lockup { gap: 5px; }
  .brand-lab { font-size: 0.64rem; letter-spacing: 0.8px; }
}
