/* ==========================================================================
   KELMMARAH — Light Visual System & Clean Architectural Design
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-footer: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-head: #0f172a;
  --text-body: #475569;
  --text-muted: #64748b;
  --text-dark: #000000;
  --accent: #059669;
  --accent-light: #10b981;
  --accent-bg: rgba(5, 150, 105, 0.08);
  --accent-border: rgba(5, 150, 105, 0.25);
  --error: #dc2626;
  --width: 1200px;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-body);
  background-color: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-size: 15px;
  line-height: 1.68;
  color: var(--text-body);
  background-color: var(--bg);
  min-width: 320px;
  overflow-x: hidden;
}

body, button, input, select, textarea {
  font-family: inherit;
}

button, input, select, textarea {
  font-size: 0.9375rem;
}

button, a, input, select, textarea, summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 1.5px;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button, input, select, textarea {
  border-radius: var(--radius-sm);
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-bg);
  color: var(--text-head);
}

.wrap {
  width: min(var(--width), calc(100% - 48px));
  margin-inline: auto;
}

/* Accessibility skip link */
.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: #ffffff;
  color: var(--text-head);
  border: 1px solid var(--accent);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.2s ease;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.skip:focus {
  transform: translateY(0);
}

/* Status Dot with pulse */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
  display: inline-block;
  flex-shrink: 0;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 40;
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 17px;
  letter-spacing: -0.3px;
  font-weight: 700;
  color: var(--text-head);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  color: #000000;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-text span {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-head);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* Navigation CTA Specificity & Contrast */
.nav a.button,
.nav .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text-head);
  color: #ffffff !important;
  border: 1px solid var(--text-head);
  border-bottom: 1px solid var(--text-head);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav a.button:hover,
.nav .button:hover {
  background: #1e293b;
  border-color: #1e293b;
  border-bottom-color: #1e293b;
  color: #ffffff !important;
  text-decoration: none;
}

.nav a.button:focus-visible,
.nav .button:focus-visible {
  background: var(--text-head);
  color: #ffffff !important;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-bottom-color: var(--text-head);
  text-decoration: none;
}

.nav a.button:active,
.nav .button:active,
.nav a.button.active,
.nav .button.active {
  background: #1e293b;
  color: #ffffff !important;
  border-bottom-color: #1e293b;
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  background: var(--text-head);
  color: #ffffff;
  border: 1px solid var(--text-head);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #ffffff;
  text-decoration: none;
}

.button.secondary {
  color: var(--text-head);
  background: #ffffff;
  border-color: var(--border-strong);
}

.button.secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-head);
  color: var(--text-head);
}

.menu-button {
  display: none;
  background: #ffffff;
  color: var(--text-head);
  border: 1px solid var(--border-strong);
  min-height: 40px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

/* Sections */
.section {
  padding: 76px 0;
  border-bottom: 1px solid var(--border);
}

.section.subtle {
  background-color: var(--bg-subtle);
}

.section-label,
.section-intro .section-label,
.section-eyebrow,
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--accent);
}

h1, h2, h3, h4 {
  color: var(--text-head);
  font-weight: 700;
  letter-spacing: -0.5px;
}

h1 {
  font-size: clamp(2.35rem, 4.2vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -1.4px;
  margin: 0;
}

h1 .subtitle-line {
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-top: 4px;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.22;
  margin: 0 0 16px;
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 0 0 12px;
  font-weight: 700;
}

p {
  margin: 0 0 16px;
  line-height: 1.68;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 48px;
  align-items: start;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-head);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-intro {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: var(--text-body);
  max-width: 640px;
  margin: 22px 0 32px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-aside {
  align-self: center;
  border-left: 1px solid var(--border);
  padding-left: 36px;
  padding-top: 12px;
  padding-bottom: 6px;
}

.hero-aside h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--text-head);
  letter-spacing: -0.2px;
}

