/* ==========================================================================
   HARFOUSH — Technology & Solution Advisory
   Design system: dark, technical, architectural.
   Grounded in schematic/blueprint drafting conventions — precise lines,
   generous negative space, one signal color for what has been kept.
   ========================================================================== */

:root {
  /* Color */
  --bg: #0a0d11;
  --bg-elevated: #10141a;
  --bg-elevated-2: #171c24;
  --line: #232a34;
  --line-soft: #1a2028;
  --text: #e9ebee;
  --text-muted: #8890a0;
  --text-faint: #5b6272;
  --accent: #4fb8a0;
  --accent-strong: #7fd6c0;
  --accent-dim: #1c3a34;
  --accent-text: #0a0d11;

  /* Type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --fs-h1: clamp(2.5rem, 4.6vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 2.8vw, 2.375rem);
  --fs-h3: 1.375rem;
  --fs-h4: 1.0625rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-micro: 0.8125rem;

  --measure: 38em;
  --container: 1160px;

  --radius-s: 3px;
  --radius-m: 5px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-h4); font-weight: 600; }

p {
  margin: 0 0 1.1em;
  max-width: var(--measure);
  color: var(--text);
}

p.lead {
  font-size: 1.1875rem;
  color: var(--text-muted);
  max-width: 34em;
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

ul, ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
  max-width: var(--measure);
}
li { margin-bottom: 0.5em; }
li::marker { color: var(--text-faint); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

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

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

section { padding: 88px 0; }
section.tight { padding: 56px 0; }

@media (max-width: 780px) {
  section { padding: 60px 0; }
}

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Header --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 13, 17, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logotype {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: 0.01em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.logotype .mark {
  color: var(--accent);
}

.logotype .role {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-micro);
  color: var(--text-faint);
  display: none;
}

@media (min-width: 640px) {
  .logotype .role { display: inline; }
}

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

.nav-links a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: color 0.15s var(--ease);
  position: relative;
}

.nav-links a:hover { color: var(--text); }

.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: var(--radius-s);
  color: var(--text) !important;
  font-size: 0.9375rem;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-cta:hover { border-color: var(--accent); background: var(--accent-dim); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links { 
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a { padding: 13px 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .nav-toggle { display: inline-flex; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-s);
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease), opacity 0.15s var(--ease);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover { background: var(--accent-strong); }

.btn-secondary {
  border-color: var(--line);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-strong); }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

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

.hero {
  padding: 76px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero h1 { margin-bottom: 0.45em; }

.hero-diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-elevated);
  padding: 20px;
}

.diagram-caption {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-faint);
  margin: 14px 2px 0;
  letter-spacing: 0.01em;
}

/* Diagram element states */
.dg-node-rect { fill: var(--bg-elevated-2); stroke: var(--line); stroke-width: 1; }
.dg-node-kept { stroke: var(--accent); stroke-width: 1.4; }
.dg-node-cut { stroke: var(--line); stroke-dasharray: 3 3; opacity: 0.5; }
.dg-label { font-family: var(--font-mono); font-size: 10.5px; fill: var(--text-muted); }
.dg-label-kept { fill: var(--accent-strong); }
.dg-line { stroke: var(--line); stroke-width: 1; }
.dg-line-kept { stroke: var(--accent); stroke-width: 1.4; }
.dg-dot { fill: var(--accent); }
.dg-endpoint { fill: var(--bg-elevated-2); stroke: var(--accent); stroke-width: 1.4; }

.dg-trace {
  stroke-dasharray: 6 5;
  animation: dash 1.8s linear forwards;
}
@keyframes dash {
  from { stroke-dashoffset: 240; }
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dg-trace { animation: none; stroke-dashoffset: 0; }
}

/* Two-column split (audience) -------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
}

@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; }
}

.split > div {
  padding: 40px;
}

.split > div + div {
  border-left: 1px solid var(--line);
}

@media (max-width: 780px) {
  .split > div + div { border-left: none; border-top: 1px solid var(--line); }
}

.split h3 { margin-bottom: 0.6em; }
.split p { color: var(--text-muted); }

/* Philosophy strip --------------------------------------------------------- */

.philosophy-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip-flow {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px 20px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.strip-flow .arrow { color: var(--accent); font-weight: 400; }

.strip-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

@media (max-width: 780px) {
  .strip-notes { grid-template-columns: 1fr; }
}

.strip-notes h4 { color: var(--accent-strong); margin-bottom: 0.35em; font-size: 1rem; }
.strip-notes p { color: var(--text-muted); font-size: var(--fs-small); margin-bottom: 0; }

/* Services list ------------------------------------------------------------ */

.service-list { display: flex; flex-direction: column; }

.service-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.service-row:last-child { border-bottom: 1px solid var(--line); }

@media (max-width: 780px) {
  .service-row { grid-template-columns: 1fr; gap: 12px; }
}

.service-row h3 { margin-bottom: 0; }
.service-row .service-body p { color: var(--text-muted); }

.covers { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.covers span {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 4px 10px;
  line-height: 1.4;
}

.service-row .service-question {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--text-faint);
  margin-top: 12px;
}

/* Founder strip -------------------------------------------------------- */

.founder-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 780px) {
  .founder-strip { grid-template-columns: 1fr; }
}

.credential-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.credential-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.credential-list li span:first-child { color: var(--text); }

/* Insights list -------------------------------------------------------- */

.insight-list { display: flex; flex-direction: column; }

.insight-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.15s var(--ease);
}
.insight-row:last-child { border-bottom: 1px solid var(--line); }
.insight-row:hover { opacity: 0.75; }

