/* v70 — one convergence layer for header rhythm, petition purpose and memorial continuity.
   Desktop and mobile are intentionally tuned separately. */

/* Remove the three competing red navigation/progress ornaments. */
.reading-progress {
  display: none !important;
}

.desktop-nav a::after,
.section-nav a::before,
.section-nav a::after,
.hero .eyebrow::before {
  display: none !important;
  content: none !important;
}

.desktop-nav a.active,
.section-nav a.active {
  color: #f2ede4;
  background: transparent;
  box-shadow: none !important;
}

/* The petition now states its purpose before asking for a click. */
.petition-purpose {
  display: grid;
  width: min(calc(100% - var(--gutter) * 2), var(--w-standard));
  margin: 0 auto;
  padding: clamp(46px, 6vw, 78px) 0 clamp(30px, 4vw, 52px);
  border-bottom: 1px solid rgb(229 185 95 / 20%);
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.22fr);
  align-items: end;
  gap: clamp(36px, 6vw, 84px);
}

.petition-purpose-eyebrow {
  margin: 0 0 12px;
  color: #dfb354;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

.petition-purpose h2 {
  max-width: 15em;
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 720;
  letter-spacing: var(--track-h);
  line-height: 1.42;
  text-wrap: balance;
}

.petition-purpose > p {
  max-width: 38em;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.95;
}

.petition-grid {
  padding-top: clamp(38px, 5vw, 64px);
}

/* A quiet companion image: present, but never louder than the messages. */
.prayer-wall {
  position: relative;
  overflow: hidden;
}

.prayer-wall-companion {
  position: absolute;
  z-index: 0;
  top: 7%;
  right: -2%;
  width: min(47%, 570px);
  height: 86%;
  border-radius: 46% 0 0 46%;
  background:
    linear-gradient(90deg, #14100d 0%, transparent 44%),
    linear-gradient(180deg, #14100d 0%, transparent 25%, transparent 70%, #14100d 100%),
    url("./assets/wangwang-awake-memory.jpg") center 34% / cover no-repeat;
  filter: grayscale(0.28) sepia(0.18) saturate(0.7) brightness(0.62);
  opacity: 0.2;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 84%, transparent 100%);
}

.prayer-wall > :not(.prayer-wall-companion) {
  position: relative;
  z-index: 1;
}

@media (min-width: 721px) {
  :root {
    --sticky-header-height: 126px;
  }

  .header-inner {
    display: grid;
    width: min(calc(100% - 64px), 1240px);
    min-height: 78px;
    margin-inline: auto;
    padding-block: 6px;
    grid-template-columns: minmax(206px, auto) minmax(560px, 1fr) minmax(148px, auto);
    align-items: center;
    gap: clamp(24px, 3vw, 48px);
  }

  .brand {
    justify-self: start;
    gap: 10px;
  }

  .brand-mark {
    width: 30px;
    height: 35px;
  }

  .brand strong {
    font-size: 16px;
    letter-spacing: 0.055em;
    white-space: nowrap;
  }

  .brand small {
    margin-top: 3px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .desktop-nav {
    justify-self: center;
    justify-content: center;
    width: 100%;
    gap: clamp(22px, 2.15vw, 34px);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.035em;
    white-space: nowrap;
  }

  .desktop-nav a {
    min-height: 32px;
    padding: 8px 0;
    text-decoration: none !important;
  }

  .desktop-nav a.active {
    color: #dfb354;
  }

  .language-switch {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 9px;
  }

  .language-switch-label {
    color: rgb(241 236 225 / 62%);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .language-menu summary {
    min-width: 76px;
    height: 40px;
    padding-inline: 13px;
    border-color: rgb(241 236 225 / 23%);
    border-radius: 6px;
    font-size: 13px;
  }

  .language-options {
    width: 188px;
  }

  .language-options button {
    min-height: 40px;
    font-size: 13px;
  }

  .site-bgm-bar {
    padding: 5px 0 8px;
  }

  .site-bgm-inner {
    width: 100%;
    min-height: 0;
    padding: 0;
    justify-content: center;
  }

  .site-bgm-capsule {
    width: min(calc(100% - 64px), 760px);
    min-height: 45px;
    padding: 6px 13px 5px;
    border-radius: 12px;
  }

  .site-bgm-main {
    gap: 8px;
  }

  .site-bgm-label {
    width: auto;
    padding-right: 12px;
    overflow: visible;
    opacity: 1;
    font-size: 10px;
  }

  .site-bgm-transport button,
  .site-bgm-modes button {
    min-width: 28px;
    height: 28px;
  }

  .site-bgm-transport .sound-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .site-bgm-picker {
    width: clamp(170px, 17vw, 220px);
  }

  .site-bgm-picker select {
    height: 31px;
    font-size: 12px;
  }

  .site-bgm-volume {
    width: 70px;
  }

  .site-bgm-meta {
    min-height: 12px;
    padding-left: 85px;
  }

  .site-bgm-note {
    font-size: 9.5px;
  }
}

@media (min-width: 721px) and (max-width: 1080px) {
  .header-inner {
    width: min(calc(100% - 40px), 1000px);
    grid-template-columns: minmax(150px, auto) minmax(430px, 1fr) minmax(96px, auto);
    gap: 18px;
  }

  .desktop-nav {
    gap: 15px;
    font-size: 11.5px;
  }

  .language-switch-label {
    display: none;
  }
}

@media (max-width: 720px) {
  :root {
    --sticky-header-height: 136px;
  }

  .header-inner {
    display: grid;
    width: calc(100% - 32px);
    min-height: 52px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand strong {
    font-size: 13px;
  }

  .language-switch {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .language-switch-label {
    display: inline;
    color: rgb(241 236 225 / 52%);
    font-size: 8px;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }

  .language-menu summary {
    min-width: 49px;
    height: 32px;
    padding-inline: 8px;
    border-radius: 6px;
    font-size: 10px;
  }

  .site-bgm-inner {
    width: calc(100% - 32px);
  }

  .site-bgm-capsule {
    height: auto;
    min-height: 40px;
    padding: 4px 7px 3px;
  }

  .site-bgm-main {
    min-height: 29px;
    align-items: center;
  }

  .site-bgm-meta {
    position: static;
    height: 8px;
    margin: -2px 0 0;
    padding: 0 3px 0 79px;
  }

  .site-bgm-note {
    max-width: none;
    font-size: 6.5px;
  }

  .section-nav {
    gap: 14px;
  }

  .section-nav a {
    border: 0 !important;
    color: rgb(241 236 225 / 58%);
    background: transparent !important;
    box-shadow: none !important;
  }

  .section-nav a.active {
    color: #e5b95f;
    font-weight: 750;
  }

  .petition-purpose {
    width: calc(100% - 40px);
    padding: 42px 0 30px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }

  .petition-purpose-eyebrow {
    margin-bottom: 9px;
    font-size: 10px;
  }

  .petition-purpose h2 {
    max-width: 13em;
    font-size: clamp(23px, 7vw, 29px);
    line-height: 1.42;
  }

  .petition-purpose > p {
    max-width: none;
    font-size: 15px;
    line-height: 1.82;
  }

  .petition-grid {
    padding-top: 34px;
  }

  .prayer-wall-companion {
    top: 4%;
    right: -22%;
    width: 82%;
    height: 72%;
    opacity: 0.19;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 76%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 76%, transparent 100%);
  }
}

@media (max-width: 360px) {
  .language-switch-label {
    display: none;
  }

  .site-bgm-volume {
    width: 32px;
  }

  .section-nav {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prayer-wall-companion {
    transition: none !important;
  }
}
