/* =====================================================================
   CloudNEXTRA — Design System
   Pure CSS. Dark, premium, violet→fuchsia brand.
   Sections: 1 Tokens · 2 Reset · 3 Typography · 4 Layout · 5 Buttons
   6 Header · 7 Footer · 8 Hero · 9 Components · 10 Pages · 11 Utilities
   12 Animations · 13 Responsive
   ===================================================================== */

/* ----------------------------- 1. TOKENS ---------------------------- */
:root {
  /* brand */
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --purple: #a855f7;
  --purple-600: #9333ea;
  --fuchsia: #ec4899;
  --money: #34d399;
  --gold: #fbbf24;

  --grad: linear-gradient(120deg, #6366f1 0%, #a855f7 52%, #ec4899 100%);
  --grad-soft: linear-gradient(120deg, #818cf8, #c084fc 55%, #f472b6);
  --grad-money: linear-gradient(120deg, #34d399, #a3e635);

  /* surfaces */
  --bg: #09060f;
  --bg-2: #0d0819;
  --bg-3: #100a20;
  --surface: #150e29;
  --surface-2: #1c1338;
  --surface-3: #241844;
  --glass: rgba(28, 19, 56, 0.55);

  /* lines */
  --border: rgba(168, 85, 247, 0.14);
  --border-2: rgba(168, 85, 247, 0.26);
  --border-soft: rgba(255, 255, 255, 0.07);

  /* text */
  --text: #f5f2fc;
  --muted: #b6abce;
  --muted-2: #8a7eaa;
  --on-grad: #ffffff;

  /* effects */
  --ring: 0 0 0 3px rgba(168, 85, 247, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 20px 60px -18px rgba(124, 58, 237, 0.55);

  /* shape + motion */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --maxw: 1200px;
  --gutter: clamp(18px, 5vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.28s var(--ease);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ----------------------------- 2. RESET ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: rgba(168, 85, 247, 0.4); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--purple-600), var(--indigo));
  border: 3px solid var(--bg-2);
  border-radius: 20px;
}

/* --------------------------- 3. TYPOGRAPHY -------------------------- */
h1, h2, h3, h4 { line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.01em; }
p { color: var(--muted); }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); }

/* ---------------------------- 4. LAYOUT ----------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: 1340px; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin: 14px 0 16px; }
.bg-alt { background: var(--bg-2); }
.bg-grad-fade { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }

.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* --------------------------- 5. BUTTONS ----------------------------- */
.btn {
  --pad-y: 13px; --pad-x: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
  border: 1px solid transparent;
}
.btn i { font-size: 0.92em; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--grad);
  background-size: 160% 160%;
  color: var(--on-grad);
  box-shadow: 0 10px 28px -8px rgba(168, 85, 247, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(168, 85, 247, 0.75); background-position: 100% 50%; }

.btn-outline { border-color: var(--border-2); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-outline:hover { border-color: var(--purple); background: rgba(168, 85, 247, 0.1); transform: translateY(-2px); }

.btn-ghost { color: var(--text); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn-money { background: var(--grad-money); color: #04130c; box-shadow: 0 10px 28px -8px rgba(52, 211, 153, 0.5); font-weight: 700; }
.btn-money:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(52, 211, 153, 0.7); }

.btn-lg { --pad-y: 16px; --pad-x: 32px; font-size: 1.02rem; }
.btn-sm { --pad-y: 9px; --pad-x: 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* --------------------------- 6. HEADER ------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t), padding var(--t);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(9, 6, 15, 0.78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.nav {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; flex: none; box-shadow: 0 6px 18px -5px rgba(168, 85, 247, 0.7); }
.brand b { font-weight: 800; }
.brand .nx { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav-links a {
  position: relative;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--t), background var(--t);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border-2); color: var(--text); font-size: 1.15rem; }
.nav-toggle:hover { background: rgba(168, 85, 247, 0.12); }

body { padding-top: 74px; }

/* --------------------------- 7. FOOTER ------------------------------ */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding-top: 72px; position: relative; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 40px 32px;
  padding-bottom: 56px;
}
.footer-brand p { margin: 16px 0 22px; max-width: 300px; font-size: 0.92rem; }
.footer-col h4 { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 18px; font-weight: 700; }
.footer-col a { display: block; padding: 6px 0; color: var(--muted); font-size: 0.92rem; transition: color var(--t), transform var(--t); }
.footer-col a:hover { color: var(--purple); transform: translateX(3px); }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: var(--t);
}
.socials a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-3px); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
  padding: 24px 0 36px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.86rem; color: var(--muted-2);
}
.footer-bottom .legal-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom a:hover { color: var(--purple); }
.newsletter { display: flex; gap: 8px; margin-top: 6px; max-width: 320px; }
.newsletter input {
  flex: 1; min-width: 0;
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 0.88rem;
}
.newsletter input:focus { border-color: var(--purple); }

