/* ============================================================
   EDITORIAL V2 — global design system (Phase 2 scope)
   Homepage hero + navigation + tokens + grain.
   Loaded after portfolio-v4.css on index.html only.
   Visual reference: references/portfolio-direction.png
   - near-black grainy stage, spotlight lift, vignette
   - oversized Latin display ("Portfolio") with photo-orb
   - acid-lime signature accent, restrained use
   - Arabic RTL supporting copy preserved
   ============================================================ */

/* Thmanyah Serif Display Black (local) — strong Arabic display weight.
   File already ships in ./fonts; no webfont download. */
@font-face {
  font-family: ThmanyahDisplay;
  src: url("./fonts/thmanyahserifdisplay-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ed-bg: #0a0a09;
  --ed-bg-2: #101010;
  --ed-ink: #f2efe9;
  --ed-muted: #a8a49b;
  --ed-faint: rgba(242, 239, 233, 0.55);
  --ed-line: rgba(242, 239, 233, 0.14);
  --ed-acid: #d7ff3f;
  --ed-acid-ink: #131507;
  --ed-display-latin: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ed-arabic: Thmanyah, Arial, sans-serif;
  --ed-display-arabic: ThmanyahDisplay, Thmanyah, serif;
  --ed-container: min(1240px, calc(100% - 48px));
  --ed-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- dark stage for homepage ---------- */
body.pf-body.ed-stage {
  background: var(--ed-bg);
  color: var(--ed-ink);
}

/* ---------- global film grain (lightweight, static) ---------- */
.ed-grain,
body.ed-stage::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.ed-stage ::selection {
  background: var(--ed-acid);
  color: var(--ed-acid-ink);
}

body.ed-stage :focus-visible {
  outline: 2px solid var(--ed-acid);
  outline-offset: 3px;
}

/* ---------- navigation: minimal dark ---------- */
body.ed-stage .pf-header {
  background: rgba(10, 10, 9, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ed-line);
  height: 72px;
}

body.ed-stage .pf-header.is-scrolled {
  height: 64px;
  background: rgba(10, 10, 9, 0.9);
  box-shadow: none;
}

body.ed-stage .pf-header::before {
  display: none;
}

body.ed-stage .pf-brand-copy b {
  color: var(--ed-ink);
}

body.ed-stage .pf-brand-copy span {
  color: var(--ed-muted);
}

body.ed-stage .pf-brand-mark {
  background: var(--ed-ink);
  border-color: var(--ed-line);
}

body.ed-stage .pf-links a {
  color: var(--ed-faint);
  font-family: var(--ed-display-latin);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.ed-stage .pf-links a:hover {
  color: var(--ed-ink);
}

body.ed-stage .pf-links a::after {
  background: var(--ed-acid);
}

body.ed-stage .pf-links a[aria-current="page"] {
  color: var(--ed-ink);
}

body.ed-stage .pf-links a[aria-current="page"]::after {
  background: var(--ed-acid);
}

body.ed-stage .pf-nav-cta {
  background: transparent !important;
  border: 1px solid var(--ed-line);
  color: var(--ed-ink) !important;
  border-radius: 0;
  box-shadow: none !important;
  transform: none !important;
}

body.ed-stage .pf-nav-cta::before {
  display: none;
}

body.ed-stage .pf-nav-cta:hover {
  border-color: var(--ed-acid);
  color: var(--ed-acid) !important;
  transform: none !important;
  box-shadow: none !important;
}

body.ed-stage .pf-nav-cta i {
  color: var(--ed-acid);
}

body.ed-stage .pf-menu-button {
  border-color: var(--ed-line);
}

body.ed-stage .pf-menu-button span {
  background: var(--ed-ink);
}

body.ed-stage .pf-mobile-nav {
  background: var(--ed-bg-2);
  border-bottom: 1px solid var(--ed-line);
}

body.ed-stage .pf-mobile-nav a {
  color: var(--ed-ink);
  border-bottom-color: var(--ed-line);
}

/* ============================================================
   HERO — poster composition (reference-led, not a copy)
   ============================================================ */
.ed-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(120px, 14vh, 160px) 0 clamp(48px, 7vh, 88px);
  background: var(--ed-bg);
  overflow: clip;
  isolation: isolate;
}

/* spotlight lift, like the reference's centre-top glow */
.ed-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 72% 52% at 50% 26%, rgba(255, 255, 255, 0.09), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 110%, rgba(0, 0, 0, 0.55), transparent 60%);
  pointer-events: none;
}

