/* ==========================================================================
   Kuickdrop Design System  v2
   Self-contained, dependency-free CSS (no Bootstrap). Dark-first.
   ========================================================================== */

/* ----- Design tokens ----- */
:root {
  --bg: #090b10;
  --bg-grid: rgba(43, 142, 242, 0.05);
  --surface-1: #10131b;
  --surface-2: #161a24;
  --surface-3: #1d2331;
  --border: #232a39;
  --border-strong: #333c50;

  --text: #e7eaf1;
  --text-muted: #9aa4bb;
  --text-dim: #697187;

  --brand: #2b8ef2;
  --brand-2: #2ed3c6;
  --brand-soft: rgba(43, 142, 242, 0.12);
  --brand-soft-2: rgba(46, 211, 198, 0.12);
  --brand-ink: #ffffff;

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(43, 142, 242, 0.25), 0 12px 40px rgba(43, 142, 242, 0.18);

  --gradient: linear-gradient(135deg, #1e63e6 0%, #2b8ef2 46%, #2ed3c6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(43, 142, 242, 0.18), rgba(46, 211, 198, 0.12));

  --maxw: 1140px;
  --nav-h: 66px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(60rem 40rem at 15% -10%, rgba(43, 142, 242, 0.10), transparent 60%),
    radial-gradient(50rem 40rem at 100% 0%, rgba(46, 211, 198, 0.08), transparent 55%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7ff0e2; }

h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
p { color: var(--text-muted); }
strong { color: var(--text); }

::selection { background: rgba(43, 142, 242, 0.35); color: #fff; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ----- Layout ----- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
main { flex: 1 0 auto; }
.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; } .mt-5 { margin-top: 56px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 36px; } .mb-5 { margin-bottom: 56px; }

/* ----- Typography helpers ----- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-2);
  background: var(--brand-soft-2);
  border: 1px solid rgba(46, 211, 198, 0.25);
  padding: 6px 14px; border-radius: 999px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lead { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
.h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--mono); }

/* ----- Buttons ----- */
.btn {
  --btn-bg: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 0.98rem; font-weight: 700; line-height: 1;
  padding: 13px 22px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--btn-bg); color: var(--text);
  cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); color: #fff; }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--gradient); border-color: transparent; color: #0a0c12;
  box-shadow: 0 10px 26px rgba(43, 142, 242, 0.28);
}
.btn-primary:hover { color: #0a0c12; box-shadow: 0 16px 36px rgba(43, 142, 242, 0.42); }
.btn-ghost { background: transparent; border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--brand); }
.btn-soft { background: var(--brand-soft); border-color: rgba(43, 142, 242, 0.3); color: #bfe0ff; }
.btn-soft:hover { color: #fff; border-color: var(--brand); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }
.btn-sm { padding: 9px 15px; font-size: 0.85rem; }
.btn-block { display: flex; width: 100%; }

/* ----- Forms ----- */
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.field, .form-control, textarea, select, input[type="text"], input[type="email"],
input[type="tel"], input[type="password"], input[type="search"] {
  width: 100%; font-family: inherit; font-size: 0.98rem; color: var(--text);
  background: var(--surface-1); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}
textarea { line-height: 1.6; resize: vertical; }
.field:focus, .form-control:focus, textarea:focus, select:focus,
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #0c0f16; }
::placeholder { color: var(--text-dim); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa4bb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}
.code-input {
  font-family: var(--mono); font-weight: 700; letter-spacing: 0.18em; text-transform: none;
}

/* ----- Grid ----- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 14px; } .gap-3 { gap: 22px; }

/* ----- Card ----- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card-hover:hover { border-color: rgba(43, 142, 242, 0.5); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-glass {
  background: linear-gradient(180deg, rgba(29, 35, 49, 0.6), rgba(16, 19, 27, 0.6));
  backdrop-filter: blur(8px);
}

/* ----- Icon chips ----- */
.icon-chip {
  width: 48px; height: 48px; flex: 0 0 48px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--brand-2);
  background: var(--brand-soft-2); border: 1px solid rgba(46, 211, 198, 0.22);
}
.icon-chip svg { width: 22px; height: 22px; }
.icon-chip.violet { color: #bfe0ff; background: var(--brand-soft); border-color: rgba(43, 142, 242, 0.25); }

/* ----- Badges ----- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border);
}
.badge-brand { background: var(--brand-soft); color: #bfe0ff; border-color: rgba(43, 142, 242, 0.3); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.3); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(251, 191, 36, 0.3); }

/* ----- Alerts ----- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); }
.alert-success { background: var(--success-soft); border-color: rgba(52, 211, 153, 0.35); color: #a7f3d0; }
.alert-danger { background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }
.hidden { display: none !important; }

/* ----- Navbar ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 11, 16, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { color: #fff; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--gradient); display: inline-flex; align-items: center; justify-content: center;
  color: #0a0c12; font-weight: 900; box-shadow: 0 6px 18px rgba(43, 142, 242, 0.35);
}
.brand-logo svg { width: 20px; height: 20px; }
.brand-img { height: 42px; width: auto; display: block; }
.site-footer .brand-img { height: 46px; }
@media (max-width: 480px) { .brand-img { height: 34px; } }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text-muted); font-weight: 600; font-size: 0.95rem;
  padding: 9px 13px; border-radius: var(--radius-sm); transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: var(--surface-2); }
.nav-links a svg { width: 17px; height: 17px; opacity: 0.8; }

.fetch-form { display: flex; align-items: stretch; margin-left: 6px; }
.fetch-group {
  display: flex; align-items: stretch;
  background: var(--surface-1); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fetch-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fetch-group .fetch-icon { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--text-dim); }
.fetch-group .fetch-icon svg { width: 16px; height: 16px; }
.fetch-input {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  width: 118px; padding: 10px 10px !important; font-family: var(--mono); font-weight: 700; letter-spacing: 0.14em;
  transition: width 0.25s var(--ease);
}
.fetch-input:focus { width: 150px; }
.fetch-btn {
  border: 0; border-left: 1px solid var(--border-strong);
  background: var(--gradient); color: #0a0c12; font-weight: 800; font-size: 0.9rem;
  padding: 0 16px; cursor: pointer;
}

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); padding: 8px; cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--surface-1); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    flex-direction: column; align-items: stretch; gap: 14px;
    padding: 18px 20px 24px;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { padding: 12px; border-radius: var(--radius-sm); }
  .nav-links a:hover, .nav-links a.active { background: var(--surface-2); }
  .fetch-form { margin: 6px 0 0; }
  .fetch-group { width: 100%; }
  .fetch-input { width: 100%; }
  .fetch-input:focus { width: 100%; }
}

/* ----- Hero ----- */
.hero { position: relative; padding: 66px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: start; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.55rem); line-height: 1.08; }
.hero .lead { margin-top: 18px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 30px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }
.hero-trust svg { width: 17px; height: 17px; color: var(--success); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ----- Feature list ----- */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature h3 { font-size: 1.12rem; margin-bottom: 6px; }
.feature p { font-size: 0.95rem; }

/* ----- Steps ----- */
.step-num {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; color: #0a0c12; background: var(--gradient);
  box-shadow: 0 8px 20px rgba(43, 142, 242, 0.3);
}

/* ----- FAQ / accordion ----- */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item[open] { border-color: rgba(43, 142, 242, 0.4); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; color: #fff; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-plus { flex: 0 0 auto; color: var(--brand-2); transition: transform 0.25s var(--ease); }
.faq-item[open] summary .faq-plus { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--text-muted); }
.faq-item .faq-body p { margin-bottom: 10px; }

/* ----- Prose (articles/guides) ----- */
.prose { color: var(--text-muted); font-size: 1.03rem; }
.prose h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 42px 0 16px; color: #fff; }
.prose h3 { font-size: 1.3rem; margin: 30px 0 12px; color: #fff; }
.prose p { margin-bottom: 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; color: var(--text-muted); }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--brand); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--brand); background: var(--surface-1);
  padding: 14px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 22px; color: var(--text);
}
.prose code:not([class*="language-"]) {
  font-family: var(--mono); font-size: 0.9em; background: var(--surface-3);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; color: #bfe0ff;
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 0.95rem; overflow: hidden; border-radius: var(--radius); }
.prose thead th { background: var(--surface-2); color: #fff; text-align: left; }
.prose th, .prose td { padding: 12px 14px; border: 1px solid var(--border); }
.prose td { color: var(--text-muted); }

/* ----- Breadcrumbs ----- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--text-dim); padding: 20px 0 4px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--brand-2); }
.breadcrumbs .sep { color: var(--text-dim); }

/* ----- CTA band ----- */
.cta-band {
  text-align: center; padding: 56px 28px; border-radius: var(--radius-xl);
  background: var(--gradient-soft); border: 1px solid rgba(43, 142, 242, 0.25);
  position: relative; overflow: hidden;
}

/* ----- Divider ----- */
.hr { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ----- Code viewer (view_paste) ----- */
.code-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0; padding: 14px 18px;
}
.code-wrapper {
  background: #0c0f16; border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius); padding: 20px; overflow-x: auto;
}
.code-wrapper pre { margin: 0; background: transparent; }
.code-wrapper pre[class*="language-"] { font-size: 13.5px; }
.social-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; color: #fff; transition: transform 0.15s var(--ease), opacity 0.2s;
  border: 1px solid var(--border);
}
.social-btn:hover { transform: translateY(-2px); color: #fff; opacity: 0.92; }
.social-btn svg { width: 18px; height: 18px; }
.bg-wa { background: #25d366; } .bg-x { background: #000; } .bg-fb { background: #1877f2; }
.bg-em { background: #ea4335; } .bg-li { background: #0a66c2; }

/* ----- Footer ----- */
.site-footer { margin-top: auto; background: var(--surface-1); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 14px; font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.94rem; }
.footer-col a:hover { color: var(--brand-2); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 0.86rem;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ----- Utility responsive ----- */
@media (max-width: 820px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 821px) {
  .grid-3-md { grid-template-columns: repeat(3, 1fr); }
}

/* ----- Prefers reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* code wrap fix for plain text pastes */
pre code.wrap { white-space: pre-wrap !important; word-break: break-word; }

/* accessibility helper */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* loading spinner */
.spinner {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: currentColor;
  border-radius: 50%; animation: kd-spin 0.6s linear infinite;
}
@keyframes kd-spin { to { transform: rotate(360deg); } }
