/* Ascentware house theme: shared by the landing page, sign-in and console. */

@font-face {
  font-family: "Rokkitt";
  src: url("/static/fonts/rokkitt-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/static/fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/static/fonts/hanken-grotesk-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Varela Round";
  src: url("/static/fonts/varela-round.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* Brand: the logo's sky and red, and an ink blue derived from the sky. */
  --brand-sky: #03a6ee;
  --brand-red: #ff0d14;
  --ink: #0b2a3f;
  --ink-2: #123a55;
  --ink-3: #1b4a6a;
  --ribbon-knot: #0291d2;
  --rail-muted: #a9c0d2;
  --stitch-hover: #ff8a8e;
  --placeholder: #6b7a88;
  --field-hover: #aebdca;
  --danger-border: #f2b8bb;
  --primary-hover: var(--ink-2);

  --ground: #fbfcfd;
  --surface: #ffffff;
  --surface-2: #f2f6f9;
  --hairline: #dfe6ec;
  --hairline-strong: #c7d3dd;
  --text: #10202e;
  --muted: #4a5b6b;
  --link: #0272ae;
  --sky-tint: #e3f4fd;
  --stitch: #d0101a;
  --danger: #d0101a;
  --danger-tint: #fdeced;
  --ok: #13724a;
  --ok-tint: #e5f4ec;
  --warn: #9a5600;
  --warn-tint: #fbf0e0;

  --primary-bg: var(--ink);
  --primary-text: #ffffff;
  --code-bg: var(--ink);
  --code-text: #e7f1f8;

  --display: "Rokkitt", Rockwell, "Roboto Slab", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --logo-face: "Varela Round", "Hanken Grotesk", sans-serif;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-1: 0 1px 2px rgb(11 42 63 / 0.06), 0 2px 8px rgb(11 42 63 / 0.05);
  --shadow-2: 0 2px 6px rgb(11 42 63 / 0.08), 0 14px 32px rgb(11 42 63 / 0.10);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--ground);
  color: var(--text);
  font: 400 15px/1.55 var(--sans);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--brand-sky);
}

::selection { background: var(--sky-tint); color: var(--ink); }

h1, h2, h3 { margin: 0; color: var(--text); text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd, .mono { font-family: var(--mono); font-size: 0.88em; }
.muted { color: var(--muted); }
.hidden, [hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

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

* { scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* Logo: the mark is redrawn from the supplied artwork; the word is set in
   Varela Round. Replace with the original SVG when available. */

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.02em;
  font-size: 22px;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.logo-mark { height: 0.86em; width: auto; overflow: visible; }
.logo-mark .blue { fill: var(--brand-sky); }
.logo-mark .red { fill: var(--brand-red); }
.logo-word {
  font-family: var(--logo-face);
  font-size: 1em;
  letter-spacing: -0.01em;
  color: currentColor;
}
.logo:hover { text-decoration: none; }

/* Buttons */

.btn {
  --btn-bg: var(--surface);
  --btn-text: var(--text);
  --btn-border: var(--hairline-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 38px;
  padding: 0 16px;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0.005em;
  color: var(--btn-text);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.btn:hover { --btn-bg: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn.primary {
  --btn-bg: var(--primary-bg);
  --btn-text: var(--primary-text);
  --btn-border: var(--primary-bg);
}
.btn.primary:hover { --btn-bg: var(--primary-hover); --btn-border: var(--primary-hover); }

/* The saddle stitch: one drawn seam used everywhere (box lid, buttons,
   key envelope, job cards). An SVG inset inside its container, stroked with
   the same 7/6 dash and round caps. */
.seam-line {
  position: absolute;
  inset: var(--seam-inset, 5px);
  width: calc(100% - 2 * var(--seam-inset, 5px));
  height: calc(100% - 2 * var(--seam-inset, 5px));
  overflow: visible;
  pointer-events: none;
}
.seam-line rect {
  fill: none;
  stroke: var(--seam-color, var(--stitch));
  stroke-width: var(--seam-width, 1.6);
  stroke-dasharray: 7 6;
  stroke-linecap: round;
  transition: stroke 200ms var(--ease-out);
}
.btn.stitched { --seam-color: rgb(255 255 255 / 0.55); --seam-width: 1.3; --seam-inset: 5px; }
.btn.stitched:hover { --seam-color: var(--stitch-hover); }
.btn.stitched > span { position: relative; }

.btn.danger { --btn-text: var(--danger); }
.btn.danger:hover { --btn-bg: var(--danger-tint); --btn-border: var(--danger-border); }
.btn.ghost { --btn-bg: transparent; --btn-border: transparent; color: var(--muted); }
.btn.ghost:hover { --btn-bg: var(--surface-2); color: var(--text); }
.btn.small { min-height: 30px; padding: 0 11px; font-size: 13px; }
.btn.large { min-height: 48px; padding: 0 26px; font-size: 15px; }

/* Fields */

input, select, textarea {
  font: 400 14px/1.4 var(--sans);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  width: 100%;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:hover, select:hover, textarea:hover { border-color: var(--field-hover); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-sky);
  box-shadow: 0 0 0 3px rgb(3 166 238 / 0.18);
}
textarea { resize: vertical; min-height: 44px; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--ink); }

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint { font-weight: 400; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* Notices */

.notice { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; }
.notice.error { background: var(--danger-tint); color: var(--danger); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--hairline); border-top-color: var(--brand-sky);
  animation: spin 0.8s linear infinite; display: inline-block; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
