.maroc-hero {
  background: #102a26;
  color: #fff7eb;
}
.maroc-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(30px, 5vw, 74px);
  padding-block: clamp(40px, 5vw, 72px);
}
.maroc-copy h1 {
  font: 400 clamp(3rem, 6vw, 5.45rem)/.99 var(--editorial);
  letter-spacing: -.064em;
}
.maroc-copy h1 span, .maroc-copy h1 em { display: block; }
.maroc-copy h1 em { color: #f0c39c; font-weight: 400; }
[dir="rtl"] .maroc-copy h1 { font-family: Tahoma, sans-serif; letter-spacing: 0; line-height: 1.2; }
.maroc-copy > p {
  max-width: 38ch;
  color: #f0e7da;
  margin-block: 24px 22px;
  font-size: clamp(.98rem, 1.35vw, 1.17rem);
}
.maroc-copy .search {
  max-width: 477px;
  border-radius: 5px;
  background: #fffaf1;
  border-color: #fffaf1;
}
.maroc-copy .search .button { border-radius: 3px; }
.maroc-hero-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 17px;
}
.maroc-hero-links a, .maroc-scroll-link {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  font-size: .91rem;
  font-weight: 650;
  color: #fff3e2;
}
.maroc-scroll-link { background: transparent; border: 0; padding: 0; }
.maroc-hero-links a { padding-inline: 10px; border: 1px solid #527066; border-radius: 3px; }
.maroc-scroll-link span, .maroc-hero-links .arrow { color: #f0c39c; }
.maroc-hero-links a:hover, .maroc-scroll-link:hover { text-decoration: underline; text-underline-offset: 5px; }

.maroc-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: #5f6d56;
  border-radius: 5px;
  overflow: hidden;
}
.maroc-reference {
  padding: clamp(18px, 3.1vw, 36px);
  background: #f6eee2;
  color: #12372a;
  border-block-start: 4px solid #b5713b;
}
.maroc-reference-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #743e22;
  font-size: .82rem;
  font-weight: 750;
  padding-block-end: 10px;
  border-block-end: 1px solid #d4beaa;
}
.maroc-reference-meta bdi { color: #17372d; font-variant-numeric: tabular-nums; }
.maroc-reference h2 {
  margin-block: 13px 6px;
  font: 400 clamp(1.85rem, 3.65vw, 3.35rem)/1.01 var(--editorial);
  letter-spacing: -.055em;
}
[dir="rtl"] .maroc-reference h2 { font-family: Tahoma, sans-serif; letter-spacing: 0; line-height: 1.18; }
.maroc-reference > p { font-size: .88rem; color: #455b50; }
.maroc-reference > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-start: 9px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.maroc-hero-media {
  position: relative;
  min-width: 0;
  width: 100%;
  margin: 0;
  background: #102a26;
  aspect-ratio: 2.5 / 1;
  min-height: 155px;
}
.maroc-hero-media img, .maroc-film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 44%;
}
.maroc-hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, #102a26ee, transparent 65%);
  pointer-events: none;
}
.maroc-film[hidden], .maroc-video-button[hidden] { display: none; }
.maroc-hero-media figcaption {
  position: absolute;
  z-index: 1;
  inset-inline: 15px;
  inset-block-end: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #fff6ea;
}
.maroc-video-button {
  min-height: 40px;
  padding-inline: 10px;
  background: #102a26de;
  border: 1px solid #c3cec2;
  border-radius: 3px;
  color: #fff6ea;
  font-size: .84rem;
  font-weight: 650;
}
.maroc-video-button:hover { background: #1c4739; }
.maroc-hero :focus-visible, .maroc-catalogue :focus-visible { outline-color: #ebba91; }
.maroc-copy input:focus-visible, .maroc-reference a:focus-visible { outline-color: #a45e35; }

.maroc-story {
  background: #f4ecdf;
  padding-block: clamp(28px, 5vw, 70px);
  scroll-margin-block-start: 35vh;
}
.maroc-story-layout {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.36fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.maroc-stage {
  position: sticky;
  top: max(16px, calc((100vh - min(44vw, 490px)) / 2));
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #142e29;
  border-radius: 6px;
  box-shadow: 0 20px 55px #48331b29;
  isolation: isolate;
}
.maroc-stage > div:not(.maroc-stage-progress) { position: absolute; inset: 0; }
.maroc-facade { opacity: var(--facade, 1); }
.maroc-facade img { width: 100%; height: 100%; object-fit: fill; filter: saturate(.76) brightness(.98); }
.maroc-trace > div {
  position: absolute;
  inset: 20.4% 14.75% 9.7%;
  opacity: var(--trace-opacity, 0);
  clip-path: inset(0 calc(100% - var(--trace-width, 0%)) 0 0);
  border: 1px solid #f7c89e;
  background:
    repeating-linear-gradient(90deg, #f7c89e 0 1px, transparent 1px calc(100% / 6)),
    repeating-linear-gradient(0deg, #f7c89e 0 1px, transparent 1px 20%);
  box-shadow: 0 0 24px #f7c89e6a;
}
.maroc-ledger {
  background: linear-gradient(130deg, #fff4de, #e8d1b4);
  opacity: var(--ledger, 0);
}
.maroc-ledger > p {
  position: absolute;
  inset-inline: 14.75%;
  top: 10.5%;
  color: #522f20;
  font-weight: 650;
  font-size: clamp(.65rem, 1.05vw, .92rem);
}
.maroc-grid-cells {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  inset: 20.4% 14.75% 9.7%;
  border-block-start: 1px solid #996f52;
  border-inline-start: 1px solid #996f52;
  color: #173d34;
  background: #fff8edb5;
  font-variant-numeric: tabular-nums;
}
.maroc-grid-cells > span {
  display: grid;
  place-items: center;
  font-size: clamp(.57rem, 1vw, .94rem);
  white-space: nowrap;
  border-block-end: 1px solid #996f52;
  border-inline-end: 1px solid #996f52;
}
.maroc-grid-cells bdi { opacity: var(--grid-words, 0); }
.maroc-grid-head { font-weight: 700; background: #e6d4bb; }
.maroc-grid-total { font-weight: 700; background: #eddcc4; }
.maroc-document {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 72% 0%, #325147, #15362f 70%);
  opacity: var(--sheet, 0);
}
.maroc-sheet {
  width: 48%;
  min-height: 74%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6%;
  background: #fff6e5;
  color: #17372d;
  border-block-start: 4px solid #b5713b;
  box-shadow: 9px 11px 0 #b5713b42, 17px 19px 36px #0c241f75;
  transform: translateY(var(--sheet-shift, 0px)) rotate(var(--sheet-turn, 0deg)) scale(var(--sheet-scale, 1));
}
.maroc-sheet > p {
  color: #855235;
  font-weight: 700;
  font-size: clamp(.57rem, 1vw, .9rem);
}
.maroc-sheet > strong {
  margin-block: 7% 11%;
  font: 400 clamp(1.3rem, 3.3vw, 3.2rem)/.99 var(--editorial);
  letter-spacing: -.045em;
}
[dir="rtl"] .maroc-sheet > strong { font-family: Tahoma, sans-serif; line-height: 1.2; letter-spacing: 0; }
.maroc-sheet-cite {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 9px;
  padding-block: 5px;
  font-size: clamp(.57rem, .95vw, .83rem);
  border-block: 1px solid #be916d;
}
.maroc-sheet-cite bdi { font-weight: 700; }
.maroc-sheet-lines {
  height: clamp(18px, 5vw, 54px);
  margin-block-start: 8%;
  background: repeating-linear-gradient(transparent 0 7px, #c2ac92 7px 8px);
}
.maroc-archive {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11%;
  background: radial-gradient(ellipse at 75% 8%, #264f41, #14362e 75%);
  color: #fff5e6;
  opacity: var(--archive, 0);
}
.maroc-archive > * { transform: translateY(var(--archive-shift, 0px)); }
.maroc-archive > p {
  font: 400 clamp(1.8rem, 4.8vw, 4.4rem)/1 var(--editorial);
  letter-spacing: -.055em;
  margin-block-end: 6%;
}
[dir="rtl"] .maroc-archive > p { font-family: Tahoma, sans-serif; letter-spacing: 0; }
.maroc-archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 8px;
  padding-block: clamp(6px, 1.55vw, 19px);
  border-block-start: 1px solid #e7bb926e;
  font-size: clamp(.66rem, 1.2vw, 1.08rem);
}
.maroc-archive-row bdi { color: #edbc96; font-weight: 700; }
.maroc-archive-row strong { font-weight: 550; }
.maroc-stage-progress {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: #e6af7e;
  transform: scaleX(var(--scene-progress, 0));
  transform-origin: left;
}
[dir="rtl"] .maroc-stage-progress { transform-origin: right; }

.maroc-chapters { grid-column: 1; grid-row: 1; }
.maroc-chapter {
  min-height: clamp(345px, 56vh, 490px);
  display: flex;
  align-items: center;
  padding-block: 38px;
  border-block-end: 1px solid #d6c6b2;
}
.maroc-chapter:last-child { border-block-end: 0; }
.maroc-kicker {
  color: #824622;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-block-end: 15px;
}
.maroc-chapter h2, .maroc-catalogue-head h2 {
  font: 400 clamp(2.45rem, 5.3vw, 4.6rem)/1 var(--editorial);
  letter-spacing: -.059em;
}
[dir="rtl"] .maroc-chapter h2, [dir="rtl"] .maroc-catalogue-head h2 {
  font-family: Tahoma, sans-serif;
  letter-spacing: 0;
  line-height: 1.18;
}
.maroc-chapter p:not(.maroc-kicker) {
  max-width: 40ch;
  margin-block-start: 19px;
  color: #41564c;
  font-size: clamp(1rem, 1.4vw, 1.13rem);
}
.maroc-chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-block-start: 17px;
  text-decoration: underline;
  text-underline-offset: 5px;
  font-weight: 700;
}
.maroc-static { display: none; }
.maroc-static-photo { width: 100%; height: auto; border-radius: 4px; margin-block-start: 20px; }
.maroc-static-paper {
  position: relative;
  margin-block-start: 22px;
  min-height: 248px;
  background: #e9dcca;
}
.maroc-static-paper .maroc-grid-cells { inset: 8% 31% 8% 5%; --grid-words: 1; }
.maroc-static-paper .maroc-sheet { position: absolute; width: 39%; inset: 15% 6% 8% auto; padding: 5%; }

.maroc-catalogue {
  background: #0f2d26;
  color: #fff5e7;
  padding-block: clamp(45px, 6vw, 85px);
}
.maroc-catalogue-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-block-end: 30px;
}
.maroc-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.maroc-catalogue-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  min-height: 156px;
  border-block-start: 1px solid #ca9b78;
  background: #183a32;
  padding: 19px 16px;
}
.maroc-catalogue-card:hover { background: #224e41; }
.maroc-catalogue-card > bdi { color: #f1c49d; font-size: .84rem; font-weight: 700; }
.maroc-catalogue-card h3 { font: 400 clamp(1.3rem, 2.65vw, 2.45rem)/1.05 var(--editorial); margin: 8px 0 18px; }
[dir="rtl"] .maroc-catalogue-card h3 { font-family: Tahoma, sans-serif; line-height: 1.2; }
.maroc-catalogue-card > span { display: flex; justify-content: space-between; width: 100%; margin-top: auto; font-size: .89rem; }
.maroc-catalogue .arrow { color: #eec29c; }

@media (max-width: 820px) {
  .maroc-hero-copy { grid-template-columns: minmax(0, 1fr); padding-block: 34px 24px; }
  .maroc-copy h1 { font-size: clamp(2.8rem, 8.9vw, 4.2rem); }
  .maroc-copy > p { margin-block: 15px 17px; }
  .maroc-hero-links { margin-block-start: 12px; }
  .maroc-hero-links a { font-size: .83rem; gap: 5px; padding-inline: 7px; }
  .maroc-hero-media { aspect-ratio: 1.9 / 1; min-height: 0; }
  .maroc-hero-media figcaption { inset-inline: 10px; }
}
@media (max-width: 720px) {
  .maroc-story-layout { display: block; }
  .maroc-story { scroll-margin-block-start: 24vh; }
  .maroc-stage { top: 8px; z-index: 2; }
  .maroc-chapter { min-height: 315px; padding: 28px 0; }
  .maroc-chapter h2, .maroc-catalogue-head h2 { font-size: clamp(2.35rem, 10vw, 4.08rem); }
  .maroc-catalogue-grid { grid-template-columns: 1fr; gap: 8px; }
  .maroc-catalogue-card { min-height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .maroc-story-layout { display: block; }
  .maroc-stage { display: none; }
  .maroc-chapter { display: block; min-height: 0; }
  .maroc-static { display: block; }
  .maroc-static-photo, .maroc-static-paper { max-width: 650px; }
}