.ed-hero-inner {
  position: relative;
  z-index: 1;
  width: var(--ed-container);
  margin-inline: auto;
}

.ed-hero-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 clamp(10px, 2vh, 22px);
  font-family: var(--ed-display-latin);
  font-size: clamp(13px, 1.4vw, 19px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.ed-hero-eyebrow .w1 {
  color: var(--ed-ink);
}

.ed-hero-eyebrow .w2 {
  color: var(--ed-muted);
}

.ed-hero-eyebrow .ed-rule {
  flex: 0 0 clamp(28px, 4vw, 56px);
  height: 1px;
  background: var(--ed-line);
  align-self: center;
}

.ed-hero-eyebrow .ed-kicker-ar {
  font-family: var(--ed-arabic);
  font-size: 12px;
  font-weight: 700;
  color: var(--ed-muted);
  letter-spacing: 0;
}

/* The giant word — LTR island inside the RTL page */
.ed-display {
  direction: ltr;
  margin: 0;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(4.2rem, 17.5vw, 17rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  color: var(--ed-ink);
  background: linear-gradient(180deg, #faf8f4 20%, #c9c6bf 55%, #6f6c66 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  user-select: none;
  white-space: nowrap;
}

/* photo orb replacing the second "o" — real CRAVY asset */
.ed-orb {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin: 0 -0.015em;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: baseline;
  transform: translateY(0.08em);
  background: #1a1a1a;
  box-shadow:
    0 0 0.12em rgba(255, 255, 255, 0.55),
    0 0 0.55em rgba(255, 255, 255, 0.28),
    0 0 1.4em rgba(255, 255, 255, 0.12);
  -webkit-text-fill-color: initial;
}

.ed-orb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.8s var(--ed-ease);
}

.ed-orb:hover img,
.ed-orb:focus-visible img {
  transform: scale(1.1);
}

/* acid signature overlapping the word, like the reference */
.ed-signature {
  direction: ltr;
  display: flex;
  justify-content: flex-end;
  margin: clamp(-30px, -2.5vw, -12px) clamp(0px, 3vw, 48px) 0 0;
}

.ed-signature a {
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.9rem);
  line-height: 1;
  color: var(--ed-acid);
  transform: rotate(-4deg);
  text-shadow: 0 0 22px rgba(215, 255, 63, 0.25);
  white-space: nowrap;
}

.ed-signature a:hover {
  text-shadow: 0 0 30px rgba(215, 255, 63, 0.5);
}

/* Arabic supporting layer — the preserved real message */
.ed-sub {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-top: clamp(28px, 5vh, 56px);
  padding-top: clamp(24px, 4vh, 40px);
  border-top: 1px solid var(--ed-line);
}

.ed-sub-headline {
  margin: 0;
  font-family: var(--ed-display-arabic);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--ed-ink);
  max-width: 14ch;
}

.ed-sub-headline em {
  font-style: normal;
  color: var(--ed-acid);
}

.ed-sub-copy {
  margin: 0;
}

.ed-sub-copy p {
  margin: 0;
  color: var(--ed-muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.9;
  max-width: 52ch;
}

.ed-sub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 26px;
}

.ed-avail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ed-display-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-faint);
}

.ed-avail i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ed-acid);
  box-shadow: 0 0 0 6px rgba(215, 255, 63, 0.12);
  flex: 0 0 auto;
}

.ed-sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* NOTE: `a.` prefix outranks `.pf-body a` (later stylesheet wins ties). */
a.ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--ed-line);
  color: var(--ed-ink);
  font-weight: 800;
  font-size: 14px;
  background: transparent;
  transition: border-color 0.3s var(--ed-ease), color 0.3s var(--ed-ease), background 0.3s var(--ed-ease);
}

a.ed-btn:hover {
  border-color: var(--ed-acid);
  color: var(--ed-acid);
}

a.ed-btn-solid {
  background: var(--ed-ink);
  border-color: var(--ed-ink);
  color: #0b0b0a;
}

a.ed-btn-solid:hover {
  background: var(--ed-acid);
  border-color: var(--ed-acid);
  color: var(--ed-acid-ink);
}

