/* nimiq.stream — shared page styles (the Nimiq design system, vanilla PWA).
 *
 * Same-origin stylesheet linked from each page via <link rel="stylesheet"
 * href="/app.css">, served statically from ./public by the server's serveStatic.
 * The Nimiq design system itself (Mulish + @nimiq/style, pinned CDN) loads AHEAD
 * of this file in the page <head> so its base/reset/fonts are present.
 *
 * @nimiq/style sets html{font-size:8px} (1rem = 8px). To stay out of that trap,
 * every custom value here is in PX, and the on-brand component CSS below is
 * hand-built to the nq spec (pixel-verified registry) with explicit token values
 * so the page renders identically with or without the CDN (robust offline + when
 * `nq lint` inlines this file into a snapshot). Pinned to the nimiq-branding-cli
 * v1.4.1 design system. Region comments mark page ownership for follow-up PRs.
 */

/* ----------------------------------------------------------------------
   Foundation tokens. Explicit Nimiq values (not CDN-var-dependent), in px.
   ---------------------------------------------------------------------- */
:root {
  --navy: #1F2348;            /* --nimiq-blue: primary text + dark surfaces   */
  --light-blue: #0582CA;      /* prominent CTA / accent                       */
  --green: #21BCA5;           /* success ONLY                                 */
  --red: #D94432;             /* error ONLY                                   */
  --orange: #FC8702;          /* warning ONLY                                 */
  --gold: #E9B213;            /* brand mark only (the hexagon)                */

  --text: #1F2348;
  --muted: rgba(31, 35, 72, 0.5);
  --hairline: rgba(31, 35, 72, 0.1);
  --surface: #FFFFFF;
  --bg: #F8F8F8;

  /* Bottom-right radial gradients (rule 7): every colored surface uses one. */
  --blue-bg:       radial-gradient(100% 100% at bottom right, #260133, #1F2348);
  --light-blue-bg: radial-gradient(100% 100% at bottom right, #265DD7, #0582CA);
  --green-bg:      radial-gradient(100% 100% at bottom right, #41A38E, #21BCA5);
  --gold-bg:       radial-gradient(100% 100% at bottom right, #EC991C, #E9B213);

  --radius-card: 10px;
  --radius-pill: 9999px;
  --radius-field: 8px;
  --ease: cubic-bezier(0.25, 0, 0, 1);
  --ease-press: cubic-bezier(0.41, 0.34, 0.26, 1.55);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Mulish', 'Muli', system-ui, sans-serif !important;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----------------------------------------------------------------------
   Page shell: light body, vertically centered single column.
   ---------------------------------------------------------------------- */
.page {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 16px 56px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

/* Brand bar: gold hexagon mark + product wordmark, navy on light. */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand svg { display: block; flex: none; }
.brand .wordmark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--navy);
}
.brand .tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

/* ----------------------------------------------------------------------
   Card.
   ---------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 56px rgba(0, 0, 0, 0.111);
  padding: 32px;
}
.card + .card { margin-top: 4px; }

h1, h2, h3 {
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;          /* no orphaned heading words */
  margin: 0 0 16px;
}
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 17px; line-height: 1.3; }
p  { margin: 0 0 16px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------------
   Form fields (inset box-shadow border, never a CSS border — rule 1).
   ---------------------------------------------------------------------- */
.field { margin-bottom: 24px; }
.field > label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 8px;
}
.field .hint {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 0;
}
input[type="text"],
input[type="number"],
input:not([type]),
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--navy);
  background: #fff;
  border: none;
  border-radius: var(--radius-field);
  box-shadow: inset 0 0 0 2px var(--hairline);
  padding: 16px;
  transition: box-shadow 0.2s var(--ease);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: rgba(31, 35, 72, 0.35); }
input:focus, textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--light-blue);
}
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--light-blue);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------------
   Buttons: pill, bottom-right radial gradient, sentence-case, white text.
   ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 0 32px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background-image: var(--light-blue-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2); transition-timing-function: var(--ease-press); }
.btn:focus-visible { outline: 2px solid var(--light-blue); outline-offset: 3px; }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }
.btn.navy { background-image: var(--blue-bg); }
.btn.green { background-image: var(--green-bg); }

/* Small secondary button. */
.btn-s {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  background: rgba(31, 35, 72, 0.07);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.btn-s:hover { background: rgba(31, 35, 72, 0.12); }
.btn-s[disabled] { opacity: 0.4; cursor: default; }

/* ----------------------------------------------------------------------
   Links (bold navy, no underline — rule 21).
   ---------------------------------------------------------------------- */
a { color: var(--navy); font-weight: 700; text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--light-blue); }

/* ----------------------------------------------------------------------
   Status alert (info). Solid surface, left icon, no glassmorphism.
   ---------------------------------------------------------------------- */
.alert-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(5, 130, 202, 0.08);
  border-radius: var(--radius-field);
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 24px;
}
.alert-info .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--light-blue); margin-top: 6px; }
.text-error { color: var(--red); font-weight: 600; font-size: 14px; }

/* ----------------------------------------------------------------------
   Share-link rows (creator home result + dashboard).
   ---------------------------------------------------------------------- */
.link-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(31, 35, 72, 0.08);
}
.link-row:last-child { border-bottom: none; }
.link-row .what { display: block; font-weight: 700; color: var(--navy); font-size: 15px; margin-bottom: 4px; }
.link-row .why { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.link-row a { font-family: 'Fira Mono', monospace; font-weight: 400; font-size: 13px; color: var(--light-blue); word-break: break-all; }
.link-row a:hover { color: var(--navy); }

/* ----------------------------------------------------------------------
   Footer.
   ---------------------------------------------------------------------- */
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.foot a { color: var(--muted); font-weight: 700; }
.foot a:hover { color: var(--navy); }

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