/* Dragon Silk Road — Project detail hero (About-parity editorial, P1w v2.1)
 * Scope: templates/projects/detail.html only.
 * Loaded from {% block late_head_extra %} AFTER projects-cinematic.css.
 *
 * v2.1 (2026-11-26): the "The case behind the route." closing statement was
 * removed on review. The 4:3 image card (instead of 16:10.2) rebalances the
 * one-screen hero after the foot was deleted.
 */

/* ------------------------------------------------------------------ */
/* Self-hosted fonts (page-scoped names; no global body font change)   */
/* Same files/ranges as pages/about-cinematic.css:12-43.               */
/* ------------------------------------------------------------------ */

@font-face {
  font-family: "DSR Manrope";
  src: url("../../fonts/Manrope-800-latin.woff2?v=1") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DSR Manrope";
  src: url("../../fonts/Manrope-800-cyrillic.woff2?v=1") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "DSR Inter";
  src: url("../../fonts/Inter-latin.woff2?v=1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DSR Inter";
  src: url("../../fonts/Inter-cyrillic.woff2?v=1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

.projects-detail {
  --pd-ink: #07111f;
  --pd-paper: #fbf8f2;
  --pd-orange: #b04315; /* AA on the paper hero; --pj-orange #ed6428 is 3.0:1 */
  --pd-display: "DSR Manrope", "DSR Inter", "Vazirmatn", Tahoma, ui-sans-serif, system-ui, sans-serif;
  --pd-ui: "DSR Inter", "Vazirmatn", Tahoma, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------------------------------------------------------------- shell */
.project-detail-hero {
  --pd-chrome: 114px;
  position: relative;
  min-height: calc(100svh - var(--pd-chrome));
  overflow: clip;
  color: var(--pd-ink);
  background:
    radial-gradient(120% 90% at 82% 4%, #fff 0%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(180deg, #fbfbfb 0%, #f6f5f2 46%, var(--pd-paper) 100%);
  border-bottom: 1px solid rgba(7, 17, 31, .08);
  font-family: var(--pd-ui);
}
@media (max-width: 1320px) { .project-detail-hero { --pd-chrome: 104px; } }
@media (max-width: 820px)  { .project-detail-hero { --pd-chrome: 78px; } }

.project-detail-hero__inner {
  min-height: calc(100svh - var(--pd-chrome));
  padding-block: clamp(24px, 3.2vh, 38px) clamp(20px, 2.6vh, 28px);
  display: flex;
  flex-direction: column;
}
@media (min-width: 1021px) and (max-width: 1280px) {
  .project-detail-hero__inner { padding-inline-end: 64px; }
}
@media (min-width: 1281px) and (max-width: 1831px) {
  .project-detail-hero__inner { padding-inline-end: clamp(0px, calc(1868px - 100vw), 132px); }
}

/* ---------------------------------------------------------------- eyebrow */
.project-detail-hero__top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font: 700 9.5px/1 var(--pd-ui);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: rgba(7, 17, 31, .6);
}
.project-detail-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
}
.project-detail-hero__crumbs i {
  display: inline-block;
  width: 26px;
  height: 1px;
  background: rgba(7, 17, 31, .38);
}
.project-detail-hero__crumbs a { color: inherit; text-decoration: none; }
.project-detail-hero__crumbs a:hover { color: rgba(7, 17, 31, .95); }
.project-detail-hero__crumbs b { font-weight: 700; color: rgba(7, 17, 31, .92); }
.project-detail-hero__period { margin: 0; white-space: nowrap; }

/* ---------------------------------------------------------------- main */
.project-detail-hero__main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1.2fr);
  gap: clamp(40px, 3.8vw, 64px);
  align-items: center;
  padding-block: clamp(18px, 2.6vh, 32px);
}
.project-detail-hero__copy { min-width: 0; max-width: 640px; }
.project-detail-hero__kicker {
  margin: 0 0 16px;
  color: var(--pd-orange);
  font: 700 10px/1.3 var(--pd-ui);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.project-detail-hero__title {
  margin: 0;
  color: var(--pd-ink);
  font-family: var(--pd-display);
  font-weight: 800;
  font-size: clamp(44px, 5.3vw, 78px);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.project-detail-hero__summary {
  max-width: 540px;
  margin: clamp(16px, 2vh, 22px) 0 0;
  color: rgba(7, 17, 31, .64);
  font-size: clamp(15px, 1.06vw, 17px);
  line-height: 1.62;
}

/* ---------------------------------------------------------------- visual */
.project-detail-hero__visual { min-width: 0; display: grid; }
.project-detail-hero__figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #e9e6e0;
  box-shadow: 0 26px 60px -42px rgba(7, 17, 31, .62);
}
.project-detail-hero__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(7, 17, 31, .09);
  pointer-events: none;
}
.project-detail-hero__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.project-detail-hero__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(7, 17, 31, .14);
}
.project-detail-hero__meta div {
  display: grid;
  gap: 6px;
  padding: 14px 14px 0;
  border-inline-start: 1px solid rgba(7, 17, 31, .1);
}
.project-detail-hero__meta div:first-child { padding-inline-start: 0; border-inline-start: 0; }
.project-detail-hero__meta dt {
  color: rgba(7, 17, 31, .58);
  font: 700 8px/1 var(--pd-ui);
  letter-spacing: .13em;
}
.project-detail-hero__meta dd {
  margin: 0;
  color: var(--pd-ink);
  font: 700 11.5px/1.2 var(--pd-ui);
  overflow-wrap: anywhere;
}

