/* ==================================================
   ABOUT US PAGE

   Loaded after css/style.css. This file contains only About-page
   layout and artwork rules so the shared homepage, Repository,
   Troop, Pack, and Crew styling remains untouched.
   ================================================== */

.about-page {
  --about-green: #17331f;
  --about-green-deep: #0c2818;
  --about-gold: #d0ae5c;
  --about-paper: #f3ede0;
  --about-ink: #182019;
  --about-line: rgba(92, 76, 49, 0.28);
}

/* ==================================================
   COMPACT GLOBAL NAVIGATION

   Matches the navigation-only treatment used by the SS Repository.
   The full Scout Society logo/name block is intentionally omitted.
   ================================================== */

.about-page .site-header {
  min-height: 62px;
  padding: 0 38px;
  justify-content: flex-end;
}

.about-page .primary-navigation {
  margin-left: auto;
  justify-content: flex-end;
}

/* ==================================================
   HERO
   ================================================== */

.about-hero {
  position: relative;
  isolation: isolate;
  /*
    Keep the About banner close to the compact visual height used on the
    Repository page. The source artwork is intentionally cropped by
    object-fit: cover rather than displayed as a tall photographic hero.
  */
  min-height: var(--section-hero-height, 258px);
  overflow: hidden;
  color: #fff8e8;
  background: #17301e;
}

.about-hero-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

.about-hero-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 22, 14, 0.62) 0%, rgba(5, 22, 14, 0.43) 31%, rgba(5, 22, 14, 0.08) 58%, transparent 76%),
    linear-gradient(180deg, rgba(6, 19, 12, 0.08), rgba(6, 19, 12, 0.25));
}

.about-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(calc(100% - 80px), 1120px);
  min-height: var(--section-hero-height, 258px);
  margin-inline: auto;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.58);
}

.about-hero h1 {
  max-width: 650px;
  margin: 0 0 10px;
  color: #fff9e9;
  font-size: clamp(34px, 3.8vw, 47px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.about-hero-content p {
  margin: 0;
  color: #ead8a4;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(15px, 1.55vw, 19px);
  font-weight: 600;
  line-height: 1.25;
}

/* ==================================================
   PAPER BODY
   ================================================== */

.about-paper {
  position: relative;
  background-color: var(--about-paper);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.34), transparent 42%),
    url("../images/ui/paper-texture.png");
  background-repeat: no-repeat, repeat;
  background-size: auto, 256px 256px;
}

.about-content-width {
  width: min(calc(100% - 72px), 1120px);
  margin-inline: auto;
}

.about-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  border-bottom: 1px solid var(--about-line);
}

.about-panel {
  min-height: 390px;
  padding: 48px 48px 44px;
}

.about-story {
  border-right: 1px solid var(--about-line);
}

.about-panel h2,
.about-mascot h2 {
  margin: 0 0 27px;
  color: var(--about-ink);
  font-size: clamp(29px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.about-story p,
.about-mascot-copy p {
  color: #2a2f29;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
}

.about-story p:last-child,
.about-mascot-copy p:last-child {
  margin-bottom: 0;
}

/* ==================================================
   VALUES
   ================================================== */

.about-values-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-values-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  color: #283029;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.35;
}

.about-values-list strong {
  color: #17331f;
}

.about-value-check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #efe4bc;
  background: #173b25;
  border: 1px solid rgba(93, 80, 48, 0.55);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(225, 196, 125, 0.14);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

/* ==================================================
   MASCOT
   ================================================== */

.about-mascot {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 42px;
  align-items: center;
  min-height: 440px;
  padding: 48px 48px 24px;
}

.about-mascot-copy {
  align-self: start;
}

.about-mascot-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin: -16px 0 -24px;
}

.about-mascot-figure img {
  width: min(100%, 285px);
  height: auto;
  filter: drop-shadow(0 8px 8px rgba(59, 28, 12, 0.12));
}

/* ==================================================
   SCENIC CLOSING + PROGRAM LINKS
   ================================================== */

.about-scenic-footer {
  position: relative;
  /* Match the supplied 1983 × 793 footer artwork at desktop widths. */
  min-height: 400px;
  aspect-ratio: 1983 / 793;
  margin-top: -1px;
  overflow: hidden;
  color: #f7efdc;
  background: #17321f;
}

.about-footer-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}