/* ---------------------------- 8. HERO ------------------------------- */
.hero { position: relative; padding-top: clamp(48px, 8vw, 90px); padding-bottom: clamp(60px, 9vw, 120px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.glow.g1 { width: 560px; height: 560px; top: -180px; left: -120px; background: radial-gradient(circle, rgba(99,102,241,0.7), transparent 70%); }
.glow.g2 { width: 620px; height: 620px; top: -120px; right: -160px; background: radial-gradient(circle, rgba(236,72,153,0.55), transparent 70%); }
.glow.g3 { width: 520px; height: 520px; bottom: -240px; left: 35%; background: radial-gradient(circle, rgba(168,85,247,0.5), transparent 70%); }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(168,85,247,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(168,85,247,0.06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-copy { max-width: 600px; }
.hero h1 { margin: 22px 0 20px; }
.hero .lead { margin-bottom: 32px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-trust { display: flex; gap: 26px; margin-top: 36px; flex-wrap: wrap; }
.hero-trust .ht { font-size: 0.86rem; color: var(--muted); }
.hero-trust .ht b { display: block; font-size: 1.5rem; color: var(--text); font-weight: 800; letter-spacing: -0.02em; }

/* hero badge pill */
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 7px 7px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(168, 85, 247, 0.08);
  font-size: 0.82rem; color: var(--muted);
}
.pill .tag { background: var(--grad); color: #fff; font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.03em; }

/* hero visual — floating upload card */
.hero-visual { position: relative; }
.float-card {
  position: relative;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-glow);
  animation: float 6s ease-in-out infinite;
}
.float-card .fc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fc-thumb { width: 54px; height: 54px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 1.3rem; flex: none; }
.fc-meta { flex: 1; min-width: 0; }
.fc-meta .t { font-weight: 700; }
.fc-meta .s { font-size: 0.82rem; color: var(--muted-2); }
.fc-badge { background: rgba(52, 211, 153, 0.14); color: var(--money); font-weight: 700; font-size: 0.78rem; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(52,211,153,0.3); }
.progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width 1.4s var(--ease); }
.fc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.fc-stat { background: rgba(255,255,255,0.03); border: 1px solid var(--border-soft); border-radius: 13px; padding: 13px 14px; }
.fc-stat .n { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.fc-stat .n.money { color: var(--money); }
.fc-stat .l { font-size: 0.74rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; }

.chip-float {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-2);
  font-size: 0.84rem; font-weight: 600;
  box-shadow: var(--shadow);
}
.chip-float i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 0.85rem; }
.chip-float.c1 { top: -22px; right: 10px; animation: float 5s ease-in-out infinite; }
.chip-float.c1 i { background: linear-gradient(135deg, var(--money), #16a34a); }
.chip-float.c2 { bottom: -26px; left: -18px; animation: float 7s ease-in-out infinite reverse; }
.chip-float.c2 i { background: var(--grad); }

/* -------------------------- 9. COMPONENTS --------------------------- */
.card {
  background: linear-gradient(165deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.card.hover:hover { transform: translateY(-6px); border-color: var(--border-2); box-shadow: var(--shadow-glow); }

.feature .ico, .step .ico {
  width: 56px; height: 56px;
  border-radius: 15px;
  display: grid; place-items: center;
  font-size: 1.35rem; color: #fff;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(236,72,153,0.25));
  border: 1px solid var(--border-2);
}
.feature .ico { color: var(--purple); }
.feature h3 { margin-bottom: 10px; }
.feature p { font-size: 0.95rem; }

/* steps with connector */
.steps { counter-reset: step; }
.step { position: relative; }
.step .num {
  position: absolute; top: 26px; right: 28px;
  font-size: 3.4rem; font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--border-2);
  line-height: 1; opacity: 0.8;
}
.step .ico { background: var(--grad); }

/* stats band */
.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  text-align: center;
  padding: 30px 18px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
}
.stat .n { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }

/* badges / chips */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; }
.badge.purple { background: rgba(168,85,247,0.16); color: #d8b4fe; border: 1px solid var(--border-2); }
.badge.green { background: rgba(52,211,153,0.16); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.3); }
.badge.blue { background: rgba(99,102,241,0.16); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }

/* format marquee */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: scroll-x 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.fmt {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem;
  color: var(--muted);
}
.fmt i { color: var(--purple); }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px); text-align: center; background: linear-gradient(150deg, #1a0b33, #0d0819); border: 1px solid var(--border-2); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0.14; }
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 16px; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* accordion (FAQ) */
.accordion { max-width: 820px; margin-inline: auto; }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-q { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 24px 4px; font-size: 1.06rem; font-weight: 600; color: var(--text); }
.acc-q .qi { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(168,85,247,0.14); color: var(--purple); transition: var(--t); }
.acc-q .chev { margin-left: auto; transition: transform var(--t); color: var(--muted-2); }
.acc-item.open .acc-q .chev { transform: rotate(180deg); }
.acc-item.open .acc-q .qi { background: var(--grad); color: #fff; }
.acc-a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.acc-a .inner { padding: 0 4px 24px 54px; color: var(--muted); }
.acc-a .inner ul { list-style: disc; padding-left: 18px; margin-top: 8px; }
.acc-a .inner li { margin: 4px 0; }

/* page hero (interior pages) */
.page-hero { position: relative; padding-block: clamp(54px, 8vw, 96px); overflow: hidden; text-align: center; border-bottom: 1px solid var(--border); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 16px auto 18px; max-width: 760px; }
.page-hero p { max-width: 620px; margin-inline: auto; }
.breadcrumb { display: inline-flex; gap: 8px; align-items: center; font-size: 0.84rem; color: var(--muted-2); }
.breadcrumb a:hover { color: var(--purple); }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; }
table.data th, table.data td { padding: 15px 18px; text-align: left; font-size: 0.92rem; }
table.data thead th { background: var(--surface-2); color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
table.data tbody tr { border-top: 1px solid var(--border); }
table.data tbody tr:hover { background: rgba(168,85,247,0.05); }
table.data td b { color: var(--text); }

/* code block */
.code {
  position: relative;
  background: #0c0818;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  font-family: "SFMono-Regular", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
.code-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 0.82rem; color: var(--muted); }
.code-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.code-head .dot:nth-child(1) { background: #ff5f57; }
.code-head .dot:nth-child(2) { background: #febc2e; }
.code-head .dot:nth-child(3) { background: #28c840; }
.code-head .lang { margin-left: auto; }
.code pre { margin: 0; padding: 20px; overflow-x: auto; font-size: 0.86rem; line-height: 1.7; color: #e6e1f5; }
.code .copy { position: absolute; top: 9px; right: 12px; font-size: 0.78rem; color: var(--muted); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border-2); }
.code .copy:hover { color: #fff; background: rgba(168,85,247,0.16); }
.tok-key { color: #c084fc; }
.tok-str { color: #6ee7b7; }
.tok-com { color: #6b6086; font-style: italic; }
.tok-fn { color: #f0abfc; }
.tok-num { color: #fbbf24; }

/* form */
.form-grid { display: grid; gap: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(168,85,247,0.18); }
.field textarea { resize: vertical; min-height: 140px; }
.field.error input, .field.error textarea { border-color: #f87171; }
.field .err { display: none; color: #fca5a5; font-size: 0.8rem; margin-top: 6px; }
.field.error .err { display: block; }
.form-note { font-size: 0.85rem; color: var(--muted-2); }

/* toast */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 13px; padding: 13px 16px; min-width: 240px; max-width: 360px;
  box-shadow: var(--shadow); color: var(--text); font-size: 0.9rem;
  transform: translateX(120%); opacity: 0; transition: transform 0.4s var(--ease), opacity 0.4s;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast i.lead-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.toast.ok i.lead-ico { background: linear-gradient(135deg, var(--money), #16a34a); }
.toast.info i.lead-ico { background: var(--grad); }

/* back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1rem;
  box-shadow: var(--shadow-glow);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.9);
  transition: var(--t);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); }

/* ----------------------------- 10. PAGES ---------------------------- */
/* prose (about / legal) */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 14px; }
.prose h3 { margin: 28px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.prose li { color: var(--muted); margin: 6px 0; }
.prose a { color: var(--purple); }
.prose a:hover { text-decoration: underline; }

/* earn — pricing/rate cards */
.rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rate { text-align: center; padding: 26px 18px; position: relative; }
.rate .region { font-size: 0.82rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }
.rate .cpm { font-size: 2rem; font-weight: 800; margin: 8px 0 2px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rate .per { font-size: 0.8rem; color: var(--muted-2); }
.rate .flag { font-size: 1.8rem; }

/* calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.calc-control label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 14px; }
.calc-control label b { color: var(--purple); font-size: 1.1rem; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.1); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); cursor: pointer; box-shadow: 0 4px 12px rgba(168,85,247,0.6); border: 3px solid #fff2; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border: none; border-radius: 50%; background: var(--purple); cursor: pointer; }
.calc-out { text-align: center; padding: 36px; border-radius: var(--r-lg); background: linear-gradient(150deg, rgba(52,211,153,0.1), rgba(99,102,241,0.06)); border: 1px solid rgba(52,211,153,0.25); }
.calc-out .big { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; color: var(--money); }
.calc-out .sub { color: var(--muted); }

/* feature split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev .split-media { order: -1; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; color: var(--muted); }
.check-list li i { color: var(--money); margin-top: 4px; flex: none; }
.check-list li b { color: var(--text); }

/* mock browser frame */
.frame { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-2); box-shadow: var(--shadow-glow); background: var(--surface); }
.frame-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.frame-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted-2); opacity: 0.6; }
.frame-bar .url { margin-left: 10px; font-size: 0.78rem; color: var(--muted-2); background: var(--bg-2); padding: 5px 12px; border-radius: 999px; flex: 1; }
.frame-body { padding: 22px; }

/* ------------------------- DASHBOARD page --------------------------- */
.dash { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 74px); }
.dash-side { border-right: 1px solid var(--border); background: var(--bg-2); padding: 24px 16px; position: sticky; top: 74px; height: calc(100vh - 74px); }
.dash-side .side-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: var(--t); }
.dash-side .side-link i { width: 20px; text-align: center; }
.dash-side .side-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.dash-side .side-link.active { color: #fff; background: rgba(168,85,247,0.16); border: 1px solid var(--border-2); }
.dash-side .side-sep { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); padding: 22px 14px 8px; }
.dash-main { padding: clamp(20px, 3vw, 36px); }
.dash-topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.dash-topbar h1 { font-size: 1.6rem; }
.dash-search { margin-left: auto; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; color: var(--muted-2); }
.dash-search input { border: none; background: none; outline: none; width: 180px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.kpi { padding: 22px; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi .kpi-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1rem; }
.kpi .n { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.kpi .l { color: var(--muted-2); font-size: 0.85rem; }
.kpi .delta { font-size: 0.8rem; font-weight: 700; }
.kpi .delta.up { color: var(--money); }
.kpi .delta.down { color: #fca5a5; }
.dash-row { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-bottom: 24px; }
.chart-card .chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chart-tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 999px; }
.chart-tabs button { padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.chart-tabs button.active { background: var(--grad); color: #fff; }
.chart { position: relative; height: 240px; }
.legend { display: flex; gap: 18px; font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; }
.apikey { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; font-family: ui-monospace, monospace; font-size: 0.84rem; }
.apikey code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.apikey button { color: var(--purple); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-dot.active { background: var(--money); box-shadow: 0 0 0 3px rgba(52,211,153,0.2); }
.status-dot.inactive { background: var(--muted-2); }

/* ----------------------------- DOCS (api) --------------------------- */
.docs { display: grid; grid-template-columns: 232px 1fr; gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 96px; }
.docs-nav .grp { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 18px 0 8px; font-weight: 700; }
.docs-nav a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 0.9rem; border-left: 2px solid transparent; transition: var(--t); }
.docs-nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.docs-nav a.active { color: var(--purple); border-left-color: var(--purple); background: rgba(168,85,247,0.08); }
.docs-body h2 { scroll-margin-top: 100px; margin-bottom: 14px; }
.docs-body section { margin-bottom: 56px; }
.docs-body p { margin-bottom: 14px; }
.docs-body .code { margin: 18px 0; }
.endpoint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 16px; font-family: ui-monospace, monospace; font-size: 0.9rem; margin: 16px 0; }
.method { font-weight: 800; font-size: 0.74rem; padding: 4px 10px; border-radius: 7px; letter-spacing: 0.05em; }
.method.get { background: rgba(52,211,153,0.18); color: #6ee7b7; }
.method.post { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.endpoint .path { color: var(--text); }
.tabs { display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 999px; width: max-content; margin-bottom: 14px; }
.tabs button { padding: 7px 16px; border-radius: 999px; font-size: 0.84rem; color: var(--muted); font-weight: 600; }
.tabs button.active { background: var(--grad); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.param-table td code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: #f0abfc; font-size: 0.84rem; }

/* --------------------------- PLAYER (watch) ------------------------- */
.player-wrap { max-width: 1000px; margin-inline: auto; }
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-glow);
}
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player.paused .big-play { opacity: 1; visibility: visible; }
.player .big-play {
  position: absolute; inset: 0; margin: auto;
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 1.8rem;
  box-shadow: var(--shadow-glow); cursor: pointer;
  transition: var(--t);
}
.player .big-play:hover { transform: scale(1.06); }
.player .big-play.go { padding-left: 6px; }
.player .spinner-wrap { position: absolute; inset: 0; display: none; place-items: center; }
.player.buffering .spinner-wrap { display: grid; }
.player .spinner-wrap .spinner { width: 46px; height: 46px; border-width: 4px; }

.controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t);
}
.player:hover .controls, .player.paused .controls, .player.show-ui .controls { opacity: 1; transform: none; }
.player:not(.paused).idle { cursor: none; }

.seek { position: relative; height: 6px; border-radius: 999px; background: rgba(255,255,255,.22); cursor: pointer; margin-bottom: 12px; }
.seek .buffered { position: absolute; inset: 0; width: 0; background: rgba(255,255,255,.25); border-radius: 999px; }
.seek .played { position: absolute; inset: 0; width: 0; background: var(--grad); border-radius: 999px; }
.seek .knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%) scale(0); transition: transform var(--t); box-shadow: 0 0 0 4px rgba(168,85,247,.4); }
.seek:hover .knob { transform: translate(-50%, -50%) scale(1); }

.ctrl-row { display: flex; align-items: center; gap: 14px; color: #fff; }
.ctrl-row button { color: #fff; font-size: 1.05rem; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; transition: var(--t); }
.ctrl-row button:hover { background: rgba(255,255,255,.16); }
.ctrl-row .time { font-size: .82rem; font-variant-numeric: tabular-nums; color: #e6e1f5; }
.ctrl-row .time .sep { opacity: .5; margin: 0 4px; }
.ctrl-row .spacer { flex: 1; }
.vol { display: flex; align-items: center; gap: 6px; }
.vol input[type="range"] { width: 80px; height: 5px; }
.vol input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; box-shadow: none; border-width: 2px; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; bottom: 44px; right: 0;
  background: rgba(20,14,41,.96); backdrop-filter: blur(12px);
  border: 1px solid var(--border-2); border-radius: 12px;
  padding: 6px; min-width: 150px; box-shadow: var(--shadow);
  display: none;
}
.menu.open { display: block; }
.menu button { width: 100%; text-align: left; justify-content: flex-start; padding: 9px 12px; border-radius: 8px; font-size: .85rem; gap: 8px; }
.menu button.active { color: var(--purple); }
.menu button.active::after { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: .7rem; }
.menu .menu-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); padding: 8px 12px 4px; }

.player-meta { display: flex; align-items: flex-start; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.player-meta .pm-main { flex: 1; min-width: 240px; }
.player-meta h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.player-meta .pm-stats { display: flex; gap: 18px; color: var(--muted); font-size: .9rem; margin-top: 8px; flex-wrap: wrap; }
.player-meta .pm-stats b { color: var(--text); }
.player-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------- 11. UTILITIES -------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.muted { color: var(--muted); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.hidden { display: none; }
.divider { height: 1px; background: var(--border); border: none; margin: 0; }
.glass { background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* --------------------------- 12. ANIMATIONS ------------------------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-glow { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.85; } }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------- 13. RESPONSIVE ------------------------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .split, .calc { grid-template-columns: 1fr; gap: 36px; }
  .split.rev .split-media { order: 0; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; display: none; }
  .dash-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-cta .btn-ghost { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 74px; left: 0; right: 0;
    background: rgba(9,6,15,0.97); backdrop-filter: blur(16px);
    padding: 16px var(--gutter) 24px; gap: 4px;
    border-bottom: 1px solid var(--border);
    margin: 0;
  }
  .nav-links.open a { padding: 13px 14px; border-radius: 12px; }
  .nav-links.open a.active::after { display: none; }
  .nav-links.open a.active { background: rgba(168,85,247,0.14); }
}
@media (max-width: 720px) {
  .cols-2, .cols-3, .cols-4, .stat-band, .rate-grid, .kpi-grid { grid-template-columns: 1fr; }
  .cols-4.keep-2, .stat-band, .rate-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
  .hero-trust { gap: 18px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stat-band, .rate-grid, .kpi-grid, .cols-4.keep-2 { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
