/* =========================================================
   SOCIAL PERMACULTURE ATLAS
   Page-scoped refinements for social.html
   ========================================================= */

.social-atlas-page {
  --social-sage: #6e7c5a;
  --social-sage-soft: #dfe3d3;
  --social-gold: #b58b4b;
  --social-clay: #9c654d;
  --social-plum: #755d6c;
}

.social-opening,
.social-section {
  position: relative;
  isolation: isolate;
}

.social-paper {
  padding: 5rem clamp(1.4rem, 5vw, 5rem);
  border-top: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 20%),
    var(--paper-light);
}

.social-paper:nth-of-type(even) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 20%),
    rgba(238, 225, 194, .58);
}

.social-opening .section-heading,
.social-section .section-heading {
  max-width: 850px;
  margin-inline: auto;
}

.social-atlas-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  max-width: 1020px;
  margin: 2.2rem auto 2.7rem;
}

.social-atlas-nav a {
  padding: .48rem .8rem;
  border: 1px solid rgba(79, 91, 55, .28);
  border-radius: 999px;
  background: rgba(255,255,255,.27);
  color: var(--forest-dark);
  text-decoration: none;
  font: .72rem/1.2 var(--sans);
}

.social-atlas-nav a:hover {
  border-color: var(--terracotta);
  background: rgba(255,255,255,.55);
}

.social-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 1080px;
  margin: 0 auto 2rem;
  border-block: 1px solid var(--line);
}

.social-facts > div {
  min-width: 0;
  padding: 1.25rem .65rem 1.15rem;
  text-align: center;
  border-left: 1px solid var(--line-soft);
}
.social-facts > div:first-child { border-left: 0; }
.social-facts strong {
  display: block;
  color: var(--forest-dark);
  font: 600 clamp(1.25rem, 2.25vw, 1.9rem)/1 var(--display);
}
.social-facts span {
  display: block;
  margin-top: .45rem;
  color: var(--ink-soft);
  font: .62rem/1.3 var(--sans);
  letter-spacing: .045em;
  text-transform: uppercase;
}

.social-archive-note {
  max-width: 930px;
  margin: 0 auto;
}
.social-archive-note a { display: inline-block; margin-left: .35rem; }

.history-layout {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 1100px;
  margin: 3rem auto 0;
  align-items: center;
}
.history-photo { margin: 0; }
.history-photo img { width: 100%; min-height: 440px; object-fit: cover; }
.history-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .8rem;
}
.history-timeline li {
  position: relative;
  padding: 1rem 1rem 1rem 1.3rem;
  border-left: 4px solid var(--social-sage);
  background: rgba(255,255,255,.28);
}
.history-timeline li:nth-child(2) { border-left-color: var(--social-gold); }
.history-timeline li:nth-child(3) { border-left-color: var(--social-clay); }
.history-timeline li:nth-child(4) { border-left-color: var(--social-plum); }
.history-timeline span,
.ethics-grid article > span,
.person-note > span,
.future-grid article > span {
  display: block;
  color: var(--terracotta);
  font: .64rem/1.2 var(--sans);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.history-timeline strong {
  display: block;
  margin: .2rem 0 .3rem;
  font: 600 1.3rem/1.15 var(--display);
}
.history-timeline p { margin: 0; line-height: 1.48; }

.source-centered { text-align: center; margin: 1.8rem auto 0; }
.source-centered .source-link { font: .7rem/1.2 var(--sans); }

.ethics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1120px;
  margin: 3rem auto 0;
}
.ethics-grid article {
  min-width: 0;
  padding: 1.35rem 1.2rem 1.2rem;
  border-top: 4px solid var(--social-sage);
  border-inline: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,.28);
}
.ethics-grid article:nth-child(2) { border-top-color: var(--social-clay); }
.ethics-grid article:nth-child(3) { border-top-color: var(--social-gold); }
.ethics-grid h3 { margin: .3rem 0 .45rem; font-size: 1.4rem; }
.ethics-grid p { margin: 0; line-height: 1.52; }

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  max-width: 1080px;
  margin: 3rem auto 1.5rem;
}
.person-note {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.28);
}
.person-note h3 { margin: .25rem 0 .45rem; font-size: 1.35rem; }
.person-note p { margin: 0; line-height: 1.5; }
.person-note.collective { border-top: 4px solid var(--social-sage); }

.friendship-story {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr) minmax(240px, .75fr);
  gap: 1rem;
  max-width: 1160px;
  margin: 1.5rem auto 0;
  align-items: stretch;
}
.friendship-story figure {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.28);
}
.friendship-story img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}
.friendship-story > figure:first-child img { object-position: center 42%; }
.friendship-later img { object-position: center; }
.friendship-story figcaption {
  display: block;
  padding: .9rem 1rem 1rem;
  border-top: 1px solid var(--line-soft);
  background: rgba(248, 241, 223, .82);
  line-height: 1.45;
}
.friendship-story figcaption strong { display: block; font: 600 1.05rem/1.2 var(--display); }
.friendship-copy {
  padding: 1.4rem 1.35rem;
  border-left: 4px solid var(--social-plum);
  background: rgba(255,255,255,.3);
}
.friendship-copy h3 { margin: .2rem 0 .65rem; font-size: 1.8rem; }
.friendship-copy p { line-height: 1.62; }
.friendship-copy p:last-child { margin-bottom: 0; }

