/* ClearRole marketing website shared stylesheet */

:root {
  --bg: #ffffff;
  --surface: #f9fafb;
  --text: #1a1a1a;
  --muted: #555555;
  --border: #c4c4c4;
  --border-light: #e5e7eb;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-text: #ffffff;
  --warn-bg: #fef3c7;
  --warn-border: #d97706;
  --pass-bg: #f3f4f6;
  --pass-text: #374151;
  --pass-border: #9ca3af;
  --apply-bg: #dcfce7;
  --apply-text: #166534;
  --apply-border: #16a34a;
  --chip-on: #dbeafe;
  --danger: #b91c1c;
  --radius: 8px;
  --radius-lg: 12px;
  --max-wide: 960px;
  --max-text: 700px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  background: var(--primary);
  color: var(--primary-text);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding-inline: 1rem;
}

.prose {
  max-width: var(--max-text);
}

.section.prose {
  max-width: none;
}

.section.prose > * {
  max-width: var(--max-text);
}

main {
  flex: 1 0 auto;
  padding-block: 2rem 3.5rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.75rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 0.25rem;
}

.brand:hover {
  color: var(--primary);
}

.nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li,
.footer-nav li {
  margin-bottom: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
}

.site-nav a:hover {
  background: var(--surface);
  color: var(--primary);
}

.site-nav a[aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Typography */
h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.55rem);
  line-height: 1.25;
  font-weight: 700;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text);
  max-width: 60ch;
}

.muted {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.small-note {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

ul,
ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}

.btn-sm {
  font-size: 0.9375rem;
  padding: 0.5rem 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-text);
}

.btn-secondary {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--chip-on);
  color: var(--primary-hover);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1.25rem 0.85rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block: 0.5rem 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

a.store-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Sections */
.section {
  padding-block: 2rem;
  border-top: 1px solid var(--border-light);
}

.section-first {
  padding-top: 0;
  border-top: 0;
}

.hero {
  padding-block: 1rem 2rem;
}

.hero h1 {
  max-width: 24ch;
}

/* Cards & grids */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg);
}

.card-surface {
  background: var(--surface);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.callout {
  border: 1px solid var(--primary);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.5rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.draft-banner {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.85rem 1.125rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Sample check card (mirrors app result card) */
.sample-wrap {
  max-width: 560px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--bg);
}

.result-kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.result-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.result-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.badge-box {
  border: 2px solid var(--pass-border);
  background: var(--pass-bg);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.badge-text {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--pass-text);
  margin: 0;
  line-height: 1.1;
}

.doing-heading {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.doing-body {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: var(--text);
}

.caution-box {
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.caution-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.45rem;
  color: var(--text);
}

.caution-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
}

.caution-list li {
  margin-bottom: 0.3rem;
}

.caution-list li:last-child {
  margin-bottom: 0;
}

.sample-caption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Closing band */
.closing-band {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.5rem;
  margin-top: 2rem;
}

.closing-band h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* FAQ */
.faq-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.faq-item {
  padding-block: 1.125rem;
  border-top: 1px solid var(--border-light);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border-light);
}

.faq-item h2 {
  font-size: 1.125rem;
  margin: 0 0 0.45rem;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* Resource list and state picker */
.resource-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
}

.resource-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  background: var(--bg);
}

.resource-item h2 {
  font-size: 1.125rem;
  margin: 0 0 0.4rem;
}

.resource-item p:last-child {
  margin-bottom: 0;
}

.state-picker {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 360px;
}

.state-picker label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.state-picker select {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
}

.state-result {
  min-height: 1.5rem;
}

.state-result a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Inline tap-friendly links in lists */
.link-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.25rem;
}

.link-list li {
  padding-block: 0.45rem;
  border-bottom: 1px solid var(--border-light);
}

.link-list li:last-child {
  border-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-light);
  background: var(--surface);
  padding-block: 2rem;
  margin-top: auto;
}

.footer-tagline {
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.footer-nav a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.9375rem;
  min-height: 44px;
  padding: 0.5rem 0.35rem;
  display: inline-flex;
  align-items: center;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
  max-width: 72ch;
}

.footer-meta:last-child {
  margin-bottom: 0;
}

/* Hidden state kept last so no override keyword is needed */
[hidden],
.btn[hidden],
.store-badges[hidden],
.callout[hidden] {
  display: none;
}
