/* The field guide below the stitched hero. */
#view:has(> .home-content) {
  padding-bottom: calc(88px + max(0px, env(safe-area-inset-bottom) - 18px));
}

.home-content {
  --home-rule: rgba(223, 189, 131, .24);
  --home-rose: #f3a5a3;
  --home-display: 'Thmanyah Display', var(--display);
  position: relative;
  z-index: 1;
  font-family: var(--display);
}

.home-content > .section {
  padding-block: clamp(32px, 4.2vw, 64px);
}

.home-content .section-title {
  align-items: center;
  gap: 12px 24px;
  padding-block-start: 16px;
  margin-block-end: clamp(18px, 2.4vw, 32px);
  border-block-start: 1px solid var(--home-rule);
  background: linear-gradient(var(--gold), var(--gold)) top right / 34px 2px no-repeat;
}

.home-content .section-title h2 {
  font-size: clamp(27px, 3.4vw, 48px);
  margin: 0;
}

.home-content .section-title p {
  margin-block-start: 6px;
}

.home-content .btn,
#home-feed .tw-act {
  min-height: 44px;
  min-width: 44px;
}

.home-content :focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  scroll-margin-block-end: 105px;
}

.home-content .reveal.pre:focus-within {
  opacity: 1;
  transform: none;
}

/* News reads as a bulletin. The lead's media is a companion to the copy. */
#home-feed {
  gap: 10px;
}

.home-feed-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 16px;
  color: var(--muted);
  border-inline-start: 2px solid var(--home-rule);
}

#home-feed .tweet {
  min-width: 0;
  padding: clamp(13px, 2vw, 24px);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(148deg, #271013, #150a0b 65%);
  box-shadow: none;
  backdrop-filter: none;
  transform: none;
}

#home-feed .tweet::before {
  content: none;
}

#home-feed .tweet.pinned {
  border-color: var(--home-rule);
  background: linear-gradient(148deg, #2e1915, #190d0d 66%);
}

#home-feed .tw-pin {
  padding: 0;
  margin-block-end: 6px;
}

#home-feed .tw-row {
  display: block;
}

#home-feed .tw-av {
  float: right;
  width: 32px;
  height: 32px;
  margin-inline-end: 9px;
}

#home-feed .tw-av img {
  width: 18px;
  height: 18px;
}

#home-feed .tw-head {
  min-height: 32px;
  margin-block-end: 8px;
}

#home-feed :is(.tw-handle, .tw-head time, .tw-act) {
  color: var(--muted);
}

#home-feed :is(.tw-title, .tw-body) {
  text-wrap: wrap;
  overflow-wrap: anywhere;
}

#home-feed .tw-title {
  font-size: clamp(18px, 2vw, 24px);
  margin-block-end: 4px;
}

#home-feed .tw-body {
  max-width: 64ch;
}

#home-feed .tw-tag {
  margin: 0 0 0 5px;
  overflow-wrap: anywhere;
}

#home-feed .tw-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 5px 0 0;
}

#home-feed .tw-act {
  padding-inline: 8px;
}

.home-post-media {
  position: relative;
  margin-block-start: 12px;
  max-width: 340px;
}

.home-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--home-rule);
  border-radius: 10px;
}

.home-video-play {
  position: absolute;
  inset-inline-start: 8px;
  inset-block-end: 8px;
  padding-inline: 12px;
  font-size: 14px;
  color: var(--text);
  background: #16090c;
  border-color: var(--home-rule);
}

.home-video-play:is(:hover, :focus-visible) {
  background: #31131a;
}

