/* Cornerstone Digital brand styles.
   One file for the website, the admin and the client portal, so they always match.
   Change a color or font here and it changes everywhere. */

@font-face {
  font-family: 'Unbounded';
  src: url('/assets/fonts/unbounded.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  /* Core palette: black, white, soft gray */
  --ink: #0A0A0A;          /* text, solid buttons, logo */
  --ink-2: #2B2B2B;        /* hover on solid buttons */
  --paper: #FFFFFF;        /* cards, page sections */
  --mist: #F7F7F5;         /* soft gray page background */
  --fog: #EFEFEC;          /* hover backgrounds, table stripes */
  --line: #E3E3DF;         /* hairline borders */
  --line-strong: #C9C9C4;  /* input borders */
  --muted: #6B6B66;        /* supporting text */
  --faint: #9A9A94;        /* placeholders, captions */

  /* Status colors, used only inside the admin and portal */
  --ok: #1F7A4D;      --ok-bg: #E8F3EC;
  --warn: #8A5A00;    --warn-bg: #FBF1DC;
  --bad: #B42318;     --bad-bg: #FBEAE8;
  --info: #1D4ED8;    --info-bg: #E8EEFC;

  /* Type */
  --font-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* Shape and spacing */
  --radius: 2px;           /* square corners, the "grid and blocks" look */
  --radius-card: 4px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --max: 1160px;
  --focus: 0 0 0 3px rgba(10, 10, 10, 0.18);
}

/* Dark sections (the "mix" of light and dark the brand uses) */
.dark {
  --paper: #121212;
  --mist: #0A0A0A;
  --fog: #1C1C1C;
  --line: #2A2A2A;
  --line-strong: #3A3A3A;
  --muted: #A3A39E;
  --faint: #77776F;
  color: #FFFFFF;
  background: var(--mist);
}
.dark .btn { background: #FFFFFF; color: #0A0A0A; border-color: #FFFFFF; }
.dark .btn:hover { background: #E9E9E6; }
.dark .btn.outline { background: transparent; color: #FFFFFF; border-color: #FFFFFF; }
.dark .btn.outline:hover { background: rgba(255, 255, 255, 0.08); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: clamp(32px, 6vw, 64px); }
h2 { font-size: clamp(24px, 3.6vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
h4 { font-family: var(--font-body); font-size: 16px; font-weight: 700; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-4); }
a { color: inherit; text-underline-offset: 3px; }
small, .small { font-size: 14px; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-3);
}

/* Buttons: square, solid black or outlined */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  font: 600 15px/1 var(--font-body);
  color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--ink-2); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.outline { background: transparent; color: var(--ink); }
.btn.outline:hover { background: var(--fog); }
.btn.ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn.ghost:hover { background: var(--fog); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn[disabled], .btn.busy { opacity: 0.55; cursor: progress; }

/* Forms */
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: 400 16px/1.4 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.field { margin: 0 0 var(--space-4); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.error-text { font-size: 14px; color: var(--bad); margin: 8px 0 0; }

/* Cards and surfaces */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Small labels for status */
.tag {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 8px; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  border-radius: var(--radius);
  background: var(--fog); color: var(--ink);
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--info-bg); color: var(--info); }

/* Notices */
.notice { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; border: 1px solid var(--line); background: var(--paper); }
.notice.warn { background: var(--warn-bg); border-color: #EBD9AE; color: #5C3D00; }
.notice.bad { background: var(--bad-bg); border-color: #F2C7C2; color: #7A1A12; }
.notice.ok { background: var(--ok-bg); border-color: #C3E0CE; color: #14532D; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