.ed-scroll {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(30px, 5vh, 52px);
  font-family: var(--ed-display-latin);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-faint);
}

.ed-scroll a {
  color: var(--ed-faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ed-scroll a:hover {
  color: var(--ed-acid);
}

/* entrance — restrained, supports existing .pf-reveal */
@keyframes ed-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ed-orb-in {
  from {
    opacity: 0;
    transform: translateY(0.08em) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translateY(0.08em) scale(1);
  }
}

.ed-hero .ed-hero-eyebrow {
  animation: ed-rise 0.7s var(--ed-ease) 0.05s both;
}

.ed-hero .ed-display {
  animation: ed-rise 0.9s var(--ed-ease) 0.12s both;
}

.ed-hero .ed-orb {
  animation: ed-orb-in 1s var(--ed-ease) 0.35s both;
}

.ed-hero .ed-signature {
  animation: ed-rise 0.8s var(--ed-ease) 0.45s both;
}

.ed-hero .ed-sub {
  animation: ed-rise 0.8s var(--ed-ease) 0.55s both;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .ed-display {
    font-size: clamp(3.4rem, 19vw, 7rem);
  }

  .ed-sub {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .ed-signature {
    margin-top: -18px;
  }
}

@media (max-width: 560px) {
  .ed-hero {
    padding-top: 108px;
  }

  .ed-display {
    font-size: clamp(3rem, 19vw, 4.6rem);
    letter-spacing: -0.04em;
  }

  .ed-hero-eyebrow .ed-kicker-ar {
    display: none;
  }

  .ed-sub-actions .ed-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .ed-scroll {
    letter-spacing: 0.16em;
  }
}

/* ---------- stage-scoped chrome (floats / mobile CTA) ---------- */
body.ed-stage .pf-mobile-cta {
  background: var(--ed-bg-2);
  color: var(--ed-ink);
  border-top: 1px solid var(--ed-line);
}

body.ed-stage .pf-mobile-cta:hover {
  color: var(--ed-acid);
}

body.ed-stage .pf-whatsapp-float {
  background: var(--ed-bg-2);
  border: 1px solid var(--ed-line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.ed-stage .pf-footer {
  background: #060605;
}

/* ============================================================
   SECTION SYSTEM — one coherent language for every section
   Energy from refs 02–05, rebuilt originally around real content.
   ============================================================ */
.ed-section {
  position: relative;
  padding: clamp(72px, 10vh, 132px) 0;
  border-top: 1px solid var(--ed-line);
  background:
    linear-gradient(90deg, transparent calc(100% - 1px), transparent 0),
    var(--ed-bg);
  overflow: clip;
}

.ed-wrap {
  width: var(--ed-container);
  margin-inline: auto;
  position: relative;
}

/* micro-caps kicker with lime tick */
.ed-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--ed-display-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--ed-acid);
  flex: 0 0 auto;
}

/* giant Latin display — sized to fit the .ed-head first column
   at desktop container widths (long words like SELECTED/MESSAGES
   must not clip against the section edge) */
.ed-giant {
  direction: ltr;
  margin: 0;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(2.75rem, 8.2vw, 7.25rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #faf8f4 25%, #c9c6bf 60%, #716e67 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

/* Arabic display counterpart — one lime word via <em> */
.ed-ar {
  margin: 0;
  font-family: var(--ed-display-arabic);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  line-height: 1.15;
  color: var(--ed-ink);
  text-wrap: balance;
}

.ed-ar em {
  font-style: normal;
  color: var(--ed-acid);
}

/* lime script accent overlapping display */
.ed-script {
  direction: ltr;
  margin: 6px 0 0;
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 2.1rem);
  color: var(--ed-acid);
  transform: rotate(-3deg);
  text-shadow: 0 0 22px rgba(215, 255, 63, 0.22);
}

.ed-lede {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--ed-muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.9;
}

.ed-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(36px, 6vh, 64px);
}

.ed-head-side {
  border-inline-start: 1px solid var(--ed-line);
  padding-inline-start: 28px;
}

.ed-head-side p {
  margin: 0;
  color: var(--ed-muted);
  font-size: 15px;
  line-height: 1.9;
}

.ed-index {
  font-family: var(--ed-display-latin);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ed-faint);
}

/* ---------- reduced motion ---------- *//* ---------- selected work: large alternating editorial entries ---------- */
.ed-sel {
  display: grid;
  gap: clamp(48px, 8vh, 96px);
}

a.ed-entry {
  display: grid;
  grid-template-columns: 72px minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: start;
  padding-top: clamp(28px, 4vh, 44px);
  border-top: 1px solid var(--ed-line);
  color: var(--ed-ink);
}

a.ed-entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.ed-entry-no {
  font-family: var(--ed-display-latin);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ed-faint);
  padding-top: 8px;
}

.ed-entry-no::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ed-acid);
  margin-top: 12px;
}

