/* The Human CTO client portal
   Tokens taken from the THCTO Design System and Brochures (Figma). */
:root {
  --paper: #FFFAEC;
  --paper-deep: #FFF3CF;
  --card: #FFFFFF;
  --ink: #161616;
  --ink-soft: #5A5A5A;
  --line: #A4A4A4;
  --rule: rgba(22, 22, 22, 0.12);
  --orange: #E77E00;
  --teal: #00ABAD;
  --magenta: #C9359B;
  --purple: #7B3FA0;
  --blue: #4B5FC0;
  --cyan: #00C2E0;
  --danger: #B3261E;
  --brand-rule: linear-gradient(90deg, #E77E00, #00ABAD);
  --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --body: 'Roboto', 'Segoe UI', system-ui, sans-serif;
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--paper-deep); color: var(--ink); }

/* Whiteboard layer: Rob's spots drawing translation stories in the margins */
#sketch { display: none; }
.wb-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.wb-story { position: absolute; display: flex; flex-direction: column; align-items: center; transition: opacity 1.1s ease; }
.wb-story.out { opacity: 0; }
.wb-a, .wb-b { width: 100%; }
.wb-arrow { width: 62%; height: 44px; margin: 4px 0; transform: rotate(90deg) scaleY(-1); }
.brand-rule { position: relative; z-index: 3; height: 8px; background: var(--brand-rule); }
.wrap { position: relative; z-index: 1; width: min(1120px, 100% - 48px); margin-inline: auto; }

/* Header: an extension of thehumancto.co.uk */
.bar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 108px; width: auto; mix-blend-mode: multiply; }
.bar { padding: 18px 0; }
.bar nav { display: flex; align-items: center; gap: 22px; }
.bar nav a.plain, .bar .who { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.bar nav a.plain:hover { color: var(--ink); }

/* Type scale (Display/XL, Display/L, Heading/M, Heading/S, Body, Eyebrow, Caption, Quote) */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; }
.display-xl, .display-l, .heading-m, .heading-s { font-family: var(--display); margin: 0; }
.display-xl { font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: 0.5px; text-transform: uppercase; }
.display-l { font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.1; letter-spacing: 0.5px; text-transform: uppercase; }
.heading-m { font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.2; letter-spacing: -0.3px; }
.heading-s { font-family: var(--display); font-weight: 500; font-size: 1.12rem; line-height: 1.35; letter-spacing: -0.1px; }
.subtitle { color: var(--teal); }
.eyebrow { font: 600 0.75rem/1.2 var(--display); letter-spacing: 1.6px; text-transform: uppercase; color: var(--orange); margin: 0 0 14px; }
.eyebrow.teal { color: var(--teal); }
.lede { color: var(--ink-soft); font-size: 1.12rem; line-height: 1.6; max-width: 60ch; }
.caption { font: 500 0.72rem/1.4 var(--body); letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-soft); }
.quote { font-style: italic; color: var(--teal); font-size: 1.2rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 0.95rem/1 var(--display); letter-spacing: 0.3px; padding: 15px 22px; border-radius: var(--r); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: background .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #F08A0C; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-small { padding: 10px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* Surfaces */
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); position: relative; }
.panel.ruled::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 5px; background: var(--brand-rule); border-radius: var(--r) var(--r) 0 0; }
.stage { background: var(--paper-deep); border-radius: var(--r); padding: 18px 18px 20px; }
.stage::before { content: ''; display: block; width: 28px; height: 3px; background: var(--orange); margin-bottom: 12px; }

/* Forms */
.auth-shell { position: relative; z-index: 1; min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(460px, 100%); padding: 44px 40px 36px; }
.auth-card h1 { margin-bottom: 10px; }
.auth-card p.lede { font-size: 1rem; margin: 0 0 26px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font: 600 0.72rem/1.2 var(--display); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea { width: 100%; padding: 13px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 1rem var(--body); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 171, 173, .18); }
.auth-card .btn { width: 100%; margin-top: 6px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-soft); font: inherit; font-size: 0.92rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.below { margin-top: 22px; text-align: center; }
.msg { min-height: 1.4em; font-size: 0.93rem; margin: 14px 0 0; }
.msg.error { color: var(--danger); }
.msg.ok { color: #00797B; }
.hidden { display: none !important; }

/* Footer: mirrors the brochure cover footer */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--rule); margin-top: 40px; padding: 30px 0 48px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot .who { font: 500 1rem/1.35 var(--display); }
.foot .tag { font: 600 0.66rem/1.2 var(--display); letter-spacing: 1.6px; text-transform: uppercase; color: var(--teal); margin-top: 6px; }
.foot .meta { color: var(--ink-soft); font-size: 0.85rem; align-self: end; }
.foot a { color: var(--ink-soft); }

@media (max-width: 720px) {
  .brand img { height: 64px; }
  .bar.auth-bar { justify-content: center; padding: 28px 0 8px; }
  .bar.auth-bar nav { display: none; }
  .bar.auth-bar .brand img { height: 104px; }
  .auth-shell { min-height: 0; padding-top: 8px; align-items: start; }
  .below .sep { display: block; height: 10px; font-size: 0; }
  .bar nav a.plain { display: none; }
  .auth-card { padding: 36px 26px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* Whiteboard stories only live in the side gutters. Below this width there are no gutters,
   so the layer is hidden rather than drawing over content. */
@media (max-width: 1360px) {
  .wb-layer { display: none; }
}
