/* Aldyn site — one stylesheet shared by every page.
   Dark-first. Surface colours are sampled from the app's own chrome (#191A21) so the
   product screenshots sit flush on the page. Accent #6E8FA8 mirrors nrdyn.com/aldyn;
   the violet is lifted from the crystal mark and used only for AI-related accents.
   The hero uses a low-alpha accent wash plus an oversized brand watermark. */

:root {
  color-scheme: dark;

  --bg: #0B0C10;
  --bg-2: #0E1015;
  --surface: #15171D;
  --surface-2: #191A21;      /* the app's own panel colour */
  --line: #262933;
  --line-soft: #1D2028;

  --ink: #ECEEF3;
  --ink-mid: #A9B0BE;
  --ink-soft: #767E8E;

  --accent: #8FB3CE;         /* links + text on dark */
  --accent-solid: #6E8FA8;   /* button fills, ink on top is --bg */
  --accent-dim: rgba(110, 143, 168, 0.14);
  --wash: rgba(110, 143, 168, 0.10);   /* hero gradient wash (accent, low alpha) */
  --violet: #9B7FD4;
  --violet-dim: rgba(155, 127, 212, 0.14);
  --amber: #E0A62E;
  --red: #E0574E;

  --radius: 16px;
  --radius-lg: 22px;
  --max: 1120px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* full-screen gradient wash — fixed, so it spans the whole viewport on every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(65% 55% at 50% -8%, rgba(110, 143, 168, 0.16), transparent 60%),
    radial-gradient(46% 46% at 84% 6%, rgba(155, 127, 212, 0.12), transparent 62%),
    radial-gradient(46% 46% at 8% 16%, rgba(110, 143, 168, 0.10), transparent 60%),
    radial-gradient(72% 48% at 50% 108%, rgba(110, 143, 168, 0.10), transparent 66%);
  pointer-events: none;
  z-index: 0;
}
.wrap, main { position: relative; z-index: 1; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #B6D2E8; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

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

/* ---------- long-form pages ---------- */
.prose { max-width: 780px; margin: 0 auto; padding: 12px 22px 72px; position: relative; z-index: 1; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.prose h2 { margin: 2.2em 0 0.5em; font-size: 1.3rem; letter-spacing: -0.01em; scroll-margin-top: 24px; }
.prose h3 { margin: 1.8em 0 0.4em; font-size: 1.05rem; }
.prose p, .prose li { color: var(--ink-mid); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 20px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-soft); }
.lead { font-size: 1.12rem; color: var(--ink-mid); margin: 0 0 8px; }
.muted { color: var(--ink-soft); font-size: 0.92em; }

code, kbd, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: #C9D6E2;
}
kbd {
  background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: 2px 7px; color: var(--ink); font-size: 0.82em;
}
pre {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; overflow-x: auto; margin: 14px 0; line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; color: #C9D6E2; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
.table-scroll table { margin: 0; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 650; border-bottom-color: var(--line); background: var(--surface); }
td { color: var(--ink-mid); }
tr:last-child td { border-bottom: 0; }

/* ---------- nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 2px 10px rgba(155, 127, 212, 0.45)); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-mid); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 650; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 20px; border-radius: 999px;
  background: var(--accent-solid); color: #0B0C10; font-weight: 700; font-size: 0.96rem;
  text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.btn:hover { background: #82A3BB; color: #0B0C10; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(110, 143, 168, 0.28); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: #343947; box-shadow: none; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 66px 0 40px; }
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.hero-mark { width: 76px; height: 76px; filter: drop-shadow(0 8px 28px rgba(155, 127, 212, 0.5)); margin: 0 auto 20px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1.04; margin: 0 0 16px; letter-spacing: -0.035em; }
.hero .sub { color: var(--ink-mid); max-width: 620px; margin: 0 auto 30px; font-size: 1.06rem; }
.hero .cta { justify-content: center; }
.hero .fine { color: var(--ink-soft); font-size: 0.88rem; margin-top: 18px; }
.hero .fine span { white-space: nowrap; }
.hero-media { position: relative; z-index: 1; max-width: 1000px; margin: 46px auto 0; }
.hero-media::after {
  content: ""; position: absolute; inset: 6% 3% -8% 3%;
  background: radial-gradient(closest-side, rgba(110, 143, 168, 0.3), transparent 75%);
  filter: blur(38px); z-index: -1;
}
.hero-media img { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface-2); }

/* eyebrow pill + generic CTA row */
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 15px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-mid);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 22px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-solid); box-shadow: 0 0 0 4px var(--accent-dim); }
.cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--ink-soft); font-size: 0.88rem; margin-top: 16px; }
.fine span { white-space: nowrap; }

/* interior-page header */
.page-head { padding: 54px 0 6px; }
.page-head .lede { margin-top: 6px; }