.ed-entry-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #161614;
}

.ed-entry-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 0.9s var(--ed-ease), filter 0.9s var(--ed-ease);
}

a.ed-entry:hover .ed-entry-media img {
  transform: scale(1.045);
}

.ed-entry-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.ed-entry-body {
  padding-top: 4px;
}

.ed-entry-body > span:not(.ed-entry-go) {
  display: block;
}

.ed-entry-cat {
  margin: 0;
  font-family: var(--ed-display-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-entry-name {
  direction: ltr;
  margin: 14px 0 0;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.ed-entry-name-ar {
  margin: 10px 0 0;
  font-family: var(--ed-display-arabic);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  color: var(--ed-faint);
}

.ed-entry-note {
  margin: 16px 0 0;
  color: var(--ed-muted);
  font-size: 14px;
  line-height: 1.85;
  max-width: 44ch;
}

.ed-entry-go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  font-family: var(--ed-display-latin);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-ink);
}

.ed-entry-go i {
  font-style: normal;
  color: var(--ed-acid);
  transition: transform 0.35s var(--ed-ease);
}

a.ed-entry:hover .ed-entry-go i {
  transform: translateX(-6px);
}

/* alternate rhythm: even entries mirror */
a.ed-entry:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 72px;
}

a.ed-entry:nth-child(even) .ed-entry-no {
  order: 3;
  text-align: end;
}

a.ed-entry:nth-child(even) .ed-entry-no::after {
  margin-inline-start: auto;
}

a.ed-entry:nth-child(even) .ed-entry-media {
  order: 2;
}

a.ed-entry:nth-child(even) .ed-entry-body {
  order: 1;
}

.ed-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(36px, 6vh, 60px);
}

/* ---------- homepage archive: dense index cells ---------- */
.ed-arch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ed-line);
  border-inline-start: 1px solid var(--ed-line);
}

a.ed-cell {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--ed-line);
  border-inline-end: 1px solid var(--ed-line);
  color: var(--ed-ink);
  background: transparent;
  transition: background 0.35s var(--ed-ease);
}

a.ed-cell:hover {
  background: rgba(242, 239, 233, 0.035);
}

.ed-cell-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  font-family: var(--ed-display-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ed-faint);
}

.ed-cell-top i {
  font-style: normal;
  color: var(--ed-acid);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.3s var(--ed-ease), transform 0.3s var(--ed-ease);
}

a.ed-cell:hover .ed-cell-top i {
  opacity: 1;
  transform: none;
}

.ed-cell-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #161614;
  margin: 0 18px;
}

.ed-cell-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ed-ease);
}

a.ed-cell:hover .ed-cell-thumb img {
  transform: scale(1.05);
}

.ed-cell-name {
  display: block;
  direction: ltr;
  margin: 0;
  padding: 16px 18px 4px;
  font-family: var(--ed-display-latin);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.ed-cell-cat {
  display: block;
  margin: 0;
  padding: 0 18px 18px;
  font-size: 12px;
  color: var(--ed-muted);
}

/* ---------- services: numbered typographic rows ---------- */
.ed-svc {
  border-top: 1px solid var(--ed-line);
}

a.ed-svc-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding: clamp(26px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--ed-line);
  color: var(--ed-ink);
  transition: background 0.3s var(--ed-ease), padding 0.3s var(--ed-ease);
}

a.ed-svc-row:hover {
  background: rgba(242, 239, 233, 0.025);
}

.ed-svc-no {
  font-family: var(--ed-display-latin);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ed-faint);
}

