/* DocNest website — no external dependencies. */
:root {
  --bg: #0b1024;
  --bg2: #121a3a;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --fg: #eef1ff;
  --muted: #a9b2d6;
  --brand: #5b7cff;
  --brand2: #8b5cff;
  --gold: #ffb300;
  --good: #34d399;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
/* Grid/flex children may shrink below their content (stops long words or 3D props widening the page). */
.hero > *, .cube-wrap > *, .grid > *, .step > * { min-width: 0; }
main { overflow-x: clip; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #2a2f7a 0%, transparent 60%), radial-gradient(900px 700px at -10% 30%, #3b1f6e 0%, transparent 55%), var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: #9fb4ff; }
img { max-width: 100%; }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(11, 16, 36, 0.6); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1160px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--fg); text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 10px; }
.nav-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--fg); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 12px; } }
@media (max-width: 420px) { .nav-links a:first-child { display: none; } }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: clamp(28px, 4vw, 40px); }
.kicker { color: var(--gold); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }
.lead { color: var(--muted); font-size: 18px; max-width: 680px; }
.center { text-align: center; }
.center .lead { margin: 0 auto; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 900; }
.grad { background: linear-gradient(90deg, #8ea4ff, #c39bff 50%, #ffcf5a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--card); }
.btn.primary { background: linear-gradient(90deg, var(--brand), var(--brand2)); border: none; box-shadow: 0 10px 30px rgba(91, 124, 255, 0.35); }
.btn:hover { transform: translateY(-1px); }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 14px; }
.badges span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; text-align: center; } .cta, .badges { justify-content: center; } }

/* ---------- 3D phone scene ---------- */
.scene { perspective: 1400px; height: 600px; display: grid; place-items: center; position: relative; }
.rig { position: relative; width: 280px; height: 560px; transform-style: preserve-3d; transform: rotateY(-22deg) rotateX(8deg); transition: transform 0.25s ease-out; animation: sway 9s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotateY(-22deg) rotateX(8deg) translateY(0); } 50% { transform: rotateY(16deg) rotateX(4deg) translateY(-12px); } }
.phone { position: absolute; inset: 0; border-radius: 42px; background: #070a18; border: 10px solid #1d2240; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 2px #2c3366; transform: translateZ(0); overflow: hidden; }
.phone::before { content: ""; position: absolute; top: 10px; left: 50%; width: 90px; height: 22px; transform: translateX(-50%); background: #000; border-radius: 12px; z-index: 2; }
.screen { position: absolute; inset: 0; padding: 44px 14px 14px; background: linear-gradient(180deg, #151c44, #0e1430); font-size: 12px; }
.screen h4 { margin: 0 0 8px; font-size: 15px; }
.tile { background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; margin-bottom: 8px; }
.row { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0; }
.row b { font-weight: 700; }
.pill { font-size: 10px; padding: 1px 7px; border-radius: 999px; }
.red { background: rgba(239, 68, 68, 0.25); color: #ffb4b4; }
.amber { background: rgba(255, 179, 0, 0.2); color: #ffd98a; }
.green { background: rgba(52, 211, 153, 0.2); color: #9cf0cf; }
.sos { margin-top: 6px; text-align: center; background: #d32f2f; border-radius: 12px; padding: 8px; font-weight: 800; }
/* floating cards around the phone, at different depths */
.float { position: absolute; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.92); color: #141a33; font-weight: 700; font-size: 13px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); white-space: nowrap; animation: bob 5s ease-in-out infinite; }
.float small { display: block; font-weight: 500; color: #5b6475; }
.f1 { top: 40px; left: -150px; transform: translateZ(120px); }
.f2 { top: 210px; right: -170px; transform: translateZ(160px); animation-delay: -1.5s; }
.f3 { bottom: 70px; left: -130px; transform: translateZ(90px); animation-delay: -3s; }
.f4 { bottom: -10px; right: -120px; transform: translateZ(140px); animation-delay: -2s; }
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: -14px; } }
@media (max-width: 560px) {
  .scene { height: 500px; }
  .rig { transform: scale(0.82) rotateY(-14deg) rotateX(6deg); animation: none; }
  .float { font-size: 11px; padding: 8px 10px; }
  .f1, .f3 { left: -40px; } .f2, .f4 { right: -40px; }
  .hero h1 { font-size: 34px; }
}

/* ---------- features ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transform-style: preserve-3d; transition: transform 0.2s ease, border-color 0.2s; }
.card:hover { border-color: rgba(159, 180, 255, 0.5); }
.card .ic { font-size: 30px; display: block; margin-bottom: 8px; transform: translateZ(30px); }
.card h3 { font-size: 19px; }
.card p, .card li { color: var(--muted); font-size: 15px; }
.card ul { padding-left: 18px; margin: 8px 0 0; }

/* ---------- 3D cube ---------- */
.cube-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.cube-scene { perspective: 1000px; height: 320px; display: grid; place-items: center; }
.cube { width: 220px; height: 220px; position: relative; transform-style: preserve-3d; animation: spin 16s linear infinite; }
.cube div { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; padding: 18px; border-radius: 22px; font-weight: 800; font-size: 18px; background: linear-gradient(135deg, #5b7cff, #8b5cff); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.15); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cube div span { display: block; font-size: 44px; }
.cube .c1 { transform: translateZ(110px); }
.cube .c2 { transform: rotateY(90deg) translateZ(110px); }
.cube .c3 { transform: rotateY(180deg) translateZ(110px); }
.cube .c4 { transform: rotateY(-90deg) translateZ(110px); }
.cube .c5 { transform: rotateX(90deg) translateZ(110px); }
.cube .c6 { transform: rotateX(-90deg) translateZ(110px); }
@keyframes spin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@media (max-width: 900px) { .cube-wrap { grid-template-columns: 1fr; } }

/* ---------- personas / steps ---------- */
.steps { counter-reset: s; display: grid; gap: 14px; margin-top: 28px; }
.step { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step::before { counter-increment: s; content: counter(s); width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.step p { color: var(--muted); margin: 4px 0 0; }

.langs { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.langs span { font-size: 20px; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }

.privacy { background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(91, 124, 255, 0.1)); border: 1px solid var(--line); border-radius: 28px; padding: 36px; }
.store { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.store .btn { min-width: 220px; justify-content: center; }
.soon { font-size: 12px; color: var(--gold); }

/* ---------- docs pages ---------- */
.doc { max-width: 860px; margin: 0 auto; padding: 40px 16px 72px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc p, .doc li { color: #d3d9f5; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.doc th { background: rgba(255, 255, 255, 0.06); }
.ok { color: var(--good); font-weight: 700; }
.note { background: var(--card); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 10px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