/*
  The new footer artwork starts with a warmer parchment tone than the main
  About body. This shallow overlay fades the page paper into the artwork so
  the top edge does not read as a hard horizontal seam.
*/
.about-scenic-footer::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 86px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(243, 237, 224, 0.98) 0%,
    rgba(243, 237, 224, 0.70) 30%,
    rgba(243, 237, 224, 0.24) 68%,
    rgba(243, 237, 224, 0) 100%
  );
}

.about-closing-copy {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 72px), 1120px);
  margin-inline: auto;
  /* Keep the closing statement understated, like the supplied reference. */
  padding-top: 24px;
  color: #1c2b1d;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.about-closing-copy h2 {
  margin: 0 0 5px;
  font-size: clamp(18px, 2.15vw, 27px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.about-closing-copy p {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
}

.about-program-bar {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 15px 36px 10px;
  color: #f5ecd8;
  /* The supplied image already has a dark forest foreground. A translucent
     bar lets that landscape continue behind the navigation. */
  background: rgba(7, 35, 21, 0.76);
  border-top: 1px solid rgba(222, 190, 108, 0.28);
  backdrop-filter: blur(1.5px);
}

.about-program-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(920px, 100%);
  margin-inline: auto;
}

.about-program-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 18px;
  color: #f4ead0;
  border-right: 1px solid rgba(220, 188, 103, 0.28);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease;
}

.about-program-links a:last-child {
  border-right: 0;
}

.about-program-links a:hover,
.about-program-links a:focus-visible {
  color: #102518;
  background: #dfc476;
}

