@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0d0d0d;
  --ink-soft: #5a5a5f;
  --ink-faint: #9a9a9f;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --border: #e6e7ea;
  --accent: #1A6BCC;
  --accent-hover: #1558B0;
  --accent-soft: #eaf1fb;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px;
  padding: 13px 24px; border-radius: 10px;
  border: none; cursor: pointer; font-family: inherit;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; transition: color .3s ease .03s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(26,107,204,.25); }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--border); transition: color .3s ease .03s, border-color .18s ease; }
.btn-outline:hover { border-color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; transition: color .3s ease .03s; }
.btn-dark:hover { transform: translateY(-2px); }
.btn-fill {
  position: absolute; left: var(--fx,50%); top: var(--fy,50%);
  width: 0; height: 0; border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width .5s cubic-bezier(.4,0,.2,1), height .5s cubic-bezier(.4,0,.2,1);
  z-index: 0; pointer-events: none;
}
.btn-label { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary .btn-fill { background: #fff; }
.btn-primary:hover .btn-fill { width: 260px; height: 260px; }
.btn-primary:hover { color: var(--accent); }
.btn-dark .btn-fill { background: #fff; }
.btn-dark:hover .btn-fill { width: 260px; height: 260px; }
.btn-dark:hover { color: var(--ink); }
.arrow { display: inline-block; transition: transform .18s ease; }
.btn:hover .arrow, .text-link:hover .arrow { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .btn-fill { transition: none !important; } }

.text-link { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Loading bar ---------- */
.page-loading-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--accent); z-index: 9999;
  transition: width .3s ease, opacity .3s ease; opacity: 1;
}
.page-loading-bar.done { opacity: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 22px 32px;
  display: flex; align-items: center; gap: 48px;
}
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.brand img { height: 22px; width: auto; }
.main-nav { display: flex; gap: 30px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions .text-link { color: var(--ink-soft); font-weight: 600; }
.header-actions .text-link:hover { color: var(--ink); }
.header-actions .btn-dark { padding: 10px 18px; font-size: 13.5px; border-radius: 8px; }
.nav-toggle { display: none; }

.header-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
}

/* ---------- Hero ---------- */
.hero { padding: 130px 32px 0; }
.hero-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 80px; align-items: start;
}
.hero-copy h1 {
  font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1.16; margin-bottom: 28px;
}
.hero-copy p {
  font-size: 16.5px; line-height: 1.7; color: var(--ink-soft); max-width: 460px; margin: 0 0 38px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats { display: flex; gap: 56px; }
.hero-stat strong { display: block; font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.hero-stat span { font-size: 13.5px; color: var(--ink-faint); }

/* Uploads card */
.uploads-card {
  border: 1px solid var(--border); border-radius: 20px; padding: 34px;
  box-shadow: 0 20px 50px rgba(13,13,13,.06);
}
.uploads-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.uploads-head h3 { font-size: 15px; font-weight: 700; }
.uploads-head .text-link { color: var(--accent); font-size: 13.5px; }
.upload-row { display: flex; align-items: center; gap: 16px; padding: 17px 0; border-top: 1px solid var(--border); }
.upload-row:first-of-type { border-top: none; padding-top: 0; }
.upload-icon {
  width: 40px; height: 40px; border-radius: 11px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--ink-soft);
}
.upload-info { flex: 1; min-width: 0; }
.upload-info strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.upload-info span { font-size: 12.5px; color: var(--ink-faint); }
.upload-dl { color: var(--ink-faint); flex-shrink: 0; cursor: pointer; transition: color .15s ease; }
.upload-dl:hover { color: var(--accent); }

.uploads-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.avatar-stack { display: flex; }
.avatar-stack span {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff;
  background: var(--bg-alt); margin-left: -8px; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--ink-soft);
}
.avatar-stack span:first-child { margin-left: 0; }
.avatar-stack .more { background: var(--accent); color: #fff; }
.viewers-note { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- Mission section ---------- */
.mission { background: var(--bg-alt); padding: 160px 32px; margin-top: 120px; }
.mission-inner { max-width: var(--max); margin: 0 auto; text-align: center; }
.mission h2 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 800; margin-bottom: 20px; }
.mission-sub { font-size: 16px; color: var(--ink-soft); margin-bottom: 70px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: left; }
.feature-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 36px 32px;
  display: flex; flex-direction: column;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 36px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 13px; }
.feature-card p { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 32px; flex-grow: 1; }
.feature-num { font-size: 13px; font-weight: 700; color: var(--accent); padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------- File preview mockup ---------- */
.preview-wrap { max-width: 920px; margin: 110px auto 0; padding: 0 32px; }
.preview-frame {
  background: var(--ink); border-radius: 28px; padding: 16px;
  box-shadow: 0 40px 80px rgba(13,13,13,.18);
}
.preview-inner {
  background: #fff; border-radius: 18px; display: grid; grid-template-columns: 210px 1fr; min-height: 400px; overflow: hidden;
}
.preview-side { background: var(--bg-alt); padding: 26px 20px; display: flex; flex-direction: column; gap: 12px; }
.skeleton-line { height: 36px; border-radius: 9px; background: #e2e4e9; }
.skeleton-line.active { background: var(--ink); }
.preview-main { padding: 44px 46px; }
.preview-main-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.preview-main-head h3 { font-size: 19px; font-weight: 700; }
.preview-icon-btn {
  width: 35px; height: 35px; border-radius: 9px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; margin-left: 8px; color: var(--ink-soft);
}
.preview-file-id { font-family: monospace; font-size: 12px; color: var(--ink-faint); margin-bottom: 34px; }
.preview-skel { height: 12px; border-radius: 6px; background: var(--bg-alt); margin-bottom: 15px; }
.preview-stat-box {
  margin-top: 32px; background: var(--accent-soft); border: 1px solid #cddcf3; border-radius: 14px; padding: 22px;
}
.preview-stat-box .tag {
  display: inline-flex; width: 22px; height: 22px; border-radius: 5px; background: var(--accent);
  color: #fff; font-size: 10px; font-weight: 800; align-items: center; justify-content: center; margin-right: 8px;
}
.preview-stat-box .skel-bar { height: 9px; border-radius: 5px; background: #c3d5ee; margin-top: 14px; }

/* ---------- Ecosystem section ---------- */
.ecosystem { padding: 160px 32px 0; }
.ecosystem-inner { max-width: var(--max); margin: 0 auto; }
.ecosystem h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; margin-bottom: 46px; }

.community-card {
  background: var(--ink); color: #fff; border-radius: 22px; padding: 60px 56px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.community-icon {
  width: 54px; height: 54px; border-radius: 13px; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 32px; color: #fff;
}
.community-card h3 { font-size: 25px; font-weight: 800; margin-bottom: 16px; }
.community-card p { font-size: 15.5px; line-height: 1.7; color: rgba(255,255,255,.65); max-width: 520px; margin: 0 0 34px; }
.community-card .text-link { color: #fff; }

/* ---------- Avar collab footer intro ---------- */
.collab-strip { padding: 140px 32px 0; }
.collab-inner {
  max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 40px; flex-wrap: wrap; padding-bottom: 60px; border-bottom: 1px solid var(--border);
}
.collab-logo img { height: 30px; width: auto; }
.collab-text { max-width: 460px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Footer ---------- */
.site-footer { padding: 0 32px 56px; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding-top: 70px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.footer-brand img { height: 22px; }
.footer-tagline { font-size: 13.5px; color: var(--ink-faint); max-width: 280px; line-height: 1.65; }
.footer-col h4 { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 20px; color: var(--ink); }
.footer-col a { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  max-width: var(--max); margin: 56px auto 0; padding-top: 30px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: var(--ink-faint); margin: 0; }
.footer-icons { display: flex; gap: 10px; }
.footer-icons a {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .preview-inner { grid-template-columns: 1fr; }
  .preview-side { flex-direction: row; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; margin-bottom: 10px; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .header-actions .text-link { display: none; }
  .hero { padding: 50px 20px 0; }
  .mission, .ecosystem, .collab-strip { padding-left: 20px; padding-right: 20px; }
  .community-card { padding: 32px 26px; }
  .collab-inner { flex-direction: column; align-items: flex-start; }
}
