/* RyDF marketing site — shared design system. No external deps (system fonts,
   inline SVG). Light base with an automatic dark mode via prefers-color-scheme,
   mirroring the app's own theme tokens. */

:root {
  --ink: #14171c;
  --ink-soft: #39414d;
  --muted: #616a77;
  --line: #e5e8ec;
  --bg: #ffffff;
  --bg-soft: #f5f7f9;
  --bg-ink: #14171c;
  --accent: #2f5fd6;
  --accent-2: #4f8cff;
  --accent-soft: #eaf0ff;
  --danger: #c8323a;
  --ok: #187f45;
  --radius: 16px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eaee;
    --ink-soft: #b9c0cb;
    --muted: #8b929e;
    --line: #2a2e37;
    --bg: #14161b;
    --bg-soft: #1b1e25;
    --bg-ink: #0f1115;
    --accent: #4f8cff;
    --accent-2: #6ea0ff;
    --accent-soft: rgba(79, 140, 255, 0.14);
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
section[id], #top { scroll-margin-top: 84px; }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
kbd {
  background: var(--bg-soft); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; font-size: 12px; color: var(--ink-soft);
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 92px 0; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.08; font-weight: 700; }
h1 { font-size: clamp(38px, 6vw, 60px); }
h2 { font-size: clamp(27px, 3.6vw, 41px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 640px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 17px; height: 17px; }

/* ---------- Alpha banner ---------- */
.alphabar { background: var(--bg-ink); color: #e7ebf2; font-size: 13.5px; text-align: center; padding: 10px 18px; line-height: 1.4; }
.alphabar b { color: #fff; font-weight: 700; }
.alphabar .pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(120, 150, 255, 0.18); color: #b7c6ff; padding: 2px 9px; border-radius: 999px; margin-right: 9px; vertical-align: 1px;
}
.alphabar a { color: #b7c6ff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.alphabar a:hover { color: #fff; }

/* ---------- Nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.brand .mark { width: 27px; height: 27px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.02; }
.brand-tag { font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14.5px; color: var(--ink-soft); font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { padding: 9px 18px; font-size: 14px; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 10px; margin: -10px -8px -10px 0; line-height: 0; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-note { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }

/* ---------- Strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); padding: 22px 0; }
.strip-inner { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); font-weight: 500; }
.strip-inner b { color: var(--ink-soft); font-weight: 600; }
.strip-inner .sep { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }

/* ---------- Section heads ---------- */
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Capability grid ---------- */
.suite { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.app { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; background: var(--bg); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.app:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -26px rgba(14, 17, 22, 0.35); border-color: color-mix(in srgb, var(--line) 60%, var(--ink)); }
.app .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.app .ico svg { width: 22px; height: 22px; }
.app h3 { margin-bottom: 7px; }
.app p { font-size: 14.5px; color: var(--muted); }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid transparent; transition: border-color 0.2s, background 0.2s; }
.feature:hover { background: var(--bg); border-color: var(--line); }
.feature .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--ink); margin-bottom: 15px; }
.feature .ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 17px; margin-bottom: 7px; }
.feature p { font-size: 14px; color: var(--muted); }
.feature p code { background: var(--bg); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ---------- Dark flow section ---------- */
.flow { background: var(--bg-ink); color: #fff; border-radius: 24px; padding: 54px 40px; }
.flow .eyebrow { color: var(--accent-2); }
.flow h2 { color: #fff; }
.flow .lead { color: #aab2c0; }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 42px; }
.way { background: #1b1f27; border: 1px solid #2a3039; border-radius: 18px; padding: 28px; }
.way-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.way-ico { width: 42px; height: 42px; border-radius: 11px; background: #222a36; color: var(--accent-2); display: grid; place-items: center; }
.way-ico svg { width: 22px; height: 22px; }
.way h3 { color: #fff; font-size: 19px; }
.way-tag { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #b7c6ff; background: rgba(120, 150, 255, 0.14); padding: 4px 10px; border-radius: 999px; }
.way > p { color: #aab2c0; font-size: 14.5px; margin-bottom: 18px; }
.steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 13px; }
.steps li { counter-increment: s; display: flex; gap: 13px; color: #cdd3dc; font-size: 14.5px; align-items: flex-start; }
.steps li::before { content: counter(s); flex-shrink: 0; width: 25px; height: 25px; border-radius: 50%; background: #222a36; border: 1px solid #313a47; color: var(--accent-2); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.steps li b { color: #fff; font-weight: 600; }

/* ---------- Window mockup (hero + showcase) ---------- */
.win { border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: var(--bg); box-shadow: 0 30px 70px -34px rgba(16, 22, 40, 0.35), 0 2px 8px rgba(16, 22, 40, 0.06); }
.win-bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 13px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.win-bar .tl { width: 11px; height: 11px; border-radius: 50%; }
.win-bar .tl.r { background: #ff5f57; } .win-bar .tl.y { background: #febc2e; } .win-bar .tl.g { background: #28c840; }
.win-tab { margin-left: 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-bottom: none; padding: 5px 12px; border-radius: 7px 7px 0 0; position: relative; top: 1px; }
.win-tab.dim { color: var(--muted); background: transparent; border-color: transparent; }
.win-toolbar { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.tool { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-soft); }
.tool.on { background: var(--accent-soft); color: var(--accent); }
.tool svg { width: 16px; height: 16px; }
.tool-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.win-body { display: grid; grid-template-columns: 116px 1fr; height: 320px; }
.win-side { border-right: 1px solid var(--line); background: var(--bg-soft); padding: 10px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.thumb { border: 1px solid var(--line); border-radius: 4px; background: var(--bg); height: 62px; flex-shrink: 0; position: relative; overflow: hidden; }
.thumb.cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumb::after { content: ''; position: absolute; inset: 7px; background-image: repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 7px), repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 7px); opacity: 0.5; }
.win-page-wrap { background: var(--bg-soft); display: grid; place-items: center; padding: 18px; overflow: hidden; }
.win-page { background: #fff; width: 100%; max-width: 380px; aspect-ratio: 4 / 3; border-radius: 3px; box-shadow: 0 6px 24px -8px rgba(16, 22, 40, 0.25); position: relative; overflow: hidden; }
.win-page .grid { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, #eef1f5 0 1px, transparent 1px 20px), repeating-linear-gradient(90deg, #eef1f5 0 1px, transparent 1px 20px); }

/* ---------- CTA ---------- */
.cta { background: var(--bg-ink); color: #fff; border-radius: 24px; padding: 62px 48px; text-align: center; }
.cta h2 { color: #fff; margin-bottom: 16px; }
.cta .lead { color: #aab2c0; margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta .btn-primary { background: #fff; color: var(--bg-ink); }
.cta .btn-primary:hover { background: #eaf0ff; }
.cta .btn-ghost { color: #fff; border-color: #333a44; }
.cta .btn-ghost:hover { border-color: #fff; }
.cta-sub { font-size: 13px; color: #828b98; margin-top: 18px; }
.cta-sub a { color: #b7c6ff; font-weight: 600; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 42px 0; margin-top: 8px; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot .brand { font-size: 16px; }
.foot-links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.foot-links a:hover { color: var(--ink); }
.foot .copy { font-size: 13px; color: var(--muted); width: 100%; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Doc pages (quickstart / faq / downloads) ---------- */
.doc { padding: 56px 0 40px; }
.doc-head { max-width: 760px; margin: 0 auto 8px; }
.doc-head h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 14px; }
.doc-body { max-width: 760px; margin: 0 auto; }
.doc-body h2 { font-size: 24px; margin: 42px 0 14px; padding-top: 8px; }
.doc-body h3 { font-size: 18px; margin: 26px 0 10px; }
.doc-body p, .doc-body li { color: var(--ink-soft); font-size: 16px; }
.doc-body p { margin: 12px 0; }
.doc-body ul, .doc-body ol { margin: 12px 0 12px 22px; }
.doc-body li { margin: 7px 0; }
.doc-body code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 13.5px; }
.doc-body a:not(.btn) { color: var(--accent); font-weight: 500; }
.doc-body a:not(.btn):hover { text-decoration: underline; }
.note { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--bg-soft); border-radius: 8px; padding: 14px 18px; margin: 20px 0; font-size: 15px; color: var(--ink-soft); }
.note b { color: var(--ink); }
.steps-doc { list-style: none; counter-reset: sd; margin-left: 0 !important; }
.steps-doc li { counter-increment: sd; display: flex; gap: 14px; align-items: flex-start; margin: 16px 0; }
.steps-doc li::before { content: counter(sd); flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; display: grid; place-items: center; margin-top: 1px; }
.steps-doc li b { color: var(--ink); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 2px; font-weight: 600; font-size: 17px; color: var(--ink); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font-size: 24px; font-weight: 400; color: var(--muted); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .a, .faq-item .faq-a { padding: 0 2px 22px; color: var(--ink-soft); font-size: 15.5px; }
.faq-item .a p, .faq-item .faq-a p { margin: 0 0 10px; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }
.faq-cat { font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 40px 0 6px; }
.faq-group { margin: 40px 0 8px; }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group > h2 { font-size: 15px; letter-spacing: 0.02em; color: var(--accent); margin: 0 0 4px; padding: 0; }
.cta-inline { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border: 1px solid var(--line); background: var(--bg-soft); border-radius: var(--radius); padding: 26px 30px; margin: 48px 0 8px; }
.cta-inline h2 { font-size: 22px; }

/* Downloads */
.dl-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--bg); margin: 24px 0; }
.dl-card h2 { margin: 0 0 6px; }
.dl-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 4px; }
.req { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.req div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.req .k { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.req .v { font-size: 15px; color: var(--ink); margin-top: 3px; }

/* ---------- Feedback form ---------- */
.form { margin: 8px 0 0; max-width: 620px; }
.field { margin: 0 0 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 7px; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23616a77' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form-status { font-size: 14px; color: var(--muted); }
.form-status.err { color: var(--danger); font-weight: 500; }
.form-done { text-align: center; padding: 26px 10px; }
.form-done .tick { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-size: 28px; font-weight: 700; }
.form-done h2 { font-size: 24px; margin-bottom: 8px; }
.form-done p { max-width: 420px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 6px 0; box-shadow: 0 16px 30px -20px rgba(14, 17, 22, 0.4); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 24px; font-size: 15px; }
  .menu-btn { display: block; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .suite { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr 1fr; }
  .ways { grid-template-columns: 1fr; }
  section { padding: 68px 0; }
}
@media (max-width: 560px) {
  .suite, .features, .req { grid-template-columns: 1fr; }
  .flow, .cta { padding: 40px 24px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
