/* ============================================
   Ashraf Al Shafaki — alshafaki.com
   ============================================ */

:root {
  --ink:          #14181F;
  --ink-soft:     #2B323D;
  --slate:        #5C6573;
  --slate-light:  #8A9199;
  --paper:        #FBFAF7;
  --band:         #F1F0EC;
  --rule:         #DEDCD5;
  --rule-strong:  #C6C3B9;
  --accent:       #175E54;
  --accent-mid:   #2E8676;
  --accent-light: #63B9A4;

  --font-display: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Newsreader', Georgia, 'Times New Roman', serif;

  --measure: 62ch;
  --gutter: 2rem;
  --rail: 2.75rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.skip-link:focus { left: 0; }

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

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

.rail {
  border-left: 1px solid var(--rule);
  padding-left: var(--rail);
  max-width: 46rem;
}

.section {
  position: relative;
  padding: 4.5rem 0 0;
}

.section:first-child { padding-top: 3.25rem; }

.section::before {
  content: '';
  position: absolute;
  top: 4.5rem;
  left: calc(-1 * var(--rail) - 1px);
  width: 26px;
  height: 2px;
  background: var(--accent);
}

.section:first-child::before { top: 3.25rem; }

.section.no-tick::before { display: none; }

.section-last { padding-bottom: 5.5rem; }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  line-height: 1.18;
  margin-bottom: 1.15rem;
}

h3 {
  font-size: 1.22rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 1rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
}

p { margin: 0 0 1.25rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.32rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.dek {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  max-width: 46ch;
}

.muted { color: var(--slate); }

.meta {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--slate);
  letter-spacing: 0.005em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.93);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.brand span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

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

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  padding: 0.82rem 1.6rem;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.arrow-link {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.arrow-link::after {
  content: '→';
  transition: transform 0.18s ease;
}
.arrow-link:hover { text-decoration: none; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- Proof band (full bleed, dark) ---------- */

.band-dark {
  background: var(--ink);
  color: var(--paper);
  margin-top: 4.5rem;
}

.band-dark .band-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 2.5rem 2rem;
  padding-top: 3.25rem;
  padding-bottom: 3.25rem;
}

.stat-figure {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--paper);
  margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  line-height: 1.5;
}

/* ---------- Light band ---------- */

.band-light {
  background: var(--band);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 4.5rem;
}
.band-light .band-inner {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

/* ---------- Path cards ---------- */

.paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.25rem;
  max-width: 46rem;
}

.path {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 1.9rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease;
}
.path:hover { border-color: var(--rule-strong); }

.path .path-kicker {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.path p { font-size: 1.02rem; line-height: 1.65; }
.path .arrow-link { margin-top: auto; padding-top: 1.4rem; }

/* ---------- Stages (consulting process) ---------- */

.stages { margin-top: 2.5rem; max-width: 44rem; }

.stage {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 1.5rem;
  padding: 1.85rem 0;
  border-top: 1px solid var(--rule);
}
.stage:last-child { border-bottom: 1px solid var(--rule); }

.stage-num {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.stage-body p { font-size: 1.05rem; }
.stage-body p:last-child { margin-bottom: 0; }

.stage-meta {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.75rem;
  letter-spacing: 0.01em;
}

/* ---------- Definition blocks ---------- */

.defs { margin-top: 2.25rem; max-width: 44rem; }

.def {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.def:last-child { border-bottom: 1px solid var(--rule); }
.def p { font-size: 1.05rem; margin-bottom: 0; }
.def p + p { margin-top: 0.75rem; }

/* ---------- Tag list ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.tags li {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  padding: 0.42rem 0.9rem;
}

/* ---------- Spec list (delivery details) ---------- */

.specs {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 40rem;
}

.specs li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  font-size: 1.02rem;
}
.specs li:last-child { border-bottom: 1px solid var(--rule); }

.specs dt, .specs .spec-key {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  padding-top: 0.28rem;
}

/* ---------- Pull quote ---------- */

.quote {
  margin: 2.5rem 0 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--accent);
  max-width: 40rem;
}
.quote p {
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 0.9rem;
}
.quote footer {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--slate);
  font-style: normal;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: 2.25rem;
  max-width: 44rem;
}

.contact-item .eyebrow { margin-bottom: 0.6rem; }
.contact-item a { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding: 2.75rem 0 3.5rem;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.footer-nav a { color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }

.footer-meta {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--slate-light);
  letter-spacing: 0.01em;
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  :root { --gutter: 1.35rem; --rail: 1.4rem; }

  body { font-size: 1.05rem; }

  .rail { padding-left: var(--rail); }

  .section::before { width: 16px; }

  .nav { gap: 1.1rem; font-size: 0.85rem; }
  .nav .nav-hide-sm { display: none; }

  .brand span { display: none; }

  .lede { font-size: 1.18rem; }

  .stage { grid-template-columns: 1fr; gap: 0.5rem; }
  .stage-num { padding-top: 0; }

  .specs li { grid-template-columns: 1fr; gap: 0.25rem; }
  .specs dt, .specs .spec-key { padding-top: 0; }

  .btn-row { gap: 0.7rem; }
  .btn { padding: 0.75rem 1.3rem; font-size: 0.9rem; }

  .stat-figure { font-size: 1.8rem; }
}

@media (max-width: 400px) {
  .btn { width: 100%; text-align: center; }
}
