/* ============================================================
   OpenSave — website styles
   Themed to match the app exactly: neutral near-black surfaces,
   #8a63f4 accent, rounded cards + pills (Hydra-launcher lineage).
   ============================================================ */

:root {
  /* surfaces — identical tokens to the app's app.css */
  --bg: #0c0c0d;
  --bg-sidebar: #111112;
  --bg-raised: #17171a;
  --bg-hover: #1f1f23;
  --bg-active: #26262b;
  --border: #232328;
  --border-strong: #303038;

  /* card elevation for the marketing surfaces */
  --card: #141416;
  --card-hover: #191920;

  /* text */
  --text: #e8e8ea;
  --text-secondary: #9a9aa3;
  --text-dim: #5e5e66;

  /* accent — the app's violet */
  --accent: #8a63f4;
  --accent-hover: #9b7af7;
  --accent-soft: rgba(138, 99, 244, 0.14);
  --accent-line: rgba(138, 99, 244, 0.32);
  --grad: linear-gradient(135deg, #9b7af7 0%, #7346e6 100%);

  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #d95757;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --ease: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent-hover); text-decoration: none; transition: var(--ease); }
a:hover { color: #b8a0ff; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  color: #c9b6ff;
}

/* ---------- ambient glows (subtle — the app is neutral) ---------- */
.ambient-glow { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(10px); }
.glow-1 { width: 820px; height: 820px; background: radial-gradient(circle, rgba(138,99,244,0.16) 0%, transparent 60%); top: -340px; right: -220px; }
.glow-2 { width: 700px; height: 700px; background: radial-gradient(circle, rgba(115,70,230,0.10) 0%, transparent 62%); top: 44%; left: -320px; }

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 12, 13, 0.74);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 28px; width: auto; object-fit: contain; border-radius: 7px; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text); letter-spacing: -0.02em; }
.logo-text span { color: var(--accent-hover); }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links > a {
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
}
.nav-links > a:hover { color: var(--text); background: var(--bg-hover); }
.github-link {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px !important;
  padding: 7px 14px !important;
  color: var(--text) !important;
  margin-left: 4px;
}
.github-link:hover { border-color: var(--accent-line); background: var(--accent-soft) !important; }
.nav-cta {
  background: var(--grad);
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  box-shadow: 0 6px 20px rgba(115, 70, 230, 0.35);
}
.nav-cta:hover { background: var(--grad) !important; filter: brightness(1.08); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--ease); }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  padding: 12px 24px;
  transition: var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(115, 70, 230, 0.38); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(115, 70, 230, 0.5); color: #fff; }
.btn-secondary { background: var(--bg-raised); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent-line); color: var(--text); transform: translateY(-2px); }
.btn-ghost { color: var(--text-secondary); padding: 12px 8px; }
.btn-ghost:hover { color: var(--accent-hover); }

