/* ===================================================================
   MyCRS — Brand stylesheet
   Derived from mycrs.com.au. Single source of truth for the platform
   look & feel: the brand red, the "// SECTION" kicker labels, the
   italic-emphasis headings and the clean editorial layout.
   =================================================================== */

:root {
  /* Brand palette ------------------------------------------------- */
  --brand-red:        #e02028;   /* primary — taken from the live site theme-color */
  --brand-red-dark:   #b8141b;   /* hover / pressed */
  --brand-red-soft:   #fbe7e8;   /* tint for backgrounds & badges */
  --brand-red-line:   #f3c9cb;   /* tint for borders */

  /* Ink & neutrals ------------------------------------------------ */
  --ink:              #16181d;   /* primary text */
  --ink-2:           #3a3f47;    /* secondary text */
  --muted:           #6b727c;    /* captions, meta */
  --line:            #e6e7ea;    /* hairline borders */
  --line-strong:     #d3d6db;

  /* Surfaces ------------------------------------------------------ */
  --bg:              #ffffff;
  --bg-soft:         #f7f7f5;    /* warm off-white panels */
  --bg-ink:          #16181d;    /* dark footer / inverted blocks */
  --bg-ink-2:        #20242b;

  /* Status -------------------------------------------------------- */
  --ok:              #1f9d57;
  --ok-soft:         #e5f5ec;
  --warn:            #c77700;
  --warn-soft:       #fdf1dd;
  --danger:          var(--brand-red);
  --danger-soft:     var(--brand-red-soft);

  /* Type ---------------------------------------------------------- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
               Consolas, monospace;

  /* Geometry ------------------------------------------------------ */
  --radius:     14px;
  --radius-sm:  9px;
  --radius-lg:  20px;
  --shadow:     0 1px 2px rgba(16,18,22,.04), 0 8px 24px rgba(16,18,22,.06);
  --shadow-lg:  0 12px 40px rgba(16,18,22,.12);
  --maxw:       1120px;
}

/* Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-red); text-decoration: none; }
a:hover { color: var(--brand-red-dark); }

/* Layout ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--ink { background: var(--bg-ink); color: #fff; }

/* The signature device: a "// LABEL" monospace eyebrow ------------ */
.kicker {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-red);
  display: inline-flex;
  align-items: center;
  gap: .5ch;
  margin: 0 0 18px;
  font-weight: 500;
}
.kicker::before { content: "//"; opacity: .65; }

/* Headings -------------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.018em; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.22rem; }
/* italic emphasis is part of the brand voice ("not your spreadsheets.") */
.em { font-style: italic; color: var(--brand-red); font-weight: 700; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }

/* Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55ch;
  font: inherit; font-weight: 600; line-height: 1;
  padding: 14px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-red); color: #fff; }
.btn--primary:hover { background: var(--brand-red-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; color: #fff; }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 26px; font-size: 1.02rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Cards ----------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card__icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: var(--brand-red-soft); color: var(--brand-red);
}

/* Badges / pills -------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: .5ch;
  font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--brand-red-soft); color: var(--brand-red);
  border: 1px solid var(--brand-red-line);
}
.pill--ok    { background: var(--ok-soft);   color: var(--ok);   border-color: #bfe6cd; }
.pill--warn  { background: var(--warn-soft);  color: var(--warn); border-color: #f3dcae; }
.pill--muted { background: var(--bg-soft);    color: var(--muted); border-color: var(--line); }

/* Forms ----------------------------------------------------------- */
.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.input, .select, textarea.input {
  width: 100%; font: inherit; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-soft);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .field--row { grid-template-columns: 1fr; } }

/* Alerts ---------------------------------------------------------- */
.alert { border-radius: var(--radius-sm); padding: 14px 16px; font-size: .94rem; margin-bottom: 18px; border: 1px solid; }
.alert--err  { background: var(--danger-soft); border-color: var(--brand-red-line); color: var(--brand-red-dark); }
.alert--ok   { background: var(--ok-soft);     border-color: #bfe6cd; color: #136c3c; }
.alert--warn { background: var(--warn-soft);    border-color: #f3dcae; color: #8a5400; }

/* Brand lockup ---------------------------------------------------- */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.brand-lockup img { height: 30px; width: auto; }

/* Accessibility floor -------------------------------------------- */
:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Utilities ------------------------------------------------------- */
.stack-8  > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px){ .grid--3 { grid-template-columns: 1fr; } .grid--2 { grid-template-columns: 1fr; } }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
