/* Unfoldly – shared styles for unfoldly.app. No external fonts, images or scripts. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --good: #1f9d55;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 18px;
  --max: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111113;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #38383d;
    --accent: #2997ff;
    --accent-text: #ffffff;
    --accent-soft: rgba(41, 151, 255, 0.16);
    --good: #34c759;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--card); padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 8px; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 80px 0 64px; text-align: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 700; }
.hero .lede { font-size: clamp(19px, 2.4vw, 23px); color: var(--muted); max-width: 640px; margin: 20px auto 32px; }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 980px;
  font-weight: 600; font-size: 17px; border: 0; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-store { background: var(--text); color: var(--bg); padding: 10px 22px 10px 18px; }
.btn-store svg { width: 22px; height: 22px; }
.btn-store small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; line-height: 1.1; }
.btn-store span { display: block; text-align: left; line-height: 1.15; }
.btn-store[aria-disabled="true"] { cursor: default; }
.btn-link { color: var(--accent); background: transparent; }

.hero-art { margin: 56px auto 0; max-width: 620px; }
.hero-art svg { width: 100%; height: auto; display: block; }

/* Sections */
section { padding: 72px 0; }
.alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; }
.section-sub { text-align: center; color: var(--muted); max-width: 600px; margin: 14px auto 44px; font-size: 19px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.step {
  background: var(--card); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow); text-align: center;
}
.step svg { width: 120px; height: 120px; display: block; margin: 0 auto 18px; }
.step-num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 14px; margin-bottom: 10px;
}
.step h3 { font-size: 21px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.privacy-badge {
  display: flex; gap: 22px; align-items: center;
  background: var(--card); border-radius: 24px; padding: 32px; box-shadow: var(--shadow);
  max-width: 760px; margin: 0 auto;
}
.privacy-badge svg { width: 72px; height: 72px; flex: none; }
.privacy-badge h2 { font-size: 28px; margin-bottom: 8px; }
.privacy-badge p { margin: 0; color: var(--muted); }
.pill {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  border-radius: 980px; padding: 3px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px;
}

/* Documents (privacy, support) */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 700; margin-bottom: 8px; }
.doc .meta { color: var(--muted); margin: 0 0 36px; }
.doc h2 { font-size: 26px; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.callout {
  background: var(--accent-soft); border-radius: 14px; padding: 18px 20px; margin: 24px 0;
}
.callout p { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 20px; margin: 12px 0;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--muted);
}
.faq details[open] summary::after { content: "−"; }
.faq details > :not(summary) { margin-top: 0; }
.faq details[open] { padding-bottom: 8px; }

.contact-card {
  background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  text-align: center; margin-top: 48px;
}
.contact-card h2 { margin-top: 0; }

kbd {
  font: 600 14px var(--font); background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); }

/* Responsive */
@media (max-width: 820px) {
  .steps, .features { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .nav { gap: 14px; }
  .privacy-badge { flex-direction: column; text-align: center; padding: 26px 20px; }
}

/* Illustration parts (inline SVG) */
.ill-frame { fill: var(--text); }
.ill-screen { fill: var(--card); }
.ill-desk { fill: var(--accent); }
.ill-soft { fill: var(--accent-soft); }
.ill-line { fill: var(--line); }
.ill-muted { fill: var(--muted); }
.ill-stroke { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ill-good { fill: var(--good); }