/* No __foot: "The case behind the route." was removed on 2026-11-26 review.
 * The main grid's flex:1 absorbs the old foot height; the hero closes on the
 * editorial whitespace below the visual block. */

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .project-detail-hero__meta { grid-template-columns: 1fr 1fr; }
  .project-detail-hero__meta div:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
  .project-detail-hero__meta div:nth-child(n+3) {
    border-top: 1px solid rgba(7, 17, 31, .1);
    padding-top: 10px;
    margin-top: 2px;
  }
}
@media (max-width: 1020px) {
  .project-detail-hero { min-height: 0; }
  .project-detail-hero__inner { min-height: 0; padding-block: 22px 30px; }
  .project-detail-hero__main {
    grid-template-columns: 1fr;
    gap: clamp(26px, 4vw, 40px);
    padding-block: 24px;
  }
  .project-detail-hero__copy { max-width: 760px; }
  .project-detail-hero__title { font-size: clamp(40px, 7vw, 64px); }
  .project-detail-hero__summary { max-width: 620px; }
}
@media (max-width: 768px) {
  .project-detail-hero__top { font-size: 8px; letter-spacing: .14em; }
  .project-detail-hero__period { display: none; }
}
@media (max-width: 620px) {
  .project-detail-hero__crumbs { gap: 6px; }
  .project-detail-hero__title { font-size: clamp(34px, 9.8vw, 46px); }
}

/* ---------------------------------------------------------------- RTL */
html[dir="rtl"] .project-detail-hero__title,
html[dir="rtl"] .project-detail-hero__summary { text-align: start; }

/* English fallback copy inside the RTL page: keep the Latin paragraph's
 * punctuation at the correct end (period at the end of the sentence, not the
 * start). Alignment stays `start`, i.e. the right edge under dir=rtl. */
.project-detail-hero__title,
.project-detail-hero__summary { unicode-bidi: plaintext; }

/* The year range is a chronological label, not Arabic text: keep 2024 — 2025
 * in source order in every locale. `dir="ltr"` is set on the element. */
.project-detail-hero__period { direction: ltr; unicode-bidi: isolate; }

/* story → RFQ seam: trim the story's bottom whitespace (does not touch the
 * RFQ module itself; /contact/ reference stays byte-identical). */
.projects-detail .project-detail-story { padding-bottom: clamp(80px, 7vw, 110px); }
