/* ViewWork — homepage styles
 *
 * Single CSS file for the public site. Mobile-first, dark-mode-first to match the app.
 * Variables align with the Electron renderer (src/styles/index.css) so screenshots and
 * marketing site share the same accent palette.
 */

:root {
  --bg-base: #0b0e14;
  --bg-surface: #11151d;
  --bg-elevated: #1a1f2a;
  --bg-hover: #222936;
  --border-subtle: #2a3142;
  --border-default: #384154;
  --text-primary: #e6eaf2;
  --text-secondary: #9aa4b8;
  --text-muted: #5c667a;
  --accent: #5b8def;
  --accent-glow: #7aaeff;
  --accent-warning: #f5a623;
  --accent-success: #3ddc84;
  --accent-danger: #ff4d6d;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Pretendard",
    "Noto Sans KR", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-base);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(91, 141, 239, 0.18), transparent 70%),
    radial-gradient(ellipse 70% 50% at 90% 110%, rgba(167, 139, 250, 0.12), transparent 70%),
    var(--bg-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-glow);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ─── header ─────────────────────────────────────────────── */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11, 14, 20, 0.72);
  border-bottom: 1px solid var(--border-subtle);
}
header.site-header .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.logo .mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 14px rgba(91, 141, 239, 0.4);
}
.logo .name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.logo .ver {
  margin-left: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
nav.primary {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
nav.primary a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}
nav.primary a:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}
nav.primary a.lang {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  border: 1px solid var(--border-subtle);
}
nav.primary a.lang.active {
  border-color: var(--accent);
  color: var(--accent-glow);
}

/* ─── hero ───────────────────────────────────────────────── */
section.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #e6eaf2 0%, #7aaeff 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .tagline {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.55;
}
.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4c7ddf);
  color: white;
  box-shadow: 0 4px 18px rgba(91, 141, 239, 0.45);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(91, 141, 239, 0.6);
  text-decoration: none;
}
.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  text-decoration: none;
}
.btn .mono {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.7;
}

/* ─── hero screenshot ────────────────────────────────────── */
.hero-shot {
  margin: 56px auto 0;
  max-width: 1100px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  background: var(--bg-surface);
}
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-shot.placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(91, 141, 239, 0.2), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(167, 139, 250, 0.15), transparent 60%),
    var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  flex-direction: column;
  gap: 8px;
}

/* ─── section common ────────────────────────────────────── */
section.block {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}
section.block h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
section.block .lead {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 720px;
  line-height: 1.6;
  margin: 0 0 40px;
}

/* ─── feature grid ──────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.feature .icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 141, 239, 0.12);
  color: var(--accent-glow);
  font-size: 18px;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}
.feature p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 14px;
}

/* ─── how it works (steps) ──────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  counter-reset: step-counter;
}
.step {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px 20px;
  position: relative;
}
.step::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.25;
}
.step h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}
.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

/* ─── screenshot row ────────────────────────────────────── */
.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.screenshot {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
}
.screenshot img,
.screenshot .placeholder-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(91, 141, 239, 0.06) 0,
      rgba(91, 141, 239, 0.06) 10px,
      transparent 10px,
      transparent 20px
    ),
    var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
}
.screenshot .caption {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
}

/* ─── download section ──────────────────────────────────── */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.dl-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.dl-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.dl-card .platform {
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.dl-card h3 {
  font-size: 18px;
  margin: 0 0 14px;
}
.dl-card .ver-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  font-family: var(--font-mono);
}

/* ─── patch notes ───────────────────────────────────────── */
.release-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.release {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px 24px;
}
.release-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.release-head .ver {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-glow);
}
.release-head .date {
  font-size: 12px;
  color: var(--text-muted);
}
.release-head .badge {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(61, 220, 132, 0.15);
  color: var(--accent-success);
}
.release-head .badge.draft {
  background: rgba(245, 166, 35, 0.15);
  color: var(--accent-warning);
}
.release-body {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.release-body ul {
  margin: 0;
  padding-left: 22px;
}
.release-body li {
  margin: 4px 0;
}
.release-body code {
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--accent-glow);
}

/* ─── footer ────────────────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--border-subtle);
  margin-top: 64px;
  padding: 48px 24px 32px;
  background: rgba(11, 14, 20, 0.6);
}
footer.site-footer .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 14px;
  font-weight: 600;
}
footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
footer ul li {
  margin: 6px 0;
}
footer ul li a {
  color: var(--text-secondary);
  font-size: 14px;
}
footer ul li a:hover {
  color: var(--text-primary);
}
footer .copyright {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── inline kbd ─────────────────────────────────────────── */
kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

/* ─── small screens ─────────────────────────────────────── */
@media (max-width: 640px) {
  header.site-header .inner {
    flex-wrap: wrap;
  }
  nav.primary {
    width: 100%;
  }
  section.hero {
    padding-top: 56px;
  }
}