/* ---------- hero ---------- */
.hero { position: relative; z-index: 1; padding: 132px 24px 32px; }
.hero-container { max-width: 900px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 24px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title { font-size: clamp(40px, 6vw, 66px); font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 22px; }
.hero-title span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: 18px; color: var(--text-secondary); max-width: 620px; margin: 0 auto 32px; }
.hero-subtitle strong { color: var(--text); font-weight: 600; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-container > .hero-ctas { justify-content: center; }
.hero-ctas.center { justify-content: center; }
.hero-meta { margin-top: 18px; font-size: 13.5px; color: var(--text-dim); }
.hero-meta a { color: var(--text-secondary); }
.hero-meta a:hover { color: var(--accent-hover); }

/* real app screenshot in a window frame */
.hero-shot {
  max-width: 1080px;
  margin: 56px auto 0;
  position: relative;
  z-index: 1;
}
.hero-shot::after {
  /* soft floor glow under the window */
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -40px; height: 120px;
  background: radial-gradient(ellipse at center, rgba(138,99,244,0.28) 0%, transparent 70%);
  filter: blur(30px); z-index: -1;
}
.app-window {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-sidebar);
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.win-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-sidebar); border-bottom: 1px solid var(--border); }
.win-dots { display: flex; gap: 7px; }
.win-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-active); }
.win-dots span:nth-child(1) { background: #e05561; }
.win-dots span:nth-child(2) { background: #e0a03a; }
.win-dots span:nth-child(3) { background: #4ea85a; }
.win-title { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; }
.app-window img { display: block; width: 100%; height: auto; }

/* stats strip */
.stats-strip {
  max-width: var(--maxw);
  margin: 88px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative; z-index: 1;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
}
.stat-num { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- sections ---------- */
.section { position: relative; z-index: 1; padding: 96px 24px; }
.section-tinted { background: var(--bg-sidebar); border-block: 1px solid var(--border); }
.section-container { max-width: var(--maxw); margin: 0 auto; }
.section-container.narrow { max-width: 760px; }
.section-container.center { text-align: center; }

.section-heading { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent-hover);
  margin-bottom: 16px;
}
.section-heading h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; line-height: 1.15; }
.section-sub { font-size: 17px; color: var(--text-secondary); margin-top: 14px; }

/* ---------- showcase ---------- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.shot-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--ease);
}
.shot-card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.5fr 1fr; align-items: stretch; }
.shot-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: 0 20px 44px -22px rgba(0,0,0,0.8); }
.shot-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; cursor: zoom-in; background: var(--bg); }
.shot-card:not(.wide) img { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--border); }
.shot-card.wide img { border-right: 1px solid var(--border); max-height: 460px; }
.shot-card figcaption { padding: 22px 24px; }
.shot-card.wide figcaption { align-self: center; }
.shot-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.shot-card p { font-size: 14.5px; color: var(--text-secondary); }
.shot-card p strong { color: var(--text); }

/* ---------- why ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.why-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 28px; }
.why-card.bad { border-color: rgba(217, 87, 87, 0.22); }
.why-card.good { border-color: rgba(74, 222, 128, 0.24); }
.why-card h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; margin-bottom: 18px; }
.why-mark { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; }
.why-card.bad .why-mark { background: rgba(217, 87, 87, 0.16); color: #f08a8a; }
.why-card.good .why-mark { background: rgba(74, 222, 128, 0.14); color: var(--ok); }
.why-card ul { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.why-card li { position: relative; padding-left: 26px; font-size: 15px; color: var(--text-secondary); }
.why-card li::before { position: absolute; left: 0; top: 1px; font-size: 14px; }
.why-card.bad li::before { content: "✕"; color: #d95757; }
.why-card.good li::before { content: "✓"; color: var(--ok); }
.why-card li em { color: var(--text); font-style: normal; font-weight: 600; }

/* ---------- features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 24px; transition: var(--ease); }
.feature-card:hover { background: var(--card-hover); border-color: var(--accent-line); transform: translateY(-3px); }
.feature-icon {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.feature-card strong, .feature-card em { color: var(--text); font-style: normal; font-weight: 600; }

/* ---------- how it works ---------- */
.how-steps { display: flex; align-items: stretch; gap: 8px; margin-bottom: 40px; flex-wrap: wrap; justify-content: center; }
.how-step { flex: 1; min-width: 190px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 22px; }
.how-num { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; border-radius: 9px; background: var(--grad); color: #fff; margin-bottom: 14px; }
.how-step h3 { font-size: 17px; font-weight: 600; margin-bottom: 7px; }
.how-step p { font-size: 13.5px; color: var(--text-secondary); }
.how-arrow { display: flex; align-items: center; color: var(--accent); font-size: 22px; font-weight: 700; }

.arch-panel { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: center; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.arch-diagram svg { width: 100%; height: auto; display: block; }
.arch-diagram .d-box { fill: var(--bg); stroke: var(--border-strong); stroke-width: 1.5; }
.arch-diagram .r-box { fill: var(--accent-soft); stroke: var(--accent-line); stroke-width: 1.5; }
.arch-diagram .d-title { fill: var(--text); font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.arch-diagram .d-row { fill: var(--text-secondary); font-family: var(--font-mono); font-size: 14px; }
.arch-diagram .r-title { fill: var(--text); font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.arch-diagram .r-sub { fill: var(--text-secondary); font-family: var(--font-sans); font-size: 12.5px; }
.arch-diagram .wire { stroke: var(--accent); stroke-width: 2; }
.arch-diagram .wire-label { fill: var(--accent-hover); font-family: var(--font-mono); font-size: 12.5px; }
.arch-diagram .wan-chip { fill: var(--bg-raised); stroke: var(--border); stroke-width: 1; }
.arch-notes h3 { font-size: 20px; margin-bottom: 12px; }
.arch-notes p { font-size: 14.5px; color: var(--text-secondary); margin-bottom: 12px; }
.arch-notes strong { color: var(--text); }

/* ---------- open source ---------- */
.oss-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.oss-text h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 16px; }
.oss-text > p { font-size: 16px; color: var(--text-secondary); margin-bottom: 20px; }
.oss-text strong { color: var(--text); }
.oss-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; }
.oss-list li { position: relative; padding-left: 26px; font-size: 14.5px; color: var(--text-secondary); }
.oss-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

.oss-terminal { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); overflow: hidden; background: #0a0a0b; box-shadow: 0 30px 70px -30px rgba(0,0,0,0.9); }
.terminal-body { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; padding: 18px 20px; color: var(--text-secondary); overflow-x: auto; }
.t-prompt { color: var(--accent-hover); }
.t-ok { color: var(--ok); }
.t-sync { color: var(--warn); }

/* ---------- download ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dl-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; text-align: center; transition: var(--ease); display: flex; flex-direction: column; align-items: center; }
.dl-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.dl-os { font-size: 40px; margin-bottom: 14px; }
.dl-card h3 { font-size: 21px; font-weight: 600; margin-bottom: 8px; }
.dl-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 22px; flex: 1; }
.dl-card .btn-primary, .dl-card .btn-secondary { width: 100%; }
.dl-choices { display: flex; gap: 10px; width: 100%; }
.dl-choices .btn-primary, .dl-choices .btn-secondary { flex: 1; flex-direction: column; gap: 1px; padding: 11px 12px; line-height: 1.15; }
.dl-sub { font-family: var(--font-sans); font-weight: 400; font-size: 11px; opacity: 0.72; }
.dl-note { font-size: 12px; color: var(--text-dim); margin-top: 12px; font-family: var(--font-mono); }
.dl-upgrade { text-align: center; margin-top: 34px; font-size: 14.5px; color: var(--text-secondary); max-width: 720px; margin-inline: auto; }
.dl-upgrade strong { color: var(--text); }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 22px; font-family: var(--font-display); font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 400; transition: var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-item p { padding: 16px 22px 20px; font-size: 14.5px; color: var(--text-secondary); }
.faq-item em { color: var(--text); font-style: italic; }

/* ---------- footer cta ---------- */
.footer-cta { text-align: center; }
.footer-cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.footer-cta .section-sub { margin-bottom: 30px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 24px; background: var(--bg-sidebar); }
.footer-container { max-width: var(--maxw); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--text-secondary); font-size: 14px; }
.footer-links a:hover { color: var(--accent-hover); }
.footer-note { width: 100%; font-size: 13px; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 20px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 40px; background: rgba(6, 6, 8, 0.92); backdrop-filter: blur(8px); cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px rgba(0,0,0,0.7); }
.lightbox-close { position: absolute; top: 22px; right: 26px; background: var(--bg-raised); border: 1px solid var(--border-strong); color: var(--text); width: 40px; height: 40px; border-radius: 10px; font-size: 16px; cursor: pointer; }
.lightbox-close:hover { background: var(--bg-hover); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .oss-panel, .arch-panel, .shot-card.wide { grid-template-columns: 1fr; }
  .shot-card.wide img { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .how-arrow { transform: rotate(90deg); }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 60px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-sidebar); border-bottom: 1px solid var(--border);
    padding: 14px 20px 20px;
    transform: translateY(-140%); transition: var(--ease); z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links > a { padding: 12px; }
  .github-link, .nav-cta { margin: 4px 0 0 !important; justify-content: center; }
  .nav-toggle { display: flex; }
  .section { padding: 72px 20px; }
  .hero { padding: 116px 20px 24px; }
  .showcase-grid, .why-grid, .dl-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; margin-top: 60px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn-primary, .hero-ctas .btn-secondary { width: 100%; }
  .footer-container { flex-direction: column; align-items: flex-start; }
}