.home-play-mark {
  width: 10px;
  height: 12px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.home-video-error {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 8px;
}

/* A thread links each step to the next. */
.home-content .sh-steps {
  --step-node: 34px;
  --step-gap: 12px;
  gap: 0;
}

.home-content .sh-steps li {
  grid-template-columns: var(--step-node) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 8px var(--step-gap);
  padding: 10px 0 16px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.home-content .sh-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  inset-block: 44px -10px;
  inset-inline-start: calc(var(--step-node) / 2);
  border-inline-start: 1px dashed var(--home-rule);
  pointer-events: none;
}

.home-content .sh-n {
  display: grid;
  place-items: center;
  height: var(--step-node);
  border: 1px solid var(--home-rule);
  border-radius: 50%;
  background: #281319;
  color: var(--gold);
  font: 700 16px/1 var(--display);
}

.home-content .sh-steps h3 {
  font-weight: 700;
  font-size: 22px;
}

.home-content .sh-steps p {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.55;
}

.home-content .sh-steps .btn {
  grid-column: 2;
}

/* Give each directory illustration a stage above its label. */
.home-content .hub-picker {
  --tile-art-size: clamp(84px, 24vw, 98px);
  --tile-inset: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  perspective: none;
}

.home-tile {
  --tile-glow: #7830408a;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: start;
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(135deg, #231014, #14090a 55%);
  transition: border-color .2s, opacity .45s, transform .45s;
}

.home-tile:is([href="#/logbook"], [href="#/invitation"]) {
  --tile-glow: #815b358a;
}

.home-tile:is([href="#/caselab"], [href="#/honors"], [href="#/theater"]) {
  --tile-glow: #3b626b8a;
}

.home-tile[href="#/podcast"] {
  --tile-glow: #55457f9c;
}

.home-tile:is(:hover, :focus-visible) {
  border-color: var(--gold);
  background: linear-gradient(135deg, #39191d, #1b0b0e 65%);
}

.home-tile-copy {
  padding: 10px var(--tile-inset) 0;
}

.home-tile-copy h3 {
  font: 700 clamp(20px, 1.75vw, 25px)/1.24 var(--home-display);
}

.home-tile-copy span {
  display: block;
  color: var(--gold);
  font: 600 14px/1.3 var(--serif);
  letter-spacing: .035em;
  text-align: right;
  margin-block-start: 3px;
}

.home-tile-copy p {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.home-tile-art {
  display: grid;
  place-items: center;
  height: calc(var(--tile-art-size) + 20px);
  padding-inline: 8px;
  overflow: hidden;
  border-start-start-radius: 15px;
  border-start-end-radius: 15px;
  border-block-end: 1px solid var(--home-rule);
  background: radial-gradient(ellipse at 50% 42%, var(--tile-glow), transparent 75%), var(--bg-2);
  pointer-events: none;
}

.home-tile-art > svg {
  direction: ltr;
  max-width: min(100%, calc(var(--tile-art-size) * 12 / 7));
  max-height: var(--tile-art-size);
}

.home-tile-art svg text {
  font-family: Tahoma, sans-serif;
}

.home-tile-art .ta-room {
  width: min(100%, calc(var(--tile-art-size) * 52 / 30));
  height: auto;
  border-radius: 10px;
}

.home-tile-art .ta-thread-line {
  width: calc(var(--tile-art-size) * 4 / 15);
  height: var(--tile-art-size);
}

.home-tile-art .ta-brands img {
  height: calc((var(--tile-art-size) - 8px) / 3);
}

.home-tile-art .lead-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0;
}

.home-tile-art .lead-av {
  width: calc((var(--tile-art-size) - 10px) / 2);
  height: calc((var(--tile-art-size) - 10px) / 2);
  margin: 0;
}

.home-tile-art .ta-pod img {
  width: var(--tile-art-size);
  height: var(--tile-art-size);
  border-radius: 22%;
}

.home-tile-arrow {
  display: grid;
  place-items: center;
  justify-self: end;
  margin: 8px var(--tile-inset) 10px;
  width: 24px;
  height: 24px;
  color: var(--gold);
  border: 1px solid var(--home-rule);
  border-radius: 50%;
}

.home-tile-arrow svg {
  width: 14px;
  height: 14px;
}

/* An illustrated plate alongside the six stations. */
.home-content .journey2 {
  gap: clamp(16px, 3vw, 42px);
}

.home-content .journey-fig {
  position: relative;
  top: auto;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--home-rule);
  background: radial-gradient(ellipse at 78% 25%, #793339, #271014 72%);
}

.home-content .journey-fig img {
  height: 176px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: luminosity;
  filter: grayscale(1) contrast(1.1);
}

.journey-fig figcaption {
  padding: 12px;
  font-size: 14px;
  color: var(--text);
}

.journey-fig figcaption bdi {
  display: block;
  color: var(--gold);
}

.home-content .stops2 {
  gap: 0;
}

.home-content .stops2 li {
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0 14px;
  border: 0;
}

.home-content .stops2 li:not(:last-child)::after {
  content: '';
  position: absolute;
  inset-block: 39px -10px;
  inset-inline-start: 15px;
  border-inline-start: 1px dashed var(--home-rule);
}

.home-content .stops2 li::before {
  display: grid;
  place-items: center;
  height: 30px;
  border: 1px solid var(--home-rule);
  border-radius: 50%;
  background: #251116;
  font: 700 14px/1 var(--display);
  color: var(--gold);
  content: counter(s, arabic-indic) / "";
}

.home-content .stops2 h3 {
  font-size: 22px;
  font-weight: 700;
}

.home-content .stops2 p {
  margin: 3px 0;
  line-height: 1.55;
}

/* Keep the archival subjects and their caption clear of the quote. */
.home-content .history-band {
  min-height: 0;
  height: auto;
  align-items: stretch;
  background: #261013;
  border-block: 1px solid var(--home-rule);
}

.home-content .history-band::after {
  content: none;
}

.home-content .band-photo {
  position: static;
  height: auto;
  aspect-ratio: 16 / 10;
  object-position: 70% 38%;
  opacity: 1;
}

.home-content .band-text {
  display: grid;
  align-content: center;
  padding: clamp(20px, 4vw, 64px);
  background: linear-gradient(135deg, #300e15, #15090b);
}

.home-content .band-quote {
  font-size: clamp(29px, 3.7vw, 57px);
  line-height: 1.24;
  text-shadow: none;
}

.home-content .band-quote em {
  color: var(--gold);
}

.home-content .band-text small {
  margin-top: 9px;
  color: var(--muted);
}

.home-honors .honor-teaser {
  gap: clamp(16px, 3vw, 42px);
  max-width: 990px;
}

.home-honors .honor-h em {
  color: var(--home-rose);
}

.home-honors .honor-teaser p {
  margin: 8px 0 0;
  max-width: 38ch;
}

.home-honors .honor-teaser .btn {
  margin-block-start: 12px;
}

.home-leadership .team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.home-leadership .member {
  padding: 12px 8px;
  border-radius: 14px;
}

.home-leadership .member-photo {
  height: 82px;
  width: 72px;
  margin: 0 auto 8px;
}

.home-leadership .member-photo::before {
  height: 72px;
}

.home-leadership .member-photo img {
  height: calc(183px * var(--s, 1));
  top: 2px;
}

.home-leadership .member h3 {
  font-size: clamp(17px, 1.6vw, 22px);
}

.home-content .finale2 {
  padding-block: clamp(27px, 4.5vw, 62px);
  border-block: 1px solid var(--home-rule);
}

.home-content .finale-bg {
  opacity: .33;
  filter: saturate(.85);
}

.home-content .finale2::after {
  background: linear-gradient(90deg, #110709b8, #13070ae8);
}

.home-content .finale-in {
  gap: 14px;
}

.home-content .finale-in .hero-wordmark {
  width: clamp(92px, 12vw, 145px);
  animation: none;
}

.home-content .fin-h {
  display: block;
  max-width: 19ch;
  font-size: clamp(30px, 4.1vw, 55px);
  line-height: 1.23;
  text-shadow: none;
}

.home-content .fin-h em {
  color: var(--gold);
}

.home-content .footer {
  gap: 6px 24px;
  padding: 14px 0;
  border: 0;
  color: var(--muted);
  line-height: 1.6;
}

.home-content .footer .credits {
  font-size: 12px;
  max-width: 610px;
}

@media (min-width: 660px) {
  #home-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #home-feed > .tweet:first-child {
    grid-column: 1 / -1;
  }

  #home-feed > .tweet:first-child .tw-main.has-media {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 30%);
    grid-template-rows: 1fr auto;
    justify-items: start;
    align-content: start;
    gap: 0 22px;
  }

  #home-feed > .tweet:first-child:has(.has-media) .tw-av {
    display: none;
  }

  #home-feed > .tweet:first-child .home-post-media {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    width: 100%;
    margin: 0;
  }

  .home-content .history-band {
    grid-template-columns: 55% minmax(0, 1fr);
  }

  .home-content .band-photo {
    height: 100%;
    max-height: 418px;
  }

  .home-leadership .team-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-content .finale-in {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: start;
    gap: clamp(16px, 4vw, 50px);
  }

  .home-content .fin-h {
    margin-inline-end: auto;
  }

  .home-content .finale-in .btn {
    flex: none;
  }
}

@media (min-width: 760px) {
  .home-content .hub-picker {
    --tile-art-size: 160px;
    --tile-inset: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 1fr;
    gap: 14px;
  }

  .home-content .sh-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
  }

  .home-content .sh-steps li {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    padding: 0;
  }

  .home-content .sh-n {
    width: var(--step-node);
  }

  .home-content .sh-steps .btn {
    grid-column: auto;
  }

  .home-content .sh-steps li:not(:last-child)::after {
    inset-block: calc(var(--step-node) / 2) auto;
    inset-inline: var(--step-node) -26px;
    border: 0;
    border-block-start: 1px dashed var(--home-rule);
  }

  .home-content .journey2 {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  }

  .home-content .journey-fig {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    background: radial-gradient(ellipse at 50% 28%, #793339, #271014 76%);
  }

  .home-content .journey-fig img {
    height: clamp(310px, 35vw, 470px);
  }

  .journey-fig figcaption {
    width: 100%;
    background: #251015;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-content .home-tile,
  .home-content .btn {
    transition: none;
  }
}

/* النص الطويل في البطاقة يدفع السهم للأسفل بدل أن يتداخل معه */
.home-content .home-tile { height: auto; min-height: 0; }
.home-content .home-tile-copy { overflow: visible; }
@media (max-width: 659px) { .home-content .home-tile-copy p { font-size: 14px; } }
