/* ============================================================
   Safew — Official Download Site
   Design: deep night-purple base + purple→cyan gradient accent
   ============================================================ */

/* ---------- Tokens — unified deep night-purple palette ---------- */
:root {
  --bg: #07060f;
  --bg-elev: #0e0b1f;
  --bg-card: #14102a;
  --border: rgba(167, 139, 250, 0.10);
  --border-strong: rgba(167, 139, 250, 0.22);

  --text: #eceaf7;
  --text-muted: #948fb0;
  --text-dim: #6b6688;

  --brand: #7c5cff;
  --brand-deep: #5b21b6;
  --brand-soft: #a78bfa;
  --brand-glow: rgba(124, 92, 255, 0.45);
  --grad: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --shadow-glow: 0 0 60px rgba(124, 92, 255, 0.35);
  --font-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(124, 92, 255, 0.5); }
.btn-ghost {
  background: rgba(167, 139, 250, 0.06);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: rgba(167, 139, 250, 0.12); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 8, 18, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(124, 92, 255, 0.45));
}
.nav-links {
  display: flex; gap: 32px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; display: block;
  width: 20px; height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.25s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.22) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #c4b5fd;
  font-size: 13px; font-weight: 500;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-soft);
  box-shadow: 0 0 10px var(--brand-soft);
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 20px 0 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art {
  position: relative;
  text-align: center;
}
.hero-art img {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  filter: drop-shadow(0 30px 60px rgba(124, 92, 255, 0.45));
}

/* Stats strip */
.stats {
  position: relative; z-index: 1;
  margin-top: 70px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-num {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* ---------- Section shell ---------- */
section { padding: 100px 0; position: relative; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p { font-size: 17px; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 32px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.4);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.14);
  display: grid; place-items: center;
  margin-bottom: 20px;
  color: #c4b5fd;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; margin: 0; }

/* ---------- Showcase (product shots) ---------- */
.showcase {
  background: linear-gradient(180deg, transparent 0%, rgba(124, 92, 255, 0.05) 50%, transparent 100%);
}
.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}
.showcase-row:last-child { margin-bottom: 0; }
.showcase-row.flip .showcase-text { order: 2; }
.showcase-row.flip .showcase-art { order: 1; }
.showcase-art {
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.showcase-art img { width: 100%; height: auto; }
.showcase-text h3 { font-size: 1.6rem; margin-bottom: 14px; }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; }
.check-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 15px;
}
.check-list .tick {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.15);
  color: var(--brand-soft);
  display: grid; place-items: center;
  margin-top: 2px;
}
.check-list .tick svg { width: 12px; height: 12px; }

/* ---------- Security band ---------- */
.security {
  position: relative;
  background:
    radial-gradient(ellipse at top left, rgba(124, 92, 255, 0.12), transparent 60%),
    var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.security-img {
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--border);
}
.security-points {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.sec-point {
  display: flex; gap: 16px;
  padding: 18px;
  background: rgba(167, 139, 250, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
}
.sec-point .ic {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff;
}
.sec-point .ic svg { width: 20px; height: 20px; }
.sec-point h4 { margin: 0 0 4px; font-size: 15px; }
.sec-point p { margin: 0; font-size: 14px; }

/* ---------- Download ---------- */
.download-card {
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 92, 255, 0.28), transparent 55%),
    radial-gradient(circle at 80% 100%, rgba(91, 33, 182, 0.35), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-l);
  padding: 60px 40px;
  text-align: center;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.dl-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px;
  background: rgba(167, 139, 250, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  color: var(--text);
  font-size: 14px; font-weight: 600;
}
.dl-tile:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  background: rgba(124, 92, 255, 0.1);
}
.dl-tile svg { width: 28px; height: 28px; color: var(--text); }
.dl-tile small { color: var(--text-dim); font-weight: 400; font-size: 12px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0;
  font-size: 16.5px; font-weight: 600;
  color: var(--text);
  text-align: left;
}
.faq-q .chev {
  transition: transform 0.25s;
  color: var(--text-muted);
  flex-shrink: 0; margin-left: 16px;
}
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a p { padding: 0 0 22px; margin: 0; font-size: 15px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 14px; max-width: 280px; margin-top: 14px; }
.footer-col h5 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin: 0 0 16px; font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--text-dim);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .showcase-row,
  .security-grid { grid-template-columns: 1fr; gap: 36px; }
  .showcase-row.flip .showcase-text { order: 1; }
  .showcase-row.flip .showcase-art { order: 2; }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}

@media (max-width: 680px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 20px var(--gutter);
    gap: 18px;
  }
  section { padding: 70px 0; }
  .hero { padding: 130px 0 60px; }
  .features { grid-template-columns: 1fr; }
  .download-card { padding: 40px 22px; }
  .download-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