.insight-row h3 { margin-bottom: 0.3em; font-size: 1.1875rem; }
.insight-row p { color: var(--text-muted); font-size: var(--fs-small); margin: 0; }

.tag { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-faint); white-space: nowrap; }

/* CTA band --------------------------------------------------------------- */

.cta-band {
  border-top: 1px solid var(--line);
  text-align: left;
}

.cta-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 { margin-bottom: 0; max-width: 20em; }

/* Footer ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-grid h4 {
  font-size: var(--fs-micro);
  color: var(--text-faint);
  font-weight: 500;
  margin-bottom: 14px;
  font-family: var(--font-mono);
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-muted); font-size: var(--fs-small); }
.footer-grid a:hover { color: var(--accent-strong); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: var(--fs-micro);
}

/* Page header (interior pages) -------------------------------------------- */

.page-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}

.page-header h1 { max-width: 16em; }
.page-header p.lead { margin-top: 18px; }

/* Framework / numbered sequence (used only where content is a real sequence) */

.sequence { list-style: none; margin: 0; padding: 0; max-width: none; }

.sequence li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.sequence li:last-child { border-bottom: 1px solid var(--line); }

.sequence .num {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: var(--fs-small);
  padding-top: 2px;
}

.sequence h4 { margin-bottom: 0.35em; }
.sequence p { color: var(--text-muted); margin: 0; }

/* Definition blocks (Philosophy page) ------------------------------------- */

.definition {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.definition:last-of-type { border-bottom: 1px solid var(--line); }

@media (max-width: 700px) {
  .definition { grid-template-columns: 1fr; gap: 10px; }
}

.definition dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--accent-strong);
}
.definition dd { margin: 0; color: var(--text-muted); }

/* Quote / callout ---------------------------------------------------------- */

.callout {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  max-width: var(--measure);
}
.callout p { color: var(--text); font-size: 1.0625rem; margin: 0; font-style: normal; }

/* Article page ------------------------------------------------------------- */

.article-header { padding: 60px 0 32px; border-bottom: 1px solid var(--line); }
.article-meta { margin-bottom: 18px; }
.article-meta .tag { color: var(--accent-strong); }
.article-header h1 { max-width: 18em; }

.article-body { padding: 48px 0 24px; max-width: 42em; }
.article-body h2 { font-size: 1.4375rem; margin-top: 1.6em; }
.article-body p { color: var(--text); }
.article-body ul { color: var(--text); }

.article-footer { padding: 32px 0 80px; }

/* Form ---------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.field input, .field textarea, .field select {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  resize: vertical;
}

.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  outline: none;
}

.field textarea { min-height: 140px; }

.form-note {
  font-size: var(--fs-small);
  color: var(--text-faint);
  margin-top: 4px;
}

.form-status {
  margin-top: 18px;
  font-size: var(--fs-small);
  color: var(--accent-strong);
  display: none;
}
.form-status.is-visible { display: block; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

.contact-detail { padding: 22px 0; border-top: 1px solid var(--line); }
.contact-detail:last-child { border-bottom: 1px solid var(--line); }
.contact-detail h4 { font-size: var(--fs-micro); font-family: var(--font-mono); color: var(--text-faint); font-weight: 500; margin-bottom: 8px; }
.contact-detail a, .contact-detail p { color: var(--text); margin: 0; }


