/* StitchDrop website. No build step: plain CSS, system fonts. */

:root {
  --accent: #d6336c;
  --ink: #1d1d1f;
  --ink-2: #515154;
  --ink-3: #86868b;
  --bg: #fbfbfd;
  --bg-2: #f2f1f4;
  --card: #ffffff;
  --line: rgba(0, 0, 0, 0.08);
  --ok: #30a46c;
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #ff5c8d;
    --ink: #f5f5f7;
    --ink-2: #c7c7cc;
    --ink-3: #8e8e93;
    --bg: #111114;
    --bg-2: #1b1b1f;
    --card: #1f1f24;
    --line: rgba(255, 255, 255, 0.1);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; }
.brand:hover { text-decoration: none; }

.site-header nav { display: flex; gap: clamp(12px, 2.4vw, 28px); align-items: center; font-size: 0.95rem; }
.site-header nav a { color: var(--ink-2); }
.site-header nav a.nav-download {
  color: #fff;
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.site-header nav a:hover { text-decoration: none; color: var(--ink); }
.site-header nav a.nav-download:hover { color: #fff; filter: brightness(1.08); }
@media (max-width: 560px) {
  .site-header nav a:not(.nav-download) { display: none; }
}

main > section { padding: clamp(28px, 4vw, 48px) clamp(20px, 5vw, 64px); max-width: 1200px; margin: 0 auto; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1.02rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button.primary {
  color: #fff;
  background: var(--accent);
}
.button.primary:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.06); }
.button.large { padding: 16px 30px; font-size: 1.12rem; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 28px; }
.cta-meta { color: var(--ink-3); font-size: 0.92rem; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(32px, 4vw, 56px) !important;
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .cta { justify-content: center; }
  .hero-icon { margin-inline: auto; }
}
.hero-icon { display: block; width: 112px; height: 112px; margin-bottom: 20px; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 34em; }
@media (max-width: 920px) { .hero .lede { margin-inline: auto; } }

/* ---------- The demo: a Mac desktop with StitchDrop's panel ---------- */

.demo { margin: 0; }
.desktop { text-align: left; }

/* The stage keeps the desktop's aspect ratio; the desktop is laid out at a
   fixed 720 × 600 and scaled to fit (see app.js). */
.stage { position: relative; width: 100%; aspect-ratio: 720 / 600; }

.desktop {
  --ui-bg: rgba(246, 245, 248, 0.92);
  --ui-ink: #1d1d1f;
  --ui-ink-2: #6e6e73;
  --ui-ink-3: #a1a1a6;
  --ui-fill: rgba(0, 0, 0, 0.045);
  --ui-fill-2: rgba(0, 0, 0, 0.07);
  --ui-line: rgba(0, 0, 0, 0.09);
  --ui-accent: #0a7aff;
  position: absolute;
  top: 0;
  left: 0;
  width: 720px;
  height: 600px;
  transform-origin: 0 0;
  border-radius: 22px;
  overflow: hidden;
  background: #f2d4df;
  box-shadow: 0 0 0 1px var(--line);
  font-size: 13px;
  line-height: 1.3;
  user-select: none;
  -webkit-user-select: none;
}
@media (prefers-color-scheme: dark) {
  .desktop {
    --ui-bg: rgba(40, 40, 46, 0.92);
    --ui-ink: #f5f5f7;
    --ui-ink-2: #a1a1a6;
    --ui-ink-3: #6e6e73;
    --ui-fill: rgba(255, 255, 255, 0.06);
    --ui-fill-2: rgba(255, 255, 255, 0.1);
    --ui-line: rgba(255, 255, 255, 0.1);
    --ui-accent: #3b94ff;
    background: #2c2230;
  }
}

.menubar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 28px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--ui-ink);
  font-size: 13px;
}
@media (prefers-color-scheme: dark) { .menubar { background: rgba(20, 20, 24, 0.45); } }
.mb-apple { width: 13px; height: 16px; fill: currentColor; }
.mb-app { font-weight: 700; }
.mb-spacer { flex: 1; }
.mb-status { width: 18px; height: 16px; fill: currentColor; display: inline-flex; }
.mb-status.stitchdrop {
  width: 30px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--ui-ink);
  transition: background 0.2s;
}
@media (prefers-color-scheme: dark) { .mb-status.stitchdrop { background: rgba(255, 255, 255, 0.18); } }
.mb-status.stitchdrop svg { width: 18px; height: 18px; }
.mb-clock { font-variant-numeric: tabular-nums; }

.desktop-file {
  position: absolute;
  left: 46px;
  top: 300px;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s;
}
.file-icon {
  width: 64px;
  height: 76px;
  border-radius: 6px 18px 6px 6px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  position: relative;
}
.file-icon::after {
  content: "PES";
  position: absolute;
  bottom: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #c2185b;
  text-shadow: none;
}
.file-icon svg { width: 46px; height: 46px; margin-bottom: 10px; }

/* The panel */
.popover {
  position: absolute;
  top: 40px;
  right: 34px;
  width: 360px;
  height: 520px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--ui-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.25);
  color: var(--ui-ink);
}
.popover::before {
  /* the arrow pointing up at the menu bar icon */
  content: "";
  position: absolute;
  top: -7px;
  left: var(--arrow-x, 280px);
  width: 16px;
  height: 16px;
  background: var(--ui-bg);
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
}

.pop-header {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--ui-line);
  position: relative;
}
.pop-header strong { font-size: 14px; }
.pop-glyph { width: 17px; height: 17px; color: var(--ui-ink); }
.pop-spacer { flex: 1; }
.pop-btn { width: 26px; height: 26px; padding: 4px; fill: none; stroke: var(--ui-ink-2); stroke-width: 1.6; stroke-linecap: round; }