.hero-aside p {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

.hero-aside a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-aside a:hover {
  color: #047857;
  text-decoration: underline;
}

.hero-aside a:focus-visible {
  color: #047857;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  text-decoration: underline;
}

.principles {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-top: 56px;
  font-size: 13px;
  color: var(--text-muted);
}

.principles span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Capabilities */
.section-intro {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-intro p:not(.section-label) {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.capability-card {
  padding: 30px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.capability-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.capability-card.featured {
  border-color: var(--accent-border);
  background: #ffffff;
}

.card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.badge-high-impact {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.capability-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 24px;
}

.card-tech {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* About & Developers Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  margin-bottom: 56px;
  align-items: start;
}

.about-copy .philosophy {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-head);
  font-weight: 500;
  margin-bottom: 18px;
}

.about-copy p {
  color: var(--text-body);
}

.leadership-header {
  margin-bottom: 32px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.developer-card {
  padding: 30px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.developer-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.developer-bio {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 20px;
}

.team-contact-block {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.team-contact-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-head);
  margin: 0 0 6px;
}

.team-contact-email {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.team-contact-email:hover {
  text-decoration: underline;
}

/* Methodology Framework */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.methodology-step {
  border-top: 2px solid var(--accent);
  padding-top: 22px;
}

.step-num {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.methodology-step h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.methodology-step p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

/* Proof of Execution (Case Studies) */
.execution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.execution-card {
  padding: 32px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.execution-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.execution-tag {
  color: var(--accent);
  font-weight: 700;
}

.execution-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.execution-points {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.execution-point {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

.execution-point strong {
  color: var(--text-head);
  font-weight: 600;
}

.execution-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.verified-pill {
  color: var(--accent);
  font-weight: 700;
}

/* Client Feedback / Testimonials */
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.feedback-card {
  padding: 28px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feedback-card blockquote {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-body);
}

.feedback-card figcaption {
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

/* Corporate Governance */
.governance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.governance-card {
  padding: 30px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.governance-eyebrow {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.governance-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.governance-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 18px;
}

.governance-list {
  list-style: none;
  padding: 16px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.governance-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.5;
}

.governance-list li .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
}

.text-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: #047857;
}

/* FAQ */
.faq-wrap {
  max-width: 860px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 36px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item[open] {
  border-color: var(--accent-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-head);
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-arrow {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-item p {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
}

/* Technical Intake Form */
.intake-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.intake-intro {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-head);
}

.field label .optional {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.field label .required {
  color: var(--accent);
}

input, select, textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  color: var(--text-head);
  border: 1px solid var(--border-strong);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 36px;
}

select option {
  background-color: #ffffff;
  color: var(--text-head);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
}

[aria-invalid="true"] {
  border-color: var(--error) !important;
}

.form-status {
  font-size: 13px;
  margin-top: 14px;
}

.form-status:empty {
  display: none;
}

.form-status.error {
  color: var(--error);
}

.form-success {
  padding: 36px;
  background-color: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  text-align: center;
}

.form-success h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-body);
  font-size: 15px;
  margin-bottom: 24px;
}

/* Corporate Footer */
.site-footer {
  padding: 64px 0 40px;
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-body);
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.footer-email {
  margin-top: 10px;
}

.footer-email a {
  font-size: 13px;
  color: var(--text-head);
  text-decoration: none;
  font-weight: 500;
}

.footer-email a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-head);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col li a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col li a:hover {
  color: var(--text-head);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-byline {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* KELMMARAH Desk Help Widget */
.help-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  background: var(--text-head);
  color: #ffffff;
  border: 1px solid var(--text-head);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-radius: 9999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.help-launcher:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.help-panel {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  width: min(400px, calc(100% - 32px));
  height: min(580px, calc(100dvh - 32px));
  max-height: calc(var(--help-height, 100dvh) - 32px);
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  bottom: calc(24px + var(--keyboard-offset, 0px));
}

.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.help-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-header h2 {
  font-size: 14px;
  letter-spacing: 0;
  margin: 0;
  color: var(--text-head);
}

.help-header p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.help-close {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.help-close:hover {
  color: var(--text-head);
}

.help-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  border-radius: var(--radius-sm);
}

.message p {
  margin: 0 0 6px;
  white-space: pre-wrap;
}

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

.message.user {
  background: var(--text-head);
  color: #ffffff;
  font-weight: 500;
  padding: 10px 14px;
  align-self: flex-end;
  margin-left: 32px;
}

.message.assistant {
  background: var(--bg-subtle);
  color: var(--text-head);
  border: 1px solid var(--border);
  padding: 12px 14px;
  align-self: flex-start;
  margin-right: 24px;
}

.message a {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.help-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  max-height: 110px;
  overflow-y: auto;
  flex-shrink: 0;
}

.help-topics button {
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-head);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.help-topics button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.help-form {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.help-form input {
  font-size: 13px;
  padding: 9px 12px;
  flex: 1;
  width: 0;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-head);
}

.help-form button {
  padding: 9px 15px;
  font-size: 13px;
  background: var(--text-head);
  color: #ffffff;
  font-weight: 600;
}

.help-form button:hover {
  background: #1e293b;
}

.help-footnote {
  font-size: 11px;
  margin: 0;
  padding: 0 14px 10px;
  background: #ffffff;
  color: var(--text-muted);
}

.help-footnote a {
  color: var(--accent);
  text-decoration: underline;
}

/* Legal / Policy Pages */
.policy {
  max-width: 800px;
  padding: 76px 0 96px;
}

.policy h1 {
  font-size: clamp(2.2rem, 3.8vw, 2.85rem);
  margin-bottom: 24px;
}

.policy h2 {
  font-size: 1.35rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.policy p, .policy li {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.7;
}

.policy ul {
  padding-left: 20px;
  margin: 0 0 20px;
}

.policy li {
  margin-bottom: 8px;
}

.policy .button {
  margin-top: 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (min-width: 1001px) {
  .nav {
    display: flex !important;
  }
}

@media (max-width: 1000px) {
  .header-inner {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .menu-button:not([hidden]) {
    display: block;
  }

  .nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
  }

  .nav a {
    padding: 6px 0;
    font-size: 15px;
  }

  .nav .button,
  .nav a.button {
    width: 100%;
    margin-top: 8px;
    padding: 10px 20px;
    text-align: center;
    color: #ffffff !important;
  }

  .hero-grid {
    grid-template-columns: 1.6fr 1fr;
    gap: 36px;
  }

  .principles {
    gap: 12px 25px;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .methodology-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .governance-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 80px;
  }

  .wrap {
    width: calc(100% - 32px);
  }

  .section {
    padding: 52px 0;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-aside {
    align-self: auto;
    margin-bottom: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-left: 0;
    padding-top: 20px;
    padding-bottom: 0;
  }

  .hero-eyebrow {
    font-size: 11px;
    padding: 5px 10px;
  }

  .principles {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 12px;
    gap: 12px 18px;
    padding: 18px 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .execution-grid {
    grid-template-columns: 1fr;
  }

  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .intake-container {
    padding: 24px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .help-launcher {
    right: 16px;
    bottom: 16px;
  }

  .help-panel {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 360px) {
  .hero-actions .button {
    width: 100%;
  }

  .help-topics {
    max-height: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html, .help-log {
    scroll-behavior: auto;
  }

  *, *:before, *:after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header, .help-launcher, .help-panel, .contact-form, .skip, .menu-button {
    display: none !important;
  }

  .section {
    padding: 20px 0;
  }

  .wrap {
    width: 100%;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  h1, h2, h3, p {
    color: #000000 !important;
  }
}
