/* Code Savant public site — same shop-floor family as the platform */
:root {
  --paper: #eef0ef;
  --card: #ffffff;
  --ink: #1c262b;
  --ink-soft: #55666e;
  --line: #c9d2d5;
  --orange: #d95d0e;
  --orange-deep: #b04a06;
  --steel: #2c5f7c;
  --steel-tint: #e3ecf1;
  --lamp: #2e8b57;
  /* --lamp is bright enough for the indicator dot but only hits 4.25:1 as text,
     under the 4.5:1 WCAG AA floor. --lamp-text is the same green darkened to
     5.7:1 on white, for status wording low-vision readers have to actually read. */
  --lamp-text: #26744a;
  /* Was #8d999e — 2.92:1 on white, well under AA. #667378 is 4.9:1 and reads as
     the same soft grey. */
  --muted: #667378;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: uppercase;
}

a {
  color: var(--steel);
}

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

/* Dark bands: the orange ring alone is thin against near-black, so pair it with a
   light halo that keeps the focus position obvious either way. */
.top :focus-visible,
.signup-band :focus-visible,
.foot :focus-visible {
  outline-color: #ffb26b;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
}

/* Reachable by screen readers, invisible on screen. Not display:none — that would
   hide it from assistive tech too, which is the opposite of the point. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Off-screen until focused, then it drops into view as the first tab stop. */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.15s ease-in-out;
}

.skip-link:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}

/* Landing on <main> via the skip link should not draw a box round the whole page. */
main:focus {
  outline: none;
}

/* The eyebrow doubles as a section heading in places; keep the kicker look so the
   markup can be honest about structure without changing the design. */
.band h2.eyebrow {
  font-size: 14px;
  letter-spacing: 0.16em;
  margin: 0 0 10px;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

.mono {
  font-family: var(--mono);
}

.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin: 0 0 10px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 9px 18px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #2c3a41;
}

.btn:disabled {
  background: var(--muted);
  border-color: var(--muted);
  cursor: default;
}

.btn.big {
  font-size: 19px;
  padding: 12px 26px;
  background: var(--orange-deep);
  border-color: var(--orange-deep);
}

.btn.big:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.lamp {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 0 3px #e4f1e9;
  flex: none;
}

.lamp.off {
  background: var(--muted);
  box-shadow: 0 0 0 3px #e5e8e8;
}

/* top bar */
.top {
  background: var(--ink);
  color: #fff;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.top .btn {
  background: transparent;
  border-color: #4a5a61;
}

.top .btn:hover {
  border-color: var(--orange);
}

.wordmark-co {
  font-family: var(--mono);
  letter-spacing: 0.22em;
  font-size: 13px;
  color: var(--orange);
  display: block;
}

.wordmark-tag {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: #b9c4c8;
}

/* hero */
.hero {
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 34px,
      rgba(28, 38, 43, 0.025) 34px 38px
    ),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: start;
  padding-top: 64px;
  padding-bottom: 64px;
}

.hero-copy h1 {
  font-size: clamp(40px, 5.4vw, 62px);
  line-height: 0.98;
}

.hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 18px 0 0;
  max-width: 46ch;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-points li {
  padding-left: 22px;
  position: relative;
}

.hero-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.hero-cta {
  margin: 28px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-cta-note {
  color: var(--ink-soft);
  font-size: 14px;
}

/* live demo */
.demo {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  box-shadow: 0 18px 40px -24px rgba(28, 38, 43, 0.45);
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.demo-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.demo-sub {
  font-size: 11px;
  color: var(--ink-soft);
}

.demo-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
}

.demo-hint {
  color: var(--ink-soft);
  margin: 0;
  font-size: 15px;
}

.bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 15px;
}

.bubble.user {
  align-self: flex-end;
  background: var(--steel-tint);
  border: 1px solid var(--line);
}

.bubble.ava {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--orange);
}

.bubble.wait {
  align-self: flex-start;
  color: var(--muted);
  border: 1px dashed var(--line);
}

.bubble.error {
  align-self: stretch;
  color: var(--orange-deep);
  border: 1px solid var(--orange);
  background: #faeadd;
}

.demo-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.demo-input input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 11px;
  font: inherit;
}

.demo-end {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-top: 1px dashed var(--line);
  color: var(--steel);
  padding: 12px;
  cursor: pointer;
}

