/*
 * Resalian marketing site.
 *
 * Deliberately one hand-written stylesheet with no build step: these pages must
 * render instantly, be crawlable, and stay readable with JavaScript disabled —
 * which matters most for the legal pages, where someone may be reading under
 * pressure or saving the page for a compliance file.
 *
 * Palette matches the dashboard (src/index.css) so the site and the product
 * look like one thing. Dark-first, with a light override for readers whose
 * system asks for it.
 */

:root {
  --bg: #09090e;
  --surface: #0f0f17;
  --surface2: #14141e;
  --border: #1e1e2e;
  --border2: #262636;

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary: #8b5cf6;
  --primary-deep: #7c3aed;
  --accent: #22d3ee;
  --success: #10b981;
  --warning: #f59e0b;

  --radius: 14px;
  --measure: 68ch;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface2: #f1f5f9;
    --border: #e2e8f0;
    --border2: #cbd5e1;

    --text: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;

    --primary: #7c3aed;
    --primary-deep: #6d28d9;
    --accent: #0891b2;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }

/* Visible focus for keyboard users — the default outline disappears against
   a dark background, and these pages include forms and long link lists. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ── Layout ─────────────────────────────────────────────────────────────── */

.wrap { width: min(1140px, calc(100% - 48px)); margin-inline: auto; }
.prose { width: min(var(--measure), calc(100% - 48px)); margin-inline: auto; }

section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

/* ── Header ─────────────────────────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-muted); font-size: 0.9rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 860px) { .nav a.hide-sm { display: none; } }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--primary-deep);
  color: #fff;
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.32);
}
.btn-primary:hover { background: var(--primary); }
.btn-ghost {
  border-color: var(--border2);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { background: var(--surface2); }

/* ── Type ───────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -0.022em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1.05em; }
.lead { font-size: clamp(1.02rem, 1.9vw, 1.2rem); color: var(--text-muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.735rem;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 14px;
}
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); font-size: 0.875rem; }
.center { text-align: center; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { padding: 84px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 20% auto -10%;
  height: 620px;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.20), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -20% -20% auto auto;
  width: 560px;
  height: 560px;
  background: radial-gradient(closest-side, rgba(6, 182, 212, 0.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 .grad {
  background: linear-gradient(96deg, var(--primary) 10%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ── Cards & grids ──────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card .ico {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(124, 58, 237, 0.14);
  color: var(--primary);
  margin-bottom: 15px;
}
.card.accent .ico { background: rgba(6, 182, 212, 0.14); color: var(--accent); }

/* Alternating feature rows: screenshot one side, copy the other. */
.feature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 52px;
  align-items: center;
}
.feature + .feature { margin-top: 84px; }
.feature.flip > .shot { order: -1; }
@media (max-width: 860px) {
  .feature + .feature { margin-top: 56px; }
  .feature.flip > .shot { order: 0; }
}

.shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: light) {
  .shot { box-shadow: 0 18px 44px rgba(15, 23, 42, 0.10); }
}
.shot svg { display: block; border-radius: 8px; }
figure { margin: 0; }
figcaption {
  color: var(--text-subtle);
  font-size: 0.8rem;
  margin-top: 10px;
  text-align: center;
}

/* ── Checklists ─────────────────────────────────────────────────────────── */

ul.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
ul.ticks li {
  position: relative;
  padding-left: 27px;
  margin-bottom: 11px;
  color: var(--text-muted);
}
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
}
ul.ticks li strong { color: var(--text); font-weight: 600; }

/* ── Badges ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  vertical-align: middle;
}
.badge.soon { border-color: rgba(245, 158, 11, 0.4); color: var(--warning); }
.badge.live { border-color: rgba(16, 185, 129, 0.4); color: var(--success); }

/* ── Panels ─────────────────────────────────────────────────────────────── */

.panel {
  background: linear-gradient(150deg, rgba(124, 58, 237, 0.10), rgba(6, 182, 212, 0.06));
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 44px;
}
@media (max-width: 720px) { .panel { padding: 28px; } }

.note {
  border-left: 3px solid var(--warning);
  background: var(--surface2);
  border-radius: 0 10px 10px 0;
  padding: 15px 18px;
  margin: 26px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.note strong { color: var(--text); }

/* ── Steps ──────────────────────────────────────────────────────────────── */

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
ol.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 52px;
  margin-bottom: 26px;
}
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: -2px;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(124, 58, 237, 0.14);
  color: var(--primary);
  font-weight: 650;
  font-size: 0.92rem;
}
ol.steps h3 { margin-bottom: 4px; }
ol.steps p { margin: 0; color: var(--text-muted); }

/* ── Legal pages ────────────────────────────────────────────────────────── */

.legal { padding: 56px 0 96px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.legal h2 {
  font-size: 1.25rem;
  margin-top: 2.4em;
  padding-top: 0.5em;
  border-top: 1px solid var(--border);
}
.legal h3 { font-size: 1.02rem; margin-top: 1.9em; }
.legal ul, .legal ol { padding-left: 22px; color: var(--text-muted); }
.legal li { margin-bottom: 9px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}
.legal th, .legal td {
  border: 1px solid var(--border);
  padding: 10px 13px;
  text-align: left;
  vertical-align: top;
}
.legal th { background: var(--surface2); font-weight: 600; }
.legal td { color: var(--text-muted); }

/* Wide tables must scroll inside themselves — the page body never scrolls
   sideways, which is what makes these readable on a phone. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

code, .mono { font-family: var(--mono); font-size: 0.875em; }
code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0 40px;
}
.toc p { font-weight: 600; margin: 0 0 10px; font-size: 0.9rem; }
.toc ol { margin: 0; padding-left: 20px; font-size: 0.92rem; }
.toc li { margin-bottom: 5px; }

.updated {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 13px;
  margin-bottom: 26px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--border);
  padding: 54px 0 40px;
  background: var(--surface);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
}
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
footer.site h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 13px;
}
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 9px; }
footer.site a { color: var(--text-muted); font-size: 0.9rem; }
footer.site a:hover { color: var(--text); }
.colophon {
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  color: var(--text-subtle);
  font-size: 0.855rem;
}

/* ── Unfilled company-registry fields ───────────────────────────────────── */

/*
 * Facts only the company registry can supply — registered name, licence
 * number, address, phone. Rendered loudly on purpose: a legal page that ships
 * with one of these still in place should be impossible to miss, which a quiet
 * [[PLACEHOLDER]] is not. Delete this rule once every .fill is replaced.
 */
.fill {
  background: #FEF08A;
  color: #713F12;
  border: 1px dashed #A16207;
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 600;
  font-size: 0.92em;
}
.fill::before { content: "⚠ "; }
@media print { .fill { border-width: 2px; } }