.future-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  max-width: 1120px;
  margin: 3rem auto 0;
}
.future-grid article {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.28);
}
.future-grid h3 { margin: .25rem 0 .4rem; font-size: 1.3rem; }
.future-grid p { margin: 0; line-height: 1.5; }

@media (max-width: 1050px) {
  .social-facts { grid-template-columns: repeat(3, 1fr); }
  .social-facts > div:nth-child(4) { border-left: 0; }
  .social-facts > div:nth-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .friendship-story { grid-template-columns: 1fr 1fr; }
  .friendship-copy { grid-column: 1 / -1; grid-row: 1; }
}

@media (max-width: 820px) {
  .social-paper { padding-block: 4rem; }
  .history-layout { grid-template-columns: 1fr; }
  .history-photo { max-width: 680px; margin-inline: auto; }
  .history-photo img { min-height: 360px; }
  .ethics-grid,
  .people-grid,
  .future-grid { grid-template-columns: repeat(2, 1fr); }
  .people-grid .collective { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  .social-atlas-nav { justify-content: flex-start; }
  .social-facts { grid-template-columns: repeat(2, 1fr); }
  .social-facts > div:nth-child(n) { border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
  .social-facts > div:nth-child(odd) { border-left: 0; }
  .social-facts > div:last-child { grid-column: 1 / -1; border-left: 0; border-bottom: 0; }
  .ethics-grid,
  .people-grid,
  .future-grid,
  .friendship-story { grid-template-columns: 1fr; }
  .people-grid .collective,
  .friendship-copy { grid-column: 1; }
  .friendship-copy { grid-row: auto; }
  .friendship-story img { min-height: 310px; }
}

@media (max-width: 430px) {
  .social-paper { padding-inline: 1.05rem; }
  .friendship-copy { padding: 1.1rem 1rem; }
}

/* =========================================================
   v2 · Robert's community photographs and reference models
   ========================================================= */

.social-hero figure img {
  object-position: center 53%;
}

.history-photo img {
  object-position: center 45%;
}

.practice-photo {
  max-width: 1050px;
  margin: 2.7rem auto .3rem;
  transform: rotate(-.25deg);
}

.practice-photo img {
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 48%;
}

.practice-photo figcaption {
  padding: .9rem .2rem 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.practice-photo figcaption strong {
  color: var(--forest-dark);
  font-family: var(--display);
  font-size: 1.05rem;
}

.community-life-mosaic .supper-portrait img {
  object-position: center 50%;
}

.community-life-mosaic .meal-prep-photo img {
  object-position: center 43%;
}

.community-life-mosaic .daily-life-photo img {
  object-position: center 48%;
}

.community-life-mosaic .ceremony-photo img {
  object-position: center 52%;
}

.governance-models {
  grid-column: 1 / -1;
  margin-top: .6rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.governance-models > header {
  max-width: 820px;
  margin: 0 auto 1.7rem;
  text-align: center;
}

.governance-models > header h3 {
  margin: .25rem 0 .7rem;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
}

.governance-models > header p:last-child {
  max-width: 720px;
  margin-inline: auto;
  color: var(--ink-soft);
}

.governance-model-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 1rem;
  max-width: 1120px;
  margin-inline: auto;
}

.model-card {
  position: relative;
  min-width: 0;
  padding: 1.45rem 1.4rem 1.35rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--social-sage);
  background: rgba(255,255,255,.3);
  box-shadow: var(--shadow-soft);
}

.model-card > span {
  display: block;
  color: var(--terracotta);
  font: .65rem/1.2 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.model-card h4 {
  margin: .3rem 0 .55rem;
  font: 600 1.75rem/1.15 var(--display);
}

.model-card p {
  line-height: 1.58;
}

.model-card a,
.future-reference-card a,
.external-source-link {
  display: inline-block;
  margin-top: .35rem;
  color: var(--forest-dark);
  font: 700 .72rem/1.35 var(--sans);
  letter-spacing: .035em;
  text-decoration-color: rgba(79,91,55,.45);
  text-underline-offset: .18em;
}

.holacracy-card {
  border-top-color: var(--social-plum);
  background:
    linear-gradient(135deg, rgba(117,93,108,.09), transparent 48%),
    rgba(255,255,255,.34);
}

.personal-model-note {
  margin: 1rem 0 .55rem;
  padding: .9rem 1rem;
  border-left: 3px solid var(--social-plum);
  background: rgba(248,241,223,.74);
  color: var(--forest-dark);
  font-family: var(--hand);
  font-size: 1.15rem;
}

.external-reference-note {
  max-width: 980px;
  margin: 2rem auto 2.5rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--social-gold);
  background: rgba(255,255,255,.28);
  color: var(--ink-soft);
  line-height: 1.55;
}

.external-reference-note strong {
  color: var(--forest-dark);
  font-family: var(--display);
}

.future-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(1.4rem, 4vw, 3.4rem);
  max-width: 1160px;
  margin: 0 auto 2.7rem;
  align-items: center;
}

.future-feature figure {
  margin: 0;
  padding: .72rem .72rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--paper-light);
  box-shadow: var(--shadow-soft);
  transform: rotate(.2deg);
}