.ed-svc-title {
  direction: ltr;
  margin: 0;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.ed-svc-title small {
  display: block;
  margin-top: 8px;
  font-family: var(--ed-arabic);
  font-weight: 700;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  letter-spacing: 0;
  color: var(--ed-muted);
  text-transform: none;
}

.ed-svc-desc {
  margin: 0;
  color: var(--ed-muted);
  font-size: 14px;
  line-height: 1.85;
  max-width: 46ch;
}

.ed-svc-arrow {
  width: 52px;
  height: 52px;
  border: 1px solid var(--ed-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--ed-ink);
  transition: border-color 0.3s var(--ed-ease), background 0.3s var(--ed-ease), color 0.3s var(--ed-ease);
  flex: 0 0 auto;
}

a.ed-svc-row:hover .ed-svc-arrow {
  border-color: var(--ed-acid);
  background: var(--ed-acid);
  color: var(--ed-acid-ink);
}

/* ---------- impact: giant numerals, real numbers only ---------- */
.ed-impact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ed-line);
  margin-top: clamp(48px, 8vh, 88px);
}

.ed-impact-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ed-stat {
  display: block;
  padding: clamp(24px, 4vh, 40px) clamp(18px, 2.5vw, 32px);
  border-bottom: 1px solid var(--ed-line);
  border-inline-end: 1px solid var(--ed-line);
  color: var(--ed-ink);
  transition: background 0.3s var(--ed-ease);
}

.ed-stat:last-child {
  border-inline-end: 0;
}

a.ed-stat:hover {
  background: rgba(242, 239, 233, 0.03);
}

.ed-stat strong {
  direction: ltr;
  display: block;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.ed-stat strong s {
  text-decoration: none;
  color: var(--ed-acid);
}

.ed-stat h3 {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 800;
}

.ed-stat p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ed-muted);
}

/* ---------- about: magazine spread ---------- */
.ed-about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.ed-portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #0c0c0b;
  border: 1px solid var(--ed-line);
}

.ed-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ed-ease);
}

.ed-portrait:hover img {
  transform: scale(1.02);
}

.ed-portrait figcaption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-family: var(--ed-display-latin);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.85);
}

.ed-about-copy p {
  margin: 0 0 18px;
  color: var(--ed-muted);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.95;
  max-width: 60ch;
}

.ed-about-copy p strong {
  color: var(--ed-ink);
}

.ed-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--ed-line);
}

.ed-facts div {
  padding: 16px 0;
  border-bottom: 1px solid var(--ed-line);
}

.ed-facts b {
  display: block;
  font-size: 14px;
}

.ed-facts span {
  font-family: var(--ed-display-latin);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ed-muted);
}

/* ---------- contact finale: typographic CTA + real channels ---------- */
.ed-contact {
  position: relative;
  padding: clamp(88px, 14vh, 160px) 0 clamp(56px, 8vh, 96px);
  border-top: 1px solid var(--ed-line);
  background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(215, 255, 63, 0.05), transparent 70%), var(--ed-bg);
  overflow: clip;
}

.ed-contact-giant {
  direction: ltr;
  margin: 0;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(2.8rem, 9.5vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.ed-contact-giant span {
  display: block;
  background: linear-gradient(180deg, #faf8f4 25%, #c9c6bf 60%, #716e67 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ed-contact-giant em {
  font-style: normal;
  background: none;
  -webkit-text-fill-color: var(--ed-acid);
  color: var(--ed-acid);
}

.ed-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(36px, 6vh, 60px);
  border-top: 1px solid var(--ed-line);
}

a.ed-channel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--ed-line);
  color: var(--ed-ink);
}

a.ed-channel + a.ed-channel {
  border-inline-start: 1px solid var(--ed-line);
  padding-inline-start: 28px;
}

a.ed-channel:first-child {
  padding-inline-start: 4px;
}

.ed-channel b {
  display: block;
  font-family: var(--ed-display-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ed-muted);
  margin-bottom: 8px;
}

.ed-channel span:last-child {
  font-weight: 800;
  font-size: 15px;
}

.ed-channel i {
  font-style: normal;
  color: var(--ed-acid);
  font-size: 18px;
  transition: transform 0.3s var(--ed-ease);
}

a.ed-channel:hover i {
  transform: translateX(-6px);
}

