/* ============================================================
   saadalaref.com — shared stylesheet
   Single-theme by design: the site is a terminal, it is dark.
   Token values are taken verbatim from the design handoff.
   ============================================================ */

:root {
  /* ground */
  --ground:        #080A0D;
  --ground-raised: #0A0D11;

  /* text */
  --text-primary:  #F0F4F6;
  --text-body:     #C3D2D9;
  --text-body-alt: #B9CBD6;
  --text-muted:    #93A8B5;
  --text-label:    #7E9AAA;

  /* semantic accents: red = offense, teal = defense, gold = craft */
  --offense:       #FF7A6B;
  --offense-alt:   #E2564A;
  --defense:       #4FBFA8;
  --defense-hover: #7FD9C6;
  --craft:         #E0C25B;
  --on-offense:    #DCC4BF;
  --on-craft:      #CFC7A9;

  /* rules */
  --hairline:      1px solid rgba(240, 244, 246, 0.12);
  --hairline-soft: 1px solid rgba(240, 244, 246, 0.08);
  --row-active:    rgba(240, 244, 246, 0.06);
  --row-hover:     rgba(240, 244, 246, 0.04);

  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

html, body { margin: 0; padding: 0; background: var(--ground); }

body {
  font-family: var(--sans);
  color: var(--text-body-alt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--defense); text-decoration: none; }
a:hover { color: var(--defense-hover); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--defense);
  outline-offset: 2px;
}
::selection { background: var(--defense); color: var(--ground); }

p { text-wrap: pretty; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes rise  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

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

/* ---------- skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--defense); color: var(--ground);
  font-family: var(--mono); font-size: 12px; padding: 10px 16px;
}
.skip:focus { left: 0; color: var(--ground); }

/* ============================================================
   Shared chrome for the five scrolling pages
   ============================================================ */

.nav {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 12px clamp(10px, 1.6vw, 18px);
  padding: 16px clamp(20px, 4vw, 40px);
  border-bottom: var(--hairline);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
}
.nav-home { color: var(--defense); white-space: nowrap; }
.nav-links {
  display: flex; flex-wrap: wrap;
  gap: clamp(10px, 1.6vw, 18px);
}
.nav-links a { color: var(--text-muted); text-transform: uppercase; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a[aria-current="page"] { color: var(--text-primary); }

.page { padding: 0 clamp(20px, 4vw, 40px); }
.wrap { max-width: 820px; margin: 0 auto; }
.wrap-wide { max-width: 880px; margin: 0 auto; }

.page-header { padding: clamp(56px, 8vw, 96px) 0 clamp(30px, 4vw, 48px); }
.crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--text-label); margin: 0 0 20px;
}
h1 {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(40px, 7vw, 74px);
  letter-spacing: -0.04em; line-height: 0.94;
  color: var(--text-primary); margin: 0 0 24px;
  text-wrap: balance;
}
.lead {
  font-size: clamp(16px, 1.8vw, 19px); line-height: 1.6;
  color: var(--text-body-alt); max-width: 34em; margin: 0;
}

.section { border-top: var(--hairline); padding-top: 44px; margin-bottom: 78px; }
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-label); margin: 0 0 40px;
}

