/* ============================================================
   Resilient Teams — marketing site styles
   Tokens map to brand system defined in the ORI Macro PRD.
   ============================================================ */

:root {
  /* App chrome */
  --surface-white: #FFFFFF;
  --surface-gray:  #F5F5F5;
  --border-gray:   #E8E8E8;
  --ink-secondary: #999898;
  --ink-primary:   #000000;

  /* Brand accents */
  --brand-teal:    #4592A8;
  --brand-teal-dk: #356E80;
  --brand-red:     #AD393E;

  /* Rubric (used only for the dimension list bullets) */
  --strong:        #059669;
  --developing-hi: #0D9488;
  --developing-md: #2563EB;
  --emerging:      #D97706;
  --at-risk:       #DC2626;

  /* Type */
  --display: "Oswald", "Helvetica Neue", Arial, sans-serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-white);
  color: var(--ink-primary);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand-teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}
a:hover { border-bottom-color: var(--brand-teal); }
a:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--brand-teal); color: #fff; }

/* ---------- Layout primitives ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 720px; }

section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--border-gray);
}

section:first-of-type { border-top: 0; }

.eyebrow {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin: 0 0 1.25rem;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  color: var(--ink-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  color: var(--brand-red);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  color: var(--brand-red);
  max-width: 22ch;
}

h3 {
  font-size: 1.15rem;
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-primary);
  margin-bottom: 0.5rem;
}

p { max-width: var(--measure); margin: 0 0 1rem; }

p.lede {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  max-width: 38ch;
  color: var(--ink-primary);
  margin-bottom: 2rem;
}

.note {
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

/* ---------- Header & footer ---------- */

.site-header {
  border-bottom: 1px solid var(--border-gray);
  padding: 1.25rem 0;
  background: var(--surface-white);
}

.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  text-transform: uppercase;
  color: var(--brand-red);
  border: 0;
}
.wordmark:hover { border: 0; color: var(--brand-red); }

.nav-link {
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.site-footer {
  border-top: 1px solid var(--border-gray);
  padding: 2.5rem 0 3rem;
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(5rem, 10vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 6.5rem);
  border-top: 0;
}

.hero .facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 2rem 0 2.5rem;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  list-style: none;
  padding: 0;
}
.hero .facts li::before {
  content: "—";
  margin-right: 0.5em;
  color: var(--border-gray);
}
.hero .facts li:first-child::before { display: none; margin: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85em 1.5em;
  border: 1px solid var(--brand-teal);
  background: var(--brand-teal);
  color: #fff;
  border-radius: 2px;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn:hover {
  background: var(--brand-teal-dk);
  border-color: var(--brand-teal-dk);
  border-bottom-color: var(--brand-teal-dk);
}

.btn.ghost {
  background: transparent;
  color: var(--brand-teal);
}
.btn.ghost:hover {
  background: transparent;
  color: var(--brand-teal-dk);
  border-color: var(--brand-teal-dk);
}

/* ---------- Dimensions grid ---------- */

.dimensions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-gray);
}

.dimension {
  padding: 1.75rem 1.75rem 1.75rem 0;
  border-bottom: 1px solid var(--border-gray);
}

.dimension:not(:nth-child(2n)) {
  border-right: 1px solid var(--border-gray);
  padding-right: 1.75rem;
}

@media (max-width: 640px) {
  .dimension { border-right: 0 !important; padding-right: 0; }
}

.dimension .name {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-red);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.dimension .name .num {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  font-weight: 400;
  letter-spacing: 0.1em;
}

.dimension p {
  font-size: 0.95rem;
  color: var(--ink-primary);
  margin: 0;
}

/* ---------- Sample item module ---------- */

.sample {
  background: var(--surface-gray);
  border-top: 1px solid var(--border-gray);
  border-bottom: 1px solid var(--border-gray);
}

.sample-card {
  background: var(--surface-white);
  border: 1px solid var(--border-gray);
  border-radius: 3px;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  margin: 2.5rem auto 0;
  max-width: 680px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.sample-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sample-label {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 1.25rem;
}

.sample-framing {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink-primary);
  margin-bottom: 1.25rem;
  max-width: 50ch;
}

.sample-question {
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
  line-height: 1.25;
  max-width: 38ch;
}

.sample-hold {
  font-style: italic;
  color: var(--ink-secondary);
  margin-bottom: 1.5rem;
}

.sample-item-text {
  font-family: var(--body);
  font-size: 1.15rem;
  color: var(--ink-primary);
  margin-bottom: 2rem;
  max-width: 42ch;
  line-height: 1.45;
}

