/* Radjeno website.
   The design tokens below are copied from radjeno-app's frontend/src/styles.css
   so the site and the app are visibly the same product. Keep them in sync: if
   the accent or the surfaces move in the app, move them here too.

   Mobile-first, like the app. Every rule targets a phone in portrait; the few
   wider-screen rules only cap and centre the column. */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;

  /* Surfaces and ink */
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #eaeef2;
  --ink: #0b1220;
  --muted: #5b6673;
  --border: #d5dce3;

  /* Brand */
  --accent: #0e8f6b;
  --accent-strong: #0b7a5b;
  --accent-ink: #ffffff;
  --accent-soft: rgba(18, 163, 122, 0.12);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(11, 18, 32, 0.1);

  --font-size-regular: 15px;
  --tap-target: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* The app shell's width. The site holds the same column so a phone moving
     between the two never sees the measure change. */
  --shell: 560px;
}

/* The site has no theme switch — it follows the OS, the way the app's "auto"
   preference does. Same dark values as the app's .theme-dark. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #131b2b;
    --surface-alt: #1a2437;
    --ink: #eef2f8;
    --muted: #97a3b4;
    --border: #26324a;

    --accent: #17a37a;
    --accent-strong: #1cb488;
    --accent-ink: #04140f;
    --accent-soft: rgba(23, 163, 122, 0.18);

    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  /* An in-page anchor must not land under the sticky header. */
  scroll-padding-top: 76px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: var(--font-size-regular);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ————————————————————————————————————————————————
   Shell — the app's column, its header and its footer
   ———————————————————————————————————————————————— */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: var(--shell);
  margin: 0 auto;
}

/* The app's header: sticky, translucent, one hairline under it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(var(--safe-top) + 12px) 16px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* The two logo files are painted by CSS mask rather than embedded as <img>,
   which is what lets them take --accent and follow it into the dark theme —
   the same behaviour the app gets from inlining the SVG in a component, but
   without pasting the artwork into every page of a site that has no build
   step. A mask reads the source's alpha, so the artwork's per-shape opacities
   come through unchanged. Height is the dimension each slot has to hold;
   aspect-ratio supplies the width. */
.logo {
  display: block;
  flex: none;
  background-color: var(--accent);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* The mark alone, as in the app's favicon: at header size the word is a smudge. */
.logo--mark {
  height: 30px;
  aspect-ratio: 1 / 1;
  -webkit-mask-image: url("/mark.svg");
  mask-image: url("/mark.svg");
}

/* The full lockup. */
.logo--wordmark {
  height: 26px;
  aspect-ratio: 206 / 131;
  -webkit-mask-image: url("/wordmark.svg");
  mask-image: url("/wordmark.svg");
}

.header-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
}

.header-link:hover,
.header-link[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 16px calc(28px + var(--safe-bottom));
}

.site-footer {
  padding: 20px 16px calc(24px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: space-between;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ————————————————————————————————————————————————
   Hero
   ———————————————————————————————————————————————— */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 24px 0 4px;
}

/* The lockup as the thing being looked at rather than a way home, at the size
   the app gives it on its login screen. */
.hero .logo--wordmark {
  height: 72px;
}

.hero-tagline {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.hero-lede {
  font-size: 15px;
  color: var(--muted);
  text-wrap: pretty;
}

/* ————————————————————————————————————————————————
   Buttons — the app's, unchanged
   ———————————————————————————————————————————————— */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 17px;
  text-align: center;
}

.button:hover {
  text-decoration: none;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button--primary:hover {
  background: var(--accent-strong);
}

.button--secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

.button--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.actions-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 2px;
}

/* ————————————————————————————————————————————————
   Cards and sections — the app's generic surfaces
   ———————————————————————————————————————————————— */

.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-text {
  font-size: 13px;
  color: var(--muted);
}

/* A card that is a link to a docs page: the whole surface is the tap target. */
.card--link {
  color: inherit;
}

.card--link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.card--link .card-title::after {
  content: " →";
  color: var(--accent);
}

/* ————————————————————————————————————————————————
   Documentation prose
   ———————————————————————————————————————————————— */

.prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prose h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.prose h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 14px;
  scroll-margin-top: 76px;
}

.prose h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 8px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 15px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  margin: 0;
}

.prose li::marker {
  color: var(--accent);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-alt);
  color: var(--ink);
}

/* The page a docs entry came from, and the way back to the index. */
.breadcrumb {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

.doc-lede {
  font-size: 16px;
  color: var(--muted);
  text-wrap: pretty;
}

/* ————————————————————————————————————————————————
   Wider screens: the column stays the app's width and only centres. The one
   concession is a slightly roomier hero, which has no equivalent in the app.
   ———————————————————————————————————————————————— */

@media (min-width: 600px) {
  .site-main {
    padding-top: 40px;
  }

  .hero .logo--wordmark {
    height: 84px;
  }

  .hero-tagline {
    font-size: 23px;
  }
}
