/* ============================================================================
   Simple Apps — shared design tokens + base components.
   Extracted verbatim from the proven Image Viewer landing page so every app in
   the catalog shares one design system. Per-app pages add only their own accent
   tweaks and section-specific styles on top of this.

   The build inlines this via  <!-- @@include partials/head-common.html -->
   (which <link>s it) — see build/build-web.js.
   ============================================================================ */

/* Self-hosted fonts — latin subset, variable weight. Relative paths resolve
   from each app's own directory, where the build drops a fonts/ copy. */
@font-face {
  font-family: 'Public Sans';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('fonts/public-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('fonts/space-grotesk.woff2') format('woff2');
}

:root {
  --bg: #0f1115; --bg2: #161922; --panel: #1b1f2a; --line: #272c3a;
  --text: #e8eaf0; --muted: #9aa3b5; --accent: #6ea8fe; --accent2: #8b7bf0;
  --good: #4ade80;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Public Sans", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, #1d2433 0%, var(--bg) 55%);
  color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, .brand-name { font-family: "Space Grotesk", sans-serif; }
a { color: var(--accent); }

/* --- Brand header --- */
header { padding: 28px 0; display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  /* Warm amber — complementary to the blue accent — so the logo pops on the dark page. */
  background: linear-gradient(135deg, #f6b545, #ed8336);
  color: #fff; font-weight: 700; font-size: 20px; font-family: "Space Grotesk", sans-serif;
  box-shadow: 0 2px 12px rgba(237, 131, 54, .4);
}
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: -.2px; }
.brand-name span { color: var(--accent); }
.brand-name a { color: inherit; text-decoration: none; }

/* --- Hero --- */
.hero { padding: 48px 0 8px; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.08; letter-spacing: -1px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lead { color: var(--muted); font-size: clamp(17px, 2.4vw, 20px); max-width: 660px; margin: 20px auto 0; }

/* --- Buttons --- */
.cta-row { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px;
  border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid var(--line); color: var(--text); background: var(--panel);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); }
/* Primary action — usage-first. Deliberately the largest, brightest element so
   "Use it now" wins the eye over every other control on the page. */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0b0d12; border-color: transparent; font-size: 18px; padding: 17px 32px;
  box-shadow: 0 6px 22px rgba(110, 168, 254, .35);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }
/* Tip Jar — secondary, calm. No animation; it must not compete with the primary CTA. */
.btn-tip { background: var(--panel); color: var(--text); }
.btn-tip svg { color: #e0729a; }
.btn svg { width: 20px; height: 20px; }
.cta-sub { color: var(--muted); font-size: 13px; margin-top: 14px; }

/* --- Trust badges --- */
.badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  background: var(--bg2); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px;
}
.badge svg { width: 15px; height: 15px; color: var(--good); }

/* --- Section heads --- */
.section-head { text-align: center; margin: 64px 0 8px; }
.section-head h2 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -.5px; }
.section-head p { color: var(--muted); margin-top: 8px; }

/* --- Screenshot gallery --- */
.shots { display: grid; grid-template-columns: 1fr; gap: 22px; margin: 28px 0 8px; }
.shot { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; overflow: hidden; }
.shot img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--line); }
.shot figcaption { color: var(--muted); font-size: 14px; padding: 12px 8px 6px; }
.shot figcaption b { color: var(--text); font-weight: 600; }

/* --- Feature / app-card grid --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 28px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.card .ic { width: 34px; height: 34px; color: var(--accent); margin-bottom: 14px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* --- How it works — numbered steps --- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 28px 0; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: relative; }
.step .num {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #0b0d12;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; margin-bottom: 12px;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* --- FAQ --- */
.faq { margin: 28px 0; }
.faq details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; font-family: "Space Grotesk", sans-serif; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); font-size: 15px; margin-top: 12px; }

.endcta { text-align: center; margin: 64px 0 24px; }

/* --- Sticky conversion bar — slides in once the hero scrolls away --- */
.stickybar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(24px, calc((100vw - 980px) / 2 + 24px));
  background: rgba(15, 17, 21, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-105%); transition: transform .25s ease;
}
.stickybar.show { transform: translateY(0); }
.stickybar .sb-brand { display: flex; align-items: center; gap: 9px; font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.stickybar .sb-brand span { color: var(--accent); }
.stickybar .btn-primary { padding: 10px 18px; font-size: 15px; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .stickybar { transition: none; } }

/* --- Footer --- */
footer { border-top: 1px solid var(--line); padding: 28px 0 60px; text-align: center; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .dot { margin: 0 8px; opacity: .5; }
