/* Shared stylesheet for the static product landing pages under /apps/.
   Hand-written, no build step. Tokens mirror src/index.css (@theme).
   Fonts: the main site bundles Syne / Instrument Sans / JetBrains Mono with
   hashed file names, so these pages use fallback stacks that approximate them
   (and pick the real fonts up if they are installed locally). */

:root {
  --bg: #0b0a09;
  --surface: #151211;
  --elevated: #1e1917;
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --ember: #f87171;
  --accent: #10b981;
  --text: #e7e5e4;
  --muted: #a8a29e;
  --dim: #78716c;
  --line: rgba(255, 255, 255, 0.08);
  --coffee: #fbbf24;
  --font-display: "Syne Variable", "Syne", "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  --font-sans: "Instrument Sans Variable", "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  background-image:
    radial-gradient(55% 520px at 50% 0%, rgba(220, 38, 38, 0.11), transparent 70%),
    radial-gradient(#1a1514 1.5px, transparent 1.5px);
  background-size: auto, 22px 22px;
  background-repeat: no-repeat, repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--primary); color: #fff; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ember); text-underline-offset: 3px; }
a:hover { color: #fff; }
a:focus-visible,
summary:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); color: #fff; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 1.9vw, 2.5rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 700; }
h3, .h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; }
.dim { color: var(--dim); }
.small { font-size: 0.92rem; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 9, 0.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}
.bar { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: #fff; text-decoration: none; }
.brand:hover { color: var(--primary); }
.brand-mark { font-family: var(--font-mono); font-size: 0.9rem; color: var(--primary); background: rgba(220, 38, 38, 0.18); padding: 6px 8px; border-radius: 8px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; }
.site-nav a { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--primary); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; line-height: 1.2;
  transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn .ico { flex: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 0 18px rgba(220, 38, 38, 0.45); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 0 30px rgba(220, 38, 38, 0.7); }
.btn-secondary { border-color: var(--primary); color: var(--ember); background: transparent; }
.btn-secondary:hover { background: rgba(220, 38, 38, 0.15); color: #fff; }
.btn-ghost { padding: 8px 0; color: var(--primary); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; }
.btn-ghost:hover { color: var(--ember); transform: none; }
.btn-coffee { background: var(--coffee); color: #1c1917; }
.btn-coffee:hover { background: #fcd34d; color: #1c1917; }
.site-header .btn-coffee { padding: 8px 16px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; }

/* ---------- cards ---------- */
.card {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(160deg, rgba(220, 38, 38, 0.35), rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.04)) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.badge { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; padding: 4px 9px; border-radius: 5px; color: var(--ember); background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.22); }
.badge-free { color: var(--accent); background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.25); }

.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.32em; color: rgba(220, 38, 38, 0.85); margin: 0 0 14px; }

/* ---------- hero ---------- */
.hero { padding: 28px 0 56px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--dim); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero-id { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.hero-id img { width: 72px; height: 72px; border-radius: 16px; border: 1px solid var(--line); flex: none; }
.tagline { font-size: 1.2rem; color: #fff; }
.lede { color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.cta-note { color: var(--dim); margin-top: 14px; }
.hero-media { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid rgba(220, 38, 38, 0.3); box-shadow: 0 24px 70px -20px rgba(220, 38, 38, 0.4), 0 10px 30px rgba(0, 0, 0, 0.6); background: var(--elevated); }
.hero-media img { width: 100%; }
.overlay { position: absolute; inset: 0; margin: auto; width: auto !important; height: 72% !important; max-width: 70%; object-fit: contain; }
.hero-hub { padding-bottom: 16px; }
.hero-hub h1, .hero-hub .tagline { max-width: 820px; }
.hero-hub .tagline { color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid rgba(255, 255, 255, 0.04); }
.grid { display: grid; gap: 22px; }
.features { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }
.feature { padding: 24px; }
.feature h3 { color: #fff; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 32px; }
.shot { margin: 0; overflow: hidden; }
.shot a { display: block; }
.shot img { width: 100%; }
.shot figcaption { padding: 14px 18px; color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 28px 0 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 58px; color: var(--text); }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; color: var(--ember); border: 1px solid rgba(220, 38, 38, 0.4); border-radius: 10px; background: rgba(220, 38, 38, 0.08); }
.note { color: var(--muted); border-left: 3px solid var(--primary); padding-left: 14px; }
.reqs { padding: 26px; }
.reqs h3 { margin-top: 22px; }
.ticks, .links { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 0 0 10px 26px; color: var(--muted); font-size: 0.97rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 11px; height: 6px; border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg); }
.links li { padding-bottom: 8px; font-size: 0.97rem; }

.content-note { padding: 24px 26px; border-left: 3px solid var(--primary); }
.content-note p { margin: 0; color: var(--muted); }

.faq { margin-top: 14px; padding: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 52px 18px 22px; font-weight: 700; color: #fff; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 1.3rem; color: var(--primary); }
.faq[open] summary::after { content: "\2212"; }
.faq p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

.support { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 32px; background: linear-gradient(var(--elevated), var(--elevated)) padding-box, linear-gradient(160deg, rgba(251, 191, 36, 0.5), rgba(220, 38, 38, 0.25) 50%, rgba(255, 255, 255, 0.05)) border-box; }
.support h2 { font-size: 1.5rem; margin-bottom: 6px; }
.support p { margin: 0; color: var(--muted); }
.support .btn { flex: none; }

/* ---------- app cards (hub + "more") ---------- */
.hub { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
.app-card { overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.app-card:hover { transform: translateY(-4px); box-shadow: 0 10px 40px -10px rgba(220, 38, 38, 0.35); }
.app-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--elevated); }
.app-card-media > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.app-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.app-card-body > p { color: var(--muted); font-size: 0.97rem; }
.app-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.app-card-head img { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.app-card-head h3 { margin: 0 0 6px; font-size: 1.2rem; }
.app-card-head h3 a { color: #fff; text-decoration: none; }
.app-card-head h3 a:hover { color: var(--primary); }
.app-card .ticks { flex: 1; }
.app-card-actions { margin: 8px 0 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; text-align: center; padding-bottom: 40px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.battlement { height: 10px; margin-top: -10px; opacity: 0.25; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10'%3E%3Cpath d='M0 10 V0 H20 V10 Z' fill='%23dc2626'/%3E%3C/svg%3E") repeat-x bottom; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; padding: 36px 0 22px; font-size: 0.92rem; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--primary); }
.site-footer p { margin: 0 0 6px; color: var(--muted); }
.site-footer p a { color: var(--primary); text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .two-col { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .features, .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .bar { justify-content: space-between; }
  .section { padding: 44px 0; }
  .features, .hub, .more, .gallery { grid-template-columns: minmax(0, 1fr); }
  .support { flex-direction: column; align-items: flex-start; }
  .cta-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .app-card { transition: none; }
  .btn:hover, .app-card:hover { transform: none; }
}