.about-program-links svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.about-copyright {
  margin: 8px 0 0;
  color: rgba(245, 236, 216, 0.78);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

/* ==================================================
   RESPONSIVE BREAKPOINTS
   ================================================== */

@media (max-width: 1110px) {
  .about-page .site-header {
    min-height: 60px;
    padding-inline: 30px;
  }

  .about-panel {
    padding-inline: 36px;
  }

  .about-mascot {
    padding-inline: 36px;
  }
}

@media (max-width: 940px) {
  .about-page .site-header {
    min-height: 62px;
    padding-inline: 22px;
  }

  .about-page .menu-toggle {
    margin-left: auto;
  }

  .about-hero {
    min-height: 210px;
  }

  .about-hero-art {
    object-position: 62% center;
  }

  .about-hero-content {
    width: min(calc(100% - 56px), 850px);
    min-height: 210px;
    padding: 0;
  }

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

  .about-story {
    border-right: 0;
    border-bottom: 1px solid var(--about-line);
  }

  .about-panel {
    min-height: 0;
  }

  .about-mascot {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 760px) {
  .about-hero {
    min-height: 250px;
  }

  .about-hero-art {
    object-position: 66% center;
  }

  .about-hero-shade {
    background: linear-gradient(90deg, rgba(5, 22, 14, 0.83) 0%, rgba(5, 22, 14, 0.64) 48%, rgba(5, 22, 14, 0.2) 100%);
  }

  .about-hero-content {
    width: min(calc(100% - 40px), 660px);
    min-height: 250px;
    padding: 0;
  }

  .about-hero h1 {
    max-width: 440px;
    font-size: clamp(34px, 9vw, 44px);
  }

  .about-hero-content p {
    max-width: 380px;
    font-size: 17px;
  }

  .about-content-width {
    width: min(calc(100% - 34px), 690px);
  }

  .about-panel,
  .about-mascot {
    padding: 38px 22px;
  }

  .about-mascot {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .about-mascot-figure {
    min-height: 330px;
    margin: -15px 0 -38px;
  }

  .about-mascot-figure img {
    width: min(72vw, 275px);
  }

  .about-scenic-footer {
    min-height: 470px;
  }

  .about-footer-art {
    object-position: center center;
  }

  .about-closing-copy {
    width: min(calc(100% - 40px), 620px);
    padding-top: 28px;
  }

  .about-program-bar {
    padding-inline: 18px;
  }

  .about-program-links {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }

  .about-program-links a {
    border-right: 0;
    border-bottom: 1px solid rgba(220, 188, 103, 0.22);
  }

  .about-program-links a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 430px) {
  .about-hero {
    min-height: 245px;
  }

  .about-hero-art {
    object-position: 69% center;
  }

  .about-hero-content {
    width: calc(100% - 34px);
    min-height: 245px;
    padding: 0;
  }

  .about-hero h1 {
    font-size: 34px;
  }

  .about-panel h2,
  .about-mascot h2 {
    font-size: 29px;
  }

  .about-values-list li {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    font-size: 15px;
  }

  .about-value-check {
    width: 29px;
    height: 29px;
    font-size: 16px;
  }

  .about-closing-copy {
    padding-top: 24px;
  }

  .about-closing-copy h2 {
    font-size: 20px;
  }

  .about-closing-copy p {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-program-links a {
    transition: none;
  }
}

/* ==================================================
   V5 FIELD-JOURNAL DIALOGS + COMPACT FOOTER

   Story / Values remain side by side on desktop. The first two paragraphs of
   Story and Mascot stay visible in the page. Their complete long-form text is
   displayed in native <dialog> windows with an internal scroll area.
   ================================================== */

/* --- Preserve the approved page-level composition ------------------- */

.about-page .about-primary-grid {
  align-items: start;
}

.about-page .about-panel {
  min-height: 390px;
}

.about-page .about-visible-copy p {
  margin-bottom: 18px;
}

/* Keep the phoenix near the top; opening a journal no longer changes the
   section height, so its alignment remains stable. */
.about-page .about-mascot {
  align-items: start;
}

.about-page .about-mascot-figure {
  align-self: start;
  padding-top: 18px;
}

/* --- Journal launch buttons ----------------------------------------- */

.about-page .about-journal-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 41px;
  margin-top: 6px;
  padding: 8px 14px;
  color: #24311f;
  background: rgba(239, 227, 197, 0.72);
  border: 1px solid #a28b56;
  border-radius: 5px;
  box-shadow: 0 2px 0 rgba(91, 72, 42, 0.12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.about-page .about-journal-open svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 160ms ease;
}

.about-page .about-journal-open:hover,
.about-page .about-journal-open:focus-visible {
  color: #fff;
  background: #173b25;
  border-color: #173b25;
  transform: translateY(-1px);
}

.about-page .about-journal-open:hover svg,
.about-page .about-journal-open:focus-visible svg {
  transform: translateX(3px);
}

/* --- Native dialog / field-journal presentation -------------------- */

body.about-dialog-open {
  overflow: hidden;
}

.about-journal-dialog {
  width: min(790px, calc(100% - 40px));
  max-width: 790px;
  max-height: none;
  margin: auto;
  padding: 0;
  color: #252a25;
  background: transparent;
  border: 0;
  overflow: visible;
}

.about-journal-dialog::backdrop {
  background: rgba(5, 17, 11, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.about-journal {
  position: relative;
  display: grid;
  grid-template-rows: auto 9px minmax(0, 1fr);
  max-height: min(78vh, 760px);
  overflow: hidden;
  background-color: #f3ede0;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.35), transparent 42%),
    url("../images/ui/paper-texture.png");
  background-repeat: no-repeat, repeat;
  background-size: auto, 256px 256px;
  border: 1px solid #8f7a4b;
  border-radius: 4px;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.48),
    0 0 0 5px rgba(219, 195, 132, 0.14);
}

/* Thin inner line gives the window the appearance of a bound field journal. */
.about-journal::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(128, 102, 54, 0.28);
  border-radius: 2px;
}

.about-journal-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 21px 24px 17px 28px;
  color: #f7efd9;
  background:
    radial-gradient(circle at 14% -90%, rgba(88, 125, 84, 0.38), transparent 58%),
    linear-gradient(90deg, #173822, #0d2b1a 65%, #092317);
  border-bottom: 1px solid rgba(219, 184, 97, 0.4);
}

.about-journal-kicker {
  margin: 0 0 5px;
  color: #ddc278;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}

.about-journal-header h2 {
  margin: 0;
  color: #fff8e7;
  font-size: clamp(27px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.about-journal-close {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  padding: 0;
  color: #e4cb86;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(224, 196, 125, 0.68);
  border-radius: 50%;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.about-journal-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.about-journal-close:hover,
.about-journal-close:focus-visible {
  color: #102518;
  background: #e0c47d;
  transform: rotate(4deg);
}

.about-journal-rule {
  position: relative;
  z-index: 4;
  background: linear-gradient(90deg, #b59650, #dfc67e 48%, #b59650);
}

.about-journal-rule span::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #7b622d;
  background: #f3e5c0;
  border: 1px solid #a68a4d;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.about-journal-scroll {
  position: relative;
  z-index: 2;
  min-height: 0;
  padding: 27px 38px 35px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #8d7545 rgba(202, 182, 139, 0.24);
  scrollbar-width: thin;
}

.about-journal-scroll p {
  width: min(100%, 68ch);
  margin: 0 auto 1.25em;
  color: #292d28;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.72;
}

.about-journal-scroll p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.11em 0 0;
  color: #173b25;
  font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
  font-size: 3.1em;
  font-weight: 800;
  line-height: 0.82;
}

.about-journal-scroll strong {
  color: #173b25;
}

.about-journal-scroll .about-journal-signoff {
  width: min(100%, 68ch);
  margin: 26px auto 0;
  padding-top: 17px;
  color: #775f2d;
  border-top: 1px solid rgba(123, 98, 45, 0.42);
  font-family: "Arial Narrow", "Liberation Sans Narrow", Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

/* --- Compact scenic footer retained from the approved V4 direction --- */

.about-page .about-scenic-footer {
  min-height: 0;
  /* More vertical room for the mountain/valley artwork. The green program
     bar stays anchored at the bottom at its existing size. */
  height: 225px;
  aspect-ratio: auto;
}

.about-page .about-footer-art {
  object-fit: cover;
  /* Favor a little more of the lower landscape and less empty parchment sky. */
  object-position: center 60%;
}

.about-page .about-scenic-footer::before {
  height: 34px;
  background: linear-gradient(
    180deg,
    rgba(243, 237, 224, 0.94) 0%,
    rgba(243, 237, 224, 0.44) 45%,
    rgba(243, 237, 224, 0) 100%
  );
}

.about-page .about-closing-copy {
  position: absolute;
  z-index: 2;
  /* Lower the motto so it hovers just above the mountain ridge. */
  top: 52px;
  right: 36px;
  left: 36px;
  width: auto;
  margin: 0;
  padding: 0;
}

.about-page .about-closing-copy h2 {
  margin-bottom: 2px;
  font-size: clamp(16px, 1.55vw, 20px);
}

.about-page .about-closing-copy p {
  font-size: 11px;
}

.about-page .about-program-bar {
  /* Keep the bar at the real bottom of the scenic footer. Increasing the
     footer height above is what reveals more landscape. */
  bottom: 0;
  padding: 5px 24px 4px;
  background: rgba(7, 35, 21, 0.70);
}

.about-page .about-program-links a {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 12px;
}

.about-page .about-program-links svg {
  width: 15px;
  height: 15px;
}

.about-page .about-copyright {
  margin-top: 2px;
  font-size: 9px;
}

/* Hide the decorative arrows after the three program links. */
.about-page .about-program-links a svg {
  display: none;
}

@media (max-width: 940px) {
  .about-page .about-panel {
    min-height: 0;
  }

  .about-page .about-scenic-footer {
    height: 240px;
  }

  .about-page .about-closing-copy {
    top: 82px;
  }
}

@media (max-width: 760px) {
  .about-page .about-journal-open {
    width: 100%;
    justify-content: space-between;
  }

  .about-journal-dialog {
    width: calc(100% - 20px);
  }

  .about-journal {
    max-height: calc(100dvh - 24px);
  }

  .about-journal-header {
    gap: 14px;
    padding: 18px 17px 15px 20px;
  }

  .about-journal-kicker {
    font-size: 9px;
    letter-spacing: 0.11em;
  }

  .about-journal-header h2 {
    font-size: clamp(25px, 7vw, 32px);
  }

  .about-journal-close {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
  }

  .about-journal-scroll {
    padding: 24px 20px 29px;
  }

  .about-journal-scroll p {
    font-size: 15.5px;
    line-height: 1.68;
  }

  .about-page .about-scenic-footer {
    height: 330px;
  }

  .about-page .about-footer-art {
    object-position: center 61%;
  }

  .about-page .about-closing-copy {
    top: 74px;
    right: 20px;
    left: 20px;
  }

  .about-page .about-closing-copy h2 {
    font-size: 17px;
  }

  .about-page .about-closing-copy p {
    font-size: 10.5px;
  }

  .about-page .about-program-bar {
    padding: 4px 15px 3px;
  }

  .about-page .about-program-links a {
    min-height: 29px;
    padding-block: 4px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .about-page .about-scenic-footer {
    height: 315px;
  }

  .about-page .about-closing-copy {
    top: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-page .about-journal-open,
  .about-journal-close {
    transition: none;
  }
}