.future-feature img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 48%;
  border: 1px solid rgba(117,91,53,.42);
}

.future-feature figcaption {
  padding: .8rem .15rem 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.future-feature h3 {
  margin: .25rem 0 .65rem;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}

.future-feature p {
  line-height: 1.62;
}

.expanded-future-grid .future-reference-card {
  border-top: 4px solid var(--social-sage);
  background: rgba(255,255,255,.34);
}

.expanded-future-grid .future-reference-card:nth-child(2) {
  border-top-color: var(--social-clay);
}

.expanded-future-grid .future-reference-card:nth-child(3) {
  border-top-color: var(--social-gold);
}

@media (max-width: 900px) {
  .governance-model-grid,
  .future-feature {
    grid-template-columns: 1fr;
  }

  .future-feature > div {
    max-width: 760px;
  }
}

@media (max-width: 650px) {
  .practice-photo {
    margin-top: 2rem;
    transform: none;
  }

  .practice-photo img,
  .future-feature img {
    aspect-ratio: 1 / 1;
  }

  .governance-models {
    padding-top: 2.2rem;
  }

  .model-card,
  .external-reference-note {
    padding-inline: 1rem;
  }

  .future-feature figure {
    transform: none;
  }
}

/* =========================================================
   Final polish · sharper hero and Jaya's community systems
   ========================================================= */

.social-hero figure img {
  object-position: center 57%;
}

.jaya-social-section {
  padding: 5rem;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.42), transparent 30%),
    #e8d9b9;
  border-block: 1px solid var(--line);
}

.jaya-social-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr);
  gap: 4rem;
  max-width: 1180px;
  margin: 3rem auto 0;
  align-items: start;
}

.jaya-social-copy {
  max-width: 760px;
}

.jaya-social-gallery {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.jaya-social-gallery figure {
  position: relative;
  margin: 0;
  padding: 9px 9px 42px;
  border: 1px solid var(--line);
  background: var(--paper-light);
  box-shadow: var(--shadow-soft);
}

.jaya-social-gallery figure:first-child {
  transform: rotate(-.7deg);
}

.jaya-social-gallery figure:last-child {
  margin-top: 3.5rem;
  transform: rotate(.65deg);
}

.jaya-social-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.jaya-social-portrait img {
  object-position: center 34%;
}

.jaya-social-car img {
  object-position: center;
}

.jaya-social-gallery figcaption {
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: .72rem;
  color: var(--ink-soft);
  font-size: .74rem;
  line-height: 1.25;
}

.jaya-social-gallery figcaption strong {
  display: block;
  color: var(--forest-dark);
  font-family: var(--display);
  font-size: .94rem;
}

.jaya-program-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  max-width: 1180px;
  margin: 3rem auto 0;
}

.jaya-program-grid article {
  padding: 1.2rem;
  border: 1px solid var(--line-soft);
  border-top: 4px solid var(--social-sage);
  background: rgba(255,255,255,.34);
}

.jaya-program-grid article:nth-child(2) { border-top-color: var(--social-gold); }
.jaya-program-grid article:nth-child(3) { border-top-color: var(--social-clay); }
.jaya-program-grid article:nth-child(4) { border-top-color: var(--social-plum); }

.jaya-program-grid span {
  color: var(--terracotta);
  font: 700 .65rem/1.2 var(--sans);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.jaya-program-grid h3 {
  margin: .35rem 0 .5rem;
  font-size: 1.32rem;
}

.jaya-program-grid p {
  margin: 0;
  line-height: 1.5;
}

.jaya-book-feature {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  background: rgba(248,241,223,.72);
  box-shadow: var(--shadow-soft);
}

.jaya-book-feature img {
  width: 100%;
  box-shadow: 0 10px 25px rgba(61,54,38,.18);
}

.jaya-book-feature h3 {
  margin: .25rem 0 .65rem;
  font-size: 1.8rem;
}

.jaya-book-feature p:last-child {
  margin-bottom: 0;
  line-height: 1.58;
}

@media (max-width: 1020px) {
  .jaya-social-layout {
    grid-template-columns: 1fr;
  }

  .jaya-social-gallery {
    max-width: 760px;
    margin-inline: auto;
  }

  .jaya-program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .jaya-social-section {
    padding: 4rem 1.3rem;
  }

  .jaya-social-gallery,
  .jaya-program-grid,
  .jaya-book-feature {
    grid-template-columns: 1fr;
  }

  .jaya-social-gallery figure:last-child {
    margin-top: 0;
  }

  .jaya-social-gallery img {
    min-height: 0;
  }

  .jaya-book-feature img {
    width: min(240px, 70%);
    margin-inline: auto;
  }
}