.demo-end:hover {
  color: var(--orange-deep);
}

/* the filed ticket */
.demo-ticket {
  margin: 0 16px 12px;
  border: 1px solid var(--lamp);
  background: #e4f1e9;
  border-radius: 6px;
  padding: 12px 14px;
}

.demo-ticket .ticket-head {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lamp-text);
  margin-bottom: 8px;
}

.demo-ticket dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 3px 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
}

.demo-ticket dt {
  color: var(--ink-soft);
}

.demo-ticket dd {
  margin: 0;
}

.btn.secondary-cta {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  font-size: 19px;
  padding: 12px 26px;
}

.btn.secondary-cta:hover {
  background: var(--steel-tint);
}

/* signup */
.signup-band {
  background: var(--ink);
  color: #e8ecec;
}

.signup-band .eyebrow {
  color: var(--orange);
}

.signup-band h2 {
  color: #fff;
}

.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.signup-copy p {
  color: #b9c4c8;
  max-width: 44ch;
}

.signup-note {
  font-size: 13px;
  color: var(--orange) !important;
}

.signup-form {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}

.flabel {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 4px;
}

.flabel em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.signup-form input,
.signup-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 11px;
  font: inherit;
}

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup-status {
  margin: 0;
  font-size: 14px;
  min-height: 1.4em;
}

.signup-status.ok {
  color: var(--lamp-text);
  font-weight: 600;
}

.signup-status.bad {
  color: var(--orange-deep);
}

/* post-demo hook */
.demo-hook {
  margin: 0 16px 14px;
  text-align: center;
}

.demo-hook a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

/* bands */
.band {
  padding: 56px 0;
}

.band.alt {
  background: #e7eae9;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.band h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 24px;
}

.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.slab {
  padding: 20px;
}

.slab h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.slab p {
  margin: 0;
  color: var(--ink-soft);
}

/* steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.steps li {
  counter-increment: step;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  position: relative;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--orange-deep);
  display: block;
  margin-bottom: 10px;
}

.steps h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

/* roster badges */
.badge-card {
  padding: 20px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  text-transform: uppercase;
}

.badge-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange-deep);
}

.badge-card p {
  margin: 4px 0 10px;
  color: var(--ink-soft);
}

.badge-status {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: auto;
}

.badge-status.available {
  color: var(--lamp-text);
}

/* closing */
.closing {
  text-align: center;
  max-width: 720px;
}

.closing p {
  color: var(--ink-soft);
  font-size: 17px;
}

.closing-cta {
  margin-top: 26px;
}

.closing-note {
  font-size: 14px;
  margin-top: 14px;
}

/* footer */
.foot {
  background: var(--ink);
  color: #b9c4c8;
  padding: 18px 0;
}

.foot a {
  color: #fff;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.foot .mono {
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--orange);
}

/* footer accessibility + privacy note */
.foot-note {
  border-top: 1px solid #33434a;
  margin-top: 14px;
  padding-top: 12px;
}

.foot-note p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #c3ced2;
  max-width: 78ch;
}

.foot-note strong {
  color: #fff;
}

/* cookie consent — hidden until config.js enables it */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--ink);
  color: #e8ecec;
  border-top: 3px solid var(--orange);
}

.consent[hidden] {
  display: none;
}

.consent-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 28px;
  align-items: center;
}

.consent-title {
  font-size: 18px;
  margin: 0;
  grid-column: 1;
}

.consent-body {
  margin: 0;
  font-size: 14px;
  color: #c3ced2;
  grid-column: 1;
  max-width: 70ch;
}

.consent-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Decline carries the same visual weight as accept on purpose: a buried or
   greyed-out reject is a dark pattern, and regulators treat it as one. */
.consent-decline {
  background: transparent;
  border-color: #7d8b91;
  color: #fff;
}

.consent-decline:hover {
  background: #2c3a41;
  border-color: #fff;
}

@media (max-width: 700px) {
  .consent-inner {
    grid-template-columns: 1fr;
  }

  .consent-actions {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .three,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .lamp:not(.off) {
    animation: lamp-breathe 3.2s ease-in-out infinite;
  }

  @keyframes lamp-breathe {
    0%,
    100% {
      box-shadow: 0 0 0 3px #e4f1e9;
    }
    50% {
      box-shadow: 0 0 0 5px #d3e8db;
    }
  }
}