/* ---------- section-system responsive ---------- */
@media (max-width: 1024px) {
  .ed-arch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ed-impact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ed-impact:not(.ed-impact-3) .ed-stat:nth-child(2) {
    border-inline-end: 0;
  }

  .ed-impact-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ed-impact-3 .ed-stat {
    border-inline-end: 0;
  }

  a.ed-entry,
  a.ed-entry:nth-child(even) {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  a.ed-entry:nth-child(even) .ed-entry-no {
    order: 0;
    text-align: start;
  }

  a.ed-entry:nth-child(even) .ed-entry-no::after {
    margin-inline-start: 0;
  }

  a.ed-entry:nth-child(even) .ed-entry-media,
  a.ed-entry:nth-child(even) .ed-entry-body {
    order: 0;
  }

  .ed-entry-body {
    grid-column: 2;
  }

  .ed-entry-media {
    grid-column: 2;
  }

  .ed-entry-no {
    grid-row: span 2;
  }

  a.ed-svc-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .ed-svc-desc {
    grid-column: 2;
  }

  .ed-svc-arrow {
    grid-row: span 2;
  }
}

@media (max-width: 640px) {
  .ed-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ed-head-side {
    border-inline-start: 0;
    padding-inline-start: 0;
    border-top: 1px solid var(--ed-line);
    padding-top: 18px;
  }

  .ed-giant {
    font-size: clamp(2.6rem, 14.5vw, 4rem);
  }

  a.ed-entry,
  a.ed-entry:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ed-entry-no,
  .ed-entry-media,
  .ed-entry-body {
    grid-column: 1;
  }

  .ed-entry-no {
    grid-row: auto;
  }

  .ed-arch {
    grid-template-columns: 1fr;
  }

  a.ed-svc-row {
    grid-template-columns: 1fr auto;
  }

  .ed-svc-no {
    display: none;
  }

  .ed-svc-desc {
    grid-column: 1;
  }

  .ed-svc-arrow {
    grid-row: auto;
    width: 44px;
    height: 44px;
  }

  .ed-impact {
    grid-template-columns: 1fr 1fr;
  }

  .ed-about {
    grid-template-columns: 1fr;
  }

  .ed-portrait {
    aspect-ratio: 1 / 1;
  }

  .ed-channels {
    grid-template-columns: 1fr;
  }

  a.ed-channel + a.ed-channel {
    border-inline-start: 0;
    padding-inline-start: 4px;
  }
}

/* ============================================================
   SUBPAGES + CASE STUDIES — same stage, same language
   Applied via `ed-stage` body class + editorial.css link.
   Markup, routes, SEO and JS untouched.
   ============================================================ */
body.ed-stage .pf-page-hero,
body.ed-stage .pf-subpage-hero,
body.ed-stage .pf-case-hero {
  background: var(--ed-bg);
}

body.ed-stage .pf-page-hero h1,
body.ed-stage .pf-subpage-hero h1 {
  color: var(--ed-ink);
  letter-spacing: -0.015em;
}

body.ed-stage .pf-page-intro,
body.ed-stage .pf-subpage-hero p {
  color: var(--ed-muted);
}

body.ed-stage .pf-section-no,
body.ed-stage .pf-kicker.pf-accent {
  color: var(--ed-acid);
}

body.ed-stage .pf-section-no::after {
  background: var(--ed-acid);
}

body.ed-stage .pf-breadcrumb,
body.ed-stage .pf-breadcrumb a {
  color: var(--ed-faint);
}

body.ed-stage .pf-subpage-alt,
body.ed-stage .pf-results-section,
body.ed-stage .pf-certs-page {
  background: #0e0e0d;
}

body.ed-stage .pf-subpage-head h2,
body.ed-stage .pf-wide-copy h2,
body.ed-stage .pf-service-row h2,
body.ed-stage .pf-info-card h3,
body.ed-stage .pf-about-detail h2,
body.ed-stage .pf-contact-copy h2,
body.ed-stage .pf-case-story h2,
body.ed-stage .pf-case-heading h1,
body.ed-stage .pf-next h2,
body.ed-stage .pf-archive-info h2 {
  color: var(--ed-ink);
}

body.ed-stage .pf-subpage-head p,
body.ed-stage .pf-wide-copy p,
body.ed-stage .pf-service-row p,
body.ed-stage .pf-service-row li,
body.ed-stage .pf-info-card p,
body.ed-stage .pf-info-card li,
body.ed-stage .pf-about-detail p,
body.ed-stage .pf-contact-copy p,
body.ed-stage .pf-case-heading p,
body.ed-stage .pf-case-story p {
  color: var(--ed-muted);
}

body.ed-stage .pf-info-card,
body.ed-stage .pf-service-row,
body.ed-stage .pf-service-row > div:first-child,
body.ed-stage .pf-archive-card,
body.ed-stage .pf-cert-card,
body.ed-stage .pf-project-form,
body.ed-stage .pf-case-facts,
body.ed-stage .pf-case-fact,
body.ed-stage .pf-filters {
  background: #121211;
  border-color: var(--ed-line);
}

body.ed-stage .pf-filter {
  color: var(--ed-faint);
  border-color: var(--ed-line);
  background: transparent;
}

body.ed-stage .pf-filter:hover {
  color: var(--ed-ink);
  border-color: var(--ed-muted);
}

body.ed-stage .pf-filter.is-active {
  background: var(--ed-acid);
  border-color: var(--ed-acid);
  color: var(--ed-acid-ink);
}

body.ed-stage .pf-archive-info small {
  color: var(--ed-acid);
}

body.ed-stage .pf-archive-info span,
body.ed-stage .pf-cert-card p {
  color: var(--ed-muted);
}

body.ed-stage a.pf-button-ink,
body.ed-stage button.pf-button-ink {
  background: var(--ed-ink);
  border-color: var(--ed-ink);
  color: #0b0b0a;
}

body.ed-stage a.pf-button-ink:hover,
body.ed-stage button.pf-button-ink:hover {
  background: var(--ed-acid);
  border-color: var(--ed-acid);
  color: var(--ed-acid-ink);
}

body.ed-stage .pf-field label {
  color: var(--ed-ink);
}

body.ed-stage .pf-field input,
body.ed-stage .pf-field select,
body.ed-stage .pf-field textarea {
  background: #0c0c0b;
  border-color: var(--ed-line);
  color: var(--ed-ink);
}

body.ed-stage .pf-field input:focus,
body.ed-stage .pf-field select:focus,
body.ed-stage .pf-field textarea:focus {
  border-color: var(--ed-acid);
  box-shadow: 0 0 0 3px rgba(215, 255, 63, 0.12);
}

/* contact form note — inline editorial note, not a card */
body.ed-stage .pf-form-note {
  background: transparent;
  border: 1px solid var(--ed-line);
  border-radius: 0;
  box-shadow: none;
  color: var(--ed-muted);
  padding: 14px 18px;
}

/* case study: giant title overlapping the cover */
body.ed-stage .pf-case-cover {
  border: 1px solid var(--ed-line);
}

body.ed-stage .pf-case-heading h1 {
  font-size: clamp(3.4rem, 11vw, 10rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-family: var(--ed-display-latin);
}

/* Arabic display H1 — same editorial scale, correct shaping.
   Thmanyah Display Black carries the display weight; tracking and
   uppercase are reset because they break Arabic joining and forms. */
body.ed-stage .pf-case-heading h1:lang(ar) {
  font-family: var(--ed-display-arabic);
  font-weight: 900;
  font-size: clamp(2.9rem, 9vw, 8.25rem);
  line-height: 1.14;
  letter-spacing: 0;
  text-transform: none;
}

body.ed-stage .pf-case-fact b {
  color: var(--ed-ink);
}

body.ed-stage .pf-next {
  border-top: 1px solid var(--ed-line);
  padding-top: clamp(36px, 6vh, 64px);
}

@media (prefers-reduced-motion: reduce) {
  .ed-hero .ed-hero-eyebrow,
  .ed-hero .ed-display,
  .ed-hero .ed-orb,
  .ed-hero .ed-signature,
  .ed-hero .ed-sub {
    animation: none;
  }

  .ed-orb img {
    transition: none;
  }
}

/* ============================================================
   PHASE 5 — detailed editorial sections (services / about / results)
   Same tokens, same language. No new art direction.
   Reuses .ed- primitives from the homepage system.
   ============================================================ */

/* skin for retained pf- flow primitives */
body.ed-stage .pf-case-flow {
  border-color: var(--ed-line);
  background: transparent;
}

body.ed-stage .pf-case-flow > div {
  border-color: var(--ed-line);
}

body.ed-stage .pf-case-flow span {
  color: var(--ed-acid);
}

body.ed-stage .pf-case-flow h3 {
  color: var(--ed-ink);
}

body.ed-stage .pf-case-flow p {
  color: var(--ed-muted);
}

body.ed-stage .pf-wide-copy .pf-kicker.pf-accent {
  color: var(--ed-acid);
}

/* large numbered detail sections */
.ed-detail {
  border-top: 1px solid var(--ed-line);
  padding: clamp(56px, 8vh, 104px) 0;
}

.ed-detail:first-of-type {
  border-top: 0;
}

.ed-detail-grid {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 3.5vw, 56px);
  align-items: start;
}

.ed-detail-num {
  font-family: var(--ed-display-latin);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ed-faint);
  padding-top: 10px;
}