.likert {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.likert button {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface-white);
  border: 1px solid var(--border-gray);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  font-family: var(--body);
  font-size: 0.97rem;
  color: var(--ink-primary);
  transition: border-color 120ms ease, background 120ms ease;
}

.likert button:hover {
  border-color: var(--brand-teal);
  background: #FAFCFD;
}

.likert button:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
}

.likert .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-secondary);
  flex-shrink: 0;
}

.likert button[data-selected="true"] .dot {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
}

.sample-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.sample-foot .next {
  background: transparent;
  border: 0;
  color: var(--brand-teal);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0;
}
.sample-foot .next:disabled { color: var(--ink-secondary); cursor: not-allowed; }
.sample-foot .next:hover:not(:disabled) { color: var(--brand-teal-dk); }

.progress {
  display: flex;
  gap: 4px;
}
.progress .pip {
  width: 22px;
  height: 3px;
  background: var(--border-gray);
}
.progress .pip.active { background: var(--ink-primary); }

.sample-end {
  text-align: center;
  padding: 2rem 1rem;
}
.sample-end .msg {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.5rem;
}
.sample-end p {
  color: var(--ink-secondary);
  margin: 0 auto 1.5rem;
  max-width: 36ch;
}
.sample-end button {
  background: transparent;
  border: 1px solid var(--border-gray);
  color: var(--ink-secondary);
  padding: 0.55rem 1rem;
  font-family: var(--body);
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 2px;
}
.sample-end button:hover { color: var(--ink-primary); border-color: var(--ink-secondary); }

/* ---------- Example profile report ---------- */

.profile {
  background: linear-gradient(180deg, var(--surface-white) 0%, #FAFAFA 100%);
}

.report-card {
  margin-top: 2.5rem;
  background: var(--surface-white);
  border: 1px solid var(--border-gray);
  border-radius: 3px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.report-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-gray);
  background: var(--surface-gray);
  color: var(--ink-secondary);
  font-size: 0.82rem;
}

.report-strip .title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-red);
}

.heatmap {
  display: grid;
  grid-template-columns: minmax(8.5rem, 1.2fr) repeat(7, minmax(4.5rem, 1fr));
  gap: 1px;
  padding: 1.25rem;
  background: var(--border-gray);
  overflow-x: auto;
}

.heatmap > * {
  min-width: 0;
}

.hdr,
.row-label,
.cell {
  min-height: 3.7rem;
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: var(--surface-white);
}

.hdr {
  justify-content: center;
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hdr.first {
  justify-content: flex-start;
}

.row-label {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.row-label small {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.cell {
  justify-content: center;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--surface-white);
}

.cell.strong { background: var(--strong); }
.cell.developing-hi { background: var(--developing-hi); }
.cell.developing-md { background: var(--developing-md); }
.cell.emerging { background: var(--emerging); }
.cell.at-risk { background: var(--at-risk); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-secondary);
  font-size: 0.76rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 1px;
  flex: 0 0 auto;
}

.insight {
  margin: 0 1.25rem 1.25rem;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--brand-teal);
  background: #F7FBFC;
}

.insight.flag-divergence {
  border-left-color: var(--brand-red);
  background: #FCF7F7;
}

.insight .label {
  margin: 0 0 0.25rem;
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.insight .metric {
  margin-bottom: 0.45rem;
  max-width: none;
  font-weight: 700;
  color: var(--ink-primary);
}

.insight p:last-child {
  margin-bottom: 0;
}

.report-caveat {
  margin: 1rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.86rem;
}

.also-includes {
  margin-top: 2.5rem;
}

/* ---------- Two-column rows ---------- */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .report-card {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .heatmap {
    grid-template-columns: 7rem repeat(7, 4.25rem);
    padding: 0.85rem;
  }

  .hdr,
  .row-label,
  .cell {
    min-height: 3.25rem;
    padding: 0.55rem;
  }

  .cell {
    font-size: 1.25rem;
  }
}

.two-col h2 { margin-top: 0; }

/* ---------- Numbered list (engagement steps) ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-gray);
}
.steps li:last-child { border-bottom: 1px solid var(--border-gray); }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-teal);
  line-height: 1;
}

.steps h3 { margin-top: 0.2rem; margin-bottom: 0.3rem; }
.steps p { margin: 0; font-size: 0.97rem; }

/* ---------- CTA strip ---------- */

.cta {
  background: var(--surface-gray);
  border-top: 1px solid var(--border-gray);
  border-bottom: 0;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.cta h2 { margin: 0; max-width: 28ch; }

/* ---------- Inline list ---------- */

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.checklist li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-gray);
  font-size: 0.97rem;
}
.checklist li:first-child { border-top: 1px solid var(--border-gray); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