.body-text {
  font-size: 17px; line-height: 1.75; color: var(--text-body-alt);
  max-width: 38em; margin: 0 0 18px;
}
.body-text:last-child { margin-bottom: 0; }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  padding: 5px 9px; border-radius: 2px; border: 1px solid;
  white-space: nowrap;
}
.tag-offense { border-color: #FF7A6B55; color: var(--on-offense); }
.tag-defense { border-color: #4FBFA855; color: var(--text-body); }
.tag-craft   { border-color: #E0C25B55; color: var(--on-craft); }
.tag-dim     { border-color: rgba(240, 244, 246, 0.18); color: var(--text-muted); }

/* ---------- articles with a left accent bar ---------- */
.entry { border-left: 2px solid; padding-left: clamp(16px, 2.4vw, 24px); margin-bottom: 52px; }
.entry:last-child { margin-bottom: 0; }
.entry-offense { border-color: var(--offense); }
.entry-defense { border-color: var(--defense); }
.entry-craft   { border-color: var(--craft); }
.entry-dim     { border-color: rgba(240, 244, 246, 0.22); }

.eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; margin: 0 0 12px;
}
.eyebrow-offense { color: var(--offense-alt); }
.eyebrow-defense { color: var(--defense); }
.eyebrow-craft   { color: var(--craft); }
.eyebrow-dim     { color: var(--text-label); }

h2 {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -0.025em;
  line-height: 1.1; color: var(--text-primary); margin: 0 0 14px;
  text-wrap: balance;
}
h3 {
  font-family: var(--sans); font-weight: 800; font-size: 19px;
  letter-spacing: -0.02em; color: var(--text-primary); margin: 0 0 10px;
}

.bullets { margin: 14px 0 0; padding-left: 18px; color: var(--text-body-alt); max-width: 38em; }
.bullets li { margin-bottom: 9px; line-height: 1.7; font-size: 16px; }
.bullets li::marker { color: var(--text-label); }

/* ---------- justified metadata rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  justify-content: space-between; align-items: baseline;
  padding: 15px 0; border-bottom: var(--hairline-soft);
}
.row:first-child { border-top: var(--hairline-soft); }
.row-main { color: var(--text-primary); font-size: 16px; }
.row-meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--text-label); text-transform: uppercase;
}

/* ---------- two-column definition grid ---------- */
.defs { display: grid; gap: 30px 0; }
.def { display: grid; grid-template-columns: clamp(80px, 11vw, 130px) 1fr; gap: 0 20px; align-items: start; }
.def-key {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; padding-top: 3px;
}
.def-body { font-size: 16px; line-height: 1.7; color: var(--text-body-alt); max-width: 34em; }

/* ---------- process grid ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 24px; }
.step { border-top: 2px solid; padding-top: 14px; }
.step-num {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; margin: 0 0 8px;
}
.step p { font-size: 15px; line-height: 1.65; color: var(--text-body-alt); margin: 0; }

/* ---------- closing CTA ---------- */
.cta { border-top: var(--hairline); padding: 44px 0 clamp(60px, 8vw, 90px); }
.cta h2 {
  font-size: clamp(26px, 4vw, 44px); letter-spacing: -0.03em;
  line-height: 1.05; margin: 0 0 26px; max-width: 18em;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 13px 20px; border-radius: 2px; border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--defense); color: var(--ground); }
.btn-primary:hover { background: var(--defense-hover); color: var(--ground); }
.btn-ghost { border-color: rgba(240, 244, 246, 0.22); color: var(--text-body-alt); }
.btn-ghost:hover { border-color: var(--defense); color: var(--defense); }

.foot {
  border-top: var(--hairline); padding: 26px clamp(20px, 4vw, 40px) 40px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--text-label);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
}

@media (max-width: 560px) {
  .def { grid-template-columns: 1fr; gap: 6px; }
}

/* ============================================================
   Contact form
   ============================================================ */

.form { display: flex; flex-direction: column; gap: 22px; max-width: 34em; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-label);
}
.field .opt { text-transform: none; letter-spacing: 0.04em; opacity: 0.7; }

.field input,
.field select,
.field textarea {
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  color: var(--text-primary);
  background: var(--ground-raised);
  border: 1px solid rgba(240, 244, 246, 0.16);
  border-radius: 2px; padding: 11px 13px; width: 100%;
  transition: border-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  font-family: var(--mono); font-size: 13px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7E9AAA 50%), linear-gradient(135deg, #7E9AAA 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.field select option { background: var(--ground-raised); color: var(--text-primary); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(240, 244, 246, 0.28); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--defense);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--offense); }

.hint { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-label); margin: 0; }
.field-error { font-family: var(--mono); font-size: 10.5px; color: var(--offense); margin: 0; }

/* honeypot: removed from the visual and a11y trees, still submitted */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
button.btn { cursor: pointer; font-family: var(--mono); }
button.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.form-status {
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  margin: 0; min-height: 1.2em;
}
.form-status.is-ok   { color: var(--defense); }
.form-status.is-err  { color: var(--offense); }
.form-status.is-busy { color: var(--text-label); }

/* ---------- "what I take on" list ---------- */
.takes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.takes li {
  display: grid; grid-template-columns: 22px 1fr; gap: 0 8px;
  font-size: 16px; line-height: 1.7; color: var(--text-body-alt); max-width: 38em;
}
.mark { font-family: var(--mono); font-weight: 500; }
.mark-offense { color: var(--offense); }
.mark-defense { color: var(--defense); }
.mark-craft   { color: var(--craft); }

.turnstile-slot:empty { display: none; }
.turnstile-slot { margin: 4px 0; }