.ed-detail-num::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ed-acid);
  margin-top: 12px;
}

.ed-detail-title {
  direction: ltr;
  margin: 0;
  font-family: var(--ed-display-latin);
  font-weight: 900;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--ed-ink);
}

.ed-detail-title small {
  display: block;
  direction: rtl;
  margin-top: 12px;
  font-family: var(--ed-display-arabic);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ed-ink);
}

.ed-detail-body p {
  margin: 0;
  color: var(--ed-muted);
  font-size: 15px;
  line-height: 1.9;
  max-width: 52ch;
}

/* deliverables: quiet bordered rows, not cards */
.ed-deliv {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--ed-line);
}

.ed-deliv li {
  padding: 11px 0;
  border-bottom: 1px solid var(--ed-line);
  font-size: 14px;
  font-weight: 700;
  color: var(--ed-ink);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ed-deliv li::before {
  content: "—";
  color: var(--ed-acid);
  font-family: var(--ed-display-latin);
  flex: 0 0 auto;
}

/* evidence: image-led, no card chrome */
.ed-evidence {
  display: block;
  margin-top: 28px;
  color: var(--ed-ink);
}

.ed-evidence-media {
  display: block;
  overflow: hidden;
  background: #161614;
  border: 1px solid var(--ed-line);
  aspect-ratio: 16 / 9;
}

.ed-evidence-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ed-ease);
}