.machine-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 12px;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--ui-fill-2);
}
.machine-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #30c15b; }
.mb-text { display: flex; flex-direction: column; flex: 1; }
.mb-text strong { font-size: 13px; font-weight: 600; }
.mb-text small { font-size: 11px; color: var(--ui-ink-2); }
.chev { width: 9px; height: 14px; fill: none; stroke: var(--ui-ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dropzone {
  position: relative;
  margin: 0 12px;
  height: 170px;
  border-radius: 12px;
  border: 1.5px dashed color-mix(in srgb, var(--ui-ink-2) 55%, transparent);
  background: var(--ui-fill);
  transition: background 0.15s, border-color 0.15s;
}
.dropzone[data-state="targeted"] {
  border: 2px solid var(--ui-accent);
  background: color-mix(in srgb, var(--ui-accent) 12%, transparent);
}
.dz {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.dropzone[data-state="idle"] .dz.idle,
.dropzone[data-state="targeted"] .dz.targeted,
.dropzone[data-state="sending"] .dz.sending,
.dropzone[data-state="sent"] .dz.sent { opacity: 1; transform: none; }
.dz svg { width: 32px; height: 32px; fill: none; stroke: var(--ui-ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 2px; }
.dz svg .fill { fill: var(--ui-accent); stroke: none; }
.dz svg .fill.ok { fill: #30c15b; }
.dz svg .on-fill { stroke: #fff; stroke-width: 2.4; }
.dz strong { font-size: 13px; font-weight: 600; }
.dz small { font-size: 11px; color: var(--ui-ink-2); max-width: 270px; }
.progress { width: 200px; height: 6px; border-radius: 3px; background: var(--ui-fill-2); overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--ui-accent); }

.recent-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 14px 16px 6px;
}
.recent-header strong { font-size: 11px; font-weight: 650; color: var(--ui-ink-2); }
.recent-header small { font-size: 11px; color: var(--ui-ink-3); }
.recent-header .clear { color: var(--ui-ink-2); }

.cards { flex: 1; overflow: hidden; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ui-fill);
  box-shadow: inset 0 0 0 1px var(--ui-line);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s, background 0.2s;
}
.card.lifted { background: var(--ui-fill-2); opacity: 0.45; }
.card.entering { opacity: 0; transform: translateY(-12px) scale(0.98); }
.thumb {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: #f7f7f7;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.thumb svg { position: absolute; inset: 4px; width: 32px; height: 32px; }
.thumb .mark {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #30c15b;
  box-shadow: 0 0 0 1.5px var(--ui-bg);
  display: grid;
  place-items: center;
}
.thumb .mark::after {
  content: "";
  width: 5px;
  height: 3px;
  border: solid #fff;
  border-width: 0 0 1.6px 1.6px;
  transform: translateY(-1px) rotate(-45deg);
}
.card-text { display: flex; flex-direction: column; min-width: 0; }
.card-text strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-text small { font-size: 11px; color: var(--ui-ink-2); }

/* Stitch previews draw themselves in, like the machine sewing them. */
.stitch-art path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.stitch-art.sewing path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sew var(--sew, 1.2s) ease-in-out forwards; }
@keyframes sew { to { stroke-dashoffset: 0; } }

.drag-ghost {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}
.drag-ghost .card { width: 336px; background: var(--ui-bg); }
.drag-ghost .file-icon { transform: scale(0.8); }
.drag-ghost .badge {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ff3b30;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 6px;
}

.cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 24px;
  z-index: 6;
  fill: #000;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0;
}

.caption {
  margin-top: 18px;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.95rem;
  min-height: 1.6em;
  transition: opacity 0.3s;
}

/* ---------- Steps ---------- */

.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  counter-reset: none;
}
.steps li { position: relative; padding-top: 52px; }
.step-num {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
  border: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent);
}
.steps p { color: var(--ink-2); }

/* ---------- Features ---------- */

.features h2 { text-align: center; margin-bottom: 1em; }
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.feature-grid article {
  flex: 1 1 280px;
  max-width: 380px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px -20px rgba(0, 0, 0, 0.25);
}
.feature-grid svg {
  width: 30px;
  height: 30px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-grid p { color: var(--ink-2); margin: 0; }

/* ---------- Machines & formats ---------- */

.support { max-width: 760px !important; }
.support p { color: var(--ink-2); }
.support table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.support th, .support td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.support thead th { color: var(--ink-3); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.support td { text-align: center; width: 5.5em; }
.support td:has(.pill) { width: 8em; text-align: right; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.note { font-size: 0.92rem; color: var(--ink-3) !important; }

/* ---------- Download ---------- */

.download { text-align: center; }
.download > img { display: block; margin: 0 auto 18px; }
.download .lede { margin-inline: auto; }
.download .cta-meta { margin-top: 12px; }
.first-launch {
  max-width: 640px;
  margin: 32px auto 0;
  text-align: left;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
}
.first-launch ol { padding-left: 1.3em; margin: 0 0 1em; }
.first-launch li { margin-bottom: 0.7em; color: var(--ink-2); }
.first-launch li strong { color: var(--ink); }

/* ---------- FAQ ---------- */

.faq { max-width: 760px !important; }
.faq h2 { text-align: center; margin-bottom: 1em; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3em; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 12px 0 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px 48px;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.9rem;
}
.site-footer p { margin: 0 0 6px; }
.site-footer .fine { font-size: 0.8rem; }

/* A visible running stitch under section headings. */
.features h2::after,
.faq h2::after,
.support h2::after {
  content: "";
  display: block;
  width: 64px;
  margin: 14px auto 0;
  border-top: 3px dashed var(--accent);
}
.support h2::after { margin-left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stitch-art.sewing path { animation: none; stroke-dashoffset: 0; }
}