/* ---------- sections ---------- */
section { padding: 68px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.13em; font-size: 0.75rem; color: var(--accent); font-weight: 700; margin: 0; }
h2.title { font-size: clamp(1.75rem, 3.3vw, 2.4rem); margin: 8px 0 14px; letter-spacing: -0.025em; line-height: 1.15; }
.lede { color: var(--ink-mid); max-width: 660px; margin: 0 0 34px; font-size: 1.04rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { border-color: #343947; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.card .ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent); margin-bottom: 15px;
}
.card .ico svg { width: 20px; height: 20px; display: block; }
.card.ai .ico { background: var(--violet-dim); color: var(--violet); }
.card h3 { margin: 0 0 7px; font-size: 1.06rem; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-mid); font-size: 0.96rem; }

/* link card (used on the home "explore" row) */
.card.link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card.link .more { margin-top: 14px; color: var(--accent); font-weight: 650; font-size: 0.92rem; }
.card.link:hover .more { color: #B6D2E8; }

/* screenshots */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 26px; }
.shot { margin: 0; }
/* the densest shot gets the full width so its text stays readable */
.shot.wide { grid-column: 1 / -1; }
.shot.wide img { width: 100%; }
.shot.wide figcaption { max-width: 64ch; margin-inline: auto; text-align: center; }
.shot.wide figcaption b { display: inline; }
.shot.wide figcaption b::after { content: " — "; color: var(--ink-soft); font-weight: 400; }
.shot img {
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--surface-2);
}
.shot figcaption { margin-top: 14px; color: var(--ink-mid); font-size: 0.95rem; }
.shot figcaption b { color: var(--ink); font-weight: 650; display: block; }

/* numbered steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative;
}
.step .num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px;
  background: var(--accent-dim); color: var(--accent); font-weight: 700; font-size: 0.9rem;
  margin-bottom: 13px; font-variant-numeric: tabular-nums;
}
.step h3 { margin: 0 0 6px; font-size: 1.02rem; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-mid); font-size: 0.94rem; }

/* the local-architecture strip */
.flow {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-top: 24px; text-align: center;
}
.flow .node { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.flow .node small { display: block; color: var(--ink-soft); font-weight: 400; font-size: 0.82rem; }
.flow .arrow { display: inline-flex; color: var(--accent); }
.flow .arrow svg { width: 22px; height: 22px; display: block; }

/* two-column feature panel */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center;
}
.panel ul { margin: 0; padding-left: 20px; color: var(--ink-mid); }
.panel li { margin: 9px 0; }
.panel li::marker { color: var(--accent); }

/* requirement chips */
.reqs { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 28px; padding: 0; list-style: none; }
.reqs li {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 0.92rem; color: var(--ink-mid);
}
.reqs li b { color: var(--ink); font-weight: 650; }
/* inside the two-column panel the labels are long, so line them up on a grid */
.panel .reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel .reqs li { border-radius: 12px; padding: 10px 14px; }

/* callouts */
.note {
  border-left: 3px solid var(--accent-solid); background: var(--surface);
  border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 20px 0;
}
.note p { margin: 0; color: var(--ink-mid); font-size: 0.96rem; }
.note p + p { margin-top: 8px; }
.note b { color: var(--ink); }
.note.warn { border-left-color: var(--amber); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden;
  text-align: center; padding: 66px 24px; border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #2A3D4C 0%, #1C2331 52%, #2C2340 100%);
  border: 1px solid #333B49;
}
.cta-band::before {
  content: ""; position: absolute; inset: -60% -20% auto -20%; height: 180%;
  background:
    radial-gradient(38% 46% at 18% 40%, rgba(110, 143, 168, 0.5), transparent 70%),
    radial-gradient(34% 42% at 84% 62%, rgba(155, 127, 212, 0.35), transparent 72%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band .btn-ghost { border-color: rgba(236, 238, 243, 0.28); background: rgba(11, 12, 16, 0.25); }
.cta-band .btn-ghost:hover { background: rgba(11, 12, 16, 0.5); border-color: rgba(236, 238, 243, 0.45); }
.cta-band h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.02em; }
.cta-band p { margin: 0 auto 24px; color: var(--ink-mid); max-width: 520px; }
.cta-band .cta { justify-content: center; }

footer {
  border-top: 1px solid var(--line); margin-top: 30px;
  padding: 28px 0 56px; color: var(--ink-soft); font-size: 0.9rem;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
footer a { color: var(--ink-mid); text-decoration: none; margin-right: 18px; }
footer a:hover { color: var(--ink); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent-solid); color: #0B0C10; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip:focus { left: 0; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .panel { grid-template-columns: 1fr; padding: 28px; }
  .shots { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  section { padding: 52px 0; }
  .nav-links a:not(.btn) { display: none; }
  .grid, .steps { grid-template-columns: 1fr; }
  .flow { flex-direction: column; gap: 10px; }
  .flow .arrow { transform: rotate(90deg); }
  .cta .btn { width: 100%; }
  .hero { padding-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* small spacing utilities — kept as classes so the CSP can stay style-src 'self' */
.tight { margin-bottom: 14px; }
.flush { margin-bottom: 0; }
.flush-top { margin-top: 0; }
.cta.spaced { margin-top: 20px; }
.cta.spaced-lg { margin: 26px 0 8px; }