a.ed-evidence:hover .ed-evidence-media img {
  transform: scale(1.035);
}

.ed-evidence-cap {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ed-muted);
}

.ed-evidence-cap b {
  display: block;
  color: var(--ed-ink);
  font-size: 14px;
}

/* full-bleed variant: image escapes the grid on wide screens */
.ed-detail-full .ed-evidence-media {
  aspect-ratio: 21 / 9;
}

/* reversed rhythm for variation between rows */
.ed-detail-rev .ed-detail-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) 88px;
}

.ed-detail-rev .ed-detail-num {
  order: 3;
  text-align: end;
}

.ed-detail-rev .ed-detail-num::after {
  margin-inline-start: auto;
}

.ed-detail-rev .ed-detail-body {
  order: 2;
}

.ed-detail-rev .ed-detail-title {
  order: 1;
}

/* evidence metric line under results numerals */
.ed-stat-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ed-line);
  font-size: 12px;
  color: var(--ed-muted);
}

.ed-stat-metrics b {
  color: var(--ed-ink);
  font-family: var(--ed-display-latin);
  direction: ltr;
  unicode-bidi: embed;
}

/* sector / capability index: dividers, not pills */
.ed-index-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ed-line);
}

.ed-index-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ed-line);
  font-size: 15px;
  font-weight: 800;
  color: var(--ed-ink);
}

.ed-index-list li span:last-child {
  font-family: var(--ed-display-latin);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ed-faint);
}

@media (max-width: 1024px) {
  .ed-detail-grid,
  .ed-detail-rev .ed-detail-grid {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .ed-detail-rev .ed-detail-num {
    order: 0;
    text-align: start;
  }

  .ed-detail-rev .ed-detail-num::after {
    margin-inline-start: 0;
  }

  .ed-detail-rev .ed-detail-title,
  .ed-detail-rev .ed-detail-body {
    order: 0;
  }

  .ed-detail-body {
    grid-column: 2;
  }

  .ed-detail-num {
    grid-row: span 2;
  }
}

@media (max-width: 640px) {
  .ed-detail-grid,
  .ed-detail-rev .ed-detail-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ed-detail-num,
  .ed-detail-body {
    grid-column: 1;
  }

  .ed-detail-num {
    grid-row: auto;
    padding-top: 0;
  }

  .ed-detail-full .ed-evidence-media {
    aspect-ratio: 16 / 10;
  }
}
