/* ---------- Tokens ---------- */
:root {
  --bg: #FAFBFF;
  --surface: #FFFFFF;
  --border: #E7E9F5;
  --text: #14181F;
  --text-muted: #6B7280;
  --accent: #5B5FEF;
  --accent-dark: #4548C9;
  --accent-soft: #EEEEFE;
  --success: #17B978;
  --success-soft: #E7FBF3;
  --warn: #FF6B4A;
  --warn-soft: #FFEDE7;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(38, 42, 90, 0.18);
  --font-display: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 251, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8B8FFF);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(91, 95, 239, 0.55);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.65; cursor: progress; transform: none; }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 76px 0 56px; }

.hero-inner { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.02em;
}

h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hl { color: var(--accent); }

.hero-sub {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--text-muted);
  font-size: 16.5px;
}

/* ---------- Download box ---------- */
.download-box {
  max-width: 640px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-row {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.input-row:focus-within { border-color: var(--accent); }

.input-icon { color: var(--text-muted); display: flex; }

#url-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 15.5px;
  padding: 12px 8px;
  background: transparent;
  color: var(--text);
  min-width: 0;
}

.platform-chip {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  margin-right: 6px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-icon {
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-icon:hover { background: var(--accent-soft); color: var(--accent-dark); }

.submit-btn { padding: 15px 22px; font-size: 16px; }

.status-area {
  min-height: 22px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
}
.status-area.error { color: #D9414E; }
.status-area.loading { color: var(--text-muted); }

/* ---------- Result card ---------- */
.result-card {
  max-width: 640px;
  margin: 26px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  gap: 16px;
  text-align: left;
  animation: rise 0.35s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-thumb {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.result-thumb img { width: 100%; height: 100%; object-fit: cover; display: none; }
.thumb-fallback { font-size: 30px; }

.result-body { flex: 1; min-width: 0; }

.result-platform {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
}

.result-body h3 {
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-meta {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
}
.result-links a:hover { filter: brightness(0.95); }

/* ---------- Platforms grid ---------- */
.platforms { padding: 64px 0 20px; }
.platforms h2, .how-to h2, .contact h2 { font-size: 30px; font-weight: 800; text-align: center; }
.section-sub { text-align: center; color: var(--text-muted); margin: 10px 0 26px; }
.soon-label { margin-top: 34px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.chip-grid.muted .chip {
  color: var(--text-muted);
  background: transparent;
  border-style: dashed;
}
.chip-grid.muted .dot { background: var(--text-muted); }

/* ---------- How to ---------- */
.how-to { padding: 70px 0; }

.steps {
  list-style: none;
  margin: 34px auto 0;
  padding: 0;
  max-width: 720px;
  display: grid;
  gap: 22px;
}

.steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.step-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-family: var(--font-mono);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps h3 { font-size: 16px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

/* ---------- Contact ---------- */
.contact { padding: 60px 0 80px; }

.contact-inner {
  background: linear-gradient(135deg, var(--accent), #7A7EF5);
  border-radius: 28px;
  padding: 46px 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.contact-inner h2 { color: #fff; text-align: left; font-size: 26px; }
.contact-inner p { margin: 8px 0 0; opacity: 0.9; }

.contact-links { display: flex; gap: 10px; flex-wrap: wrap; }

.contact-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.contact-pill:hover { background: rgba(255,255,255,0.28); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; }
.footer-inner { text-align: center; font-size: 13px; color: var(--text-muted); }

@media (max-width: 640px) {
  .contact-inner { flex-direction: column; text-align: center; }
  .contact-inner h2 { text-align: center; }
  .input-row { flex-wrap: wrap; border-radius: var(--radius-md); }
  #url-input { order: 1; width: 100%; }
  .platform-chip { order: 2; }
  .btn-icon { order: 3; }
}
