/* Distinctive editorial hierarchy for Limina's core brand pages. */

body.core-cinematic {
  --core-sage: #78867a;
  --core-brass: #c8956c;
  --core-ivory: #f0eae0;
  --core-rule: rgba(200, 149, 108, 0.2);
}

body.core-cinematic main > .section {
  position: relative;
}

body.core-cinematic main > .section .section-heading > p:not(.eyebrow) {
  max-width: 62ch;
}

body.core-cinematic .answer-section .answer-card {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 62px) clamp(30px, 5vw, 68px);
  border-width: 0 0 0 1px;
  border-radius: 0;
  background: transparent;
}

body.core-cinematic .answer-section .answer-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: min(34vw, 360px);
  height: 100%;
  background: radial-gradient(circle at 100% 50%, rgba(200, 149, 108, 0.13), transparent 68%);
  content: "";
  pointer-events: none;
}

body.core-cinematic .answer-section .answer-card h2 {
  max-width: 13ch;
  font-size: clamp(2.7rem, 4.5vw, 5rem);
  font-weight: 400;
  line-height: 0.98;
}

body.core-cinematic .answer-section .answer-card > p:not(.eyebrow) {
  max-width: 62ch;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
}

/* About: a factual identity ledger rather than a stack of generic cards. */
body[data-page-type="about"] .manifesto-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--core-rule);
  border-bottom: 1px solid var(--core-rule);
  background: var(--core-rule);
}

body[data-page-type="about"] .manifesto-grid article {
  grid-column: span 4;
  min-height: 260px;
  padding: 34px 32px 38px;
  border: 0;
  border-radius: 0;
  background: var(--interior-ink);
}

body[data-page-type="about"] .manifesto-grid article:nth-child(4),
body[data-page-type="about"] .manifesto-grid article:nth-child(5) {
  grid-column: span 6;
}

body[data-page-type="about"] .manifesto-grid article::before {
  display: block;
  margin-bottom: 52px;
  color: var(--core-brass);
  font: 500 0.69rem/1 Manrope, sans-serif;
  letter-spacing: 0.2em;
  content: "0" counter(about-audience);
}

body[data-page-type="about"] .manifesto-grid {
  counter-reset: about-audience;
}

body[data-page-type="about"] .manifesto-grid article {
  counter-increment: about-audience;
}

body[data-page-type="about"] .manifesto-grid article h3 {
  max-width: 13ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.75rem, 2.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1;
}

body[data-page-type="about"] main > .section.section-narrow:nth-of-type(5),
body[data-page-type="about"] main > .section.section-narrow:nth-of-type(6) {
  width: min(1180px, calc(100% - 60px));
}

body[data-page-type="about"] main > .section.section-narrow:nth-of-type(5) .section-heading,
body[data-page-type="about"] main > .section.section-narrow:nth-of-type(6) .section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.58fr) minmax(0, 1fr);
  gap: clamp(38px, 7vw, 110px);
  max-width: none;
}

body[data-page-type="about"] main > .section.section-narrow:nth-of-type(5) h2,
body[data-page-type="about"] main > .section.section-narrow:nth-of-type(6) h2 {
  grid-row: 1 / span 3;
  font-size: clamp(3rem, 4.7vw, 5.5rem);
}

body[data-page-type="about"] .hero-signals {
  margin: 0;
  padding: 0;
  list-style: none;
}

body[data-page-type="about"] .hero-signals li {
  padding: 18px 0;
  border-top: 1px solid var(--core-rule);
}

/* Themes: four editorial lenses, each with a distinct material accent. */
body[data-page-type="themes-hub"] .journey-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--core-rule);
  background: var(--core-rule);
}

body[data-page-type="themes-hub"] .journey-card.theme-card {
  position: relative;
  min-height: 420px;
  padding: clamp(32px, 4vw, 58px);
  border: 0;
  border-radius: 0;
  background: var(--interior-panel);
}

body[data-page-type="themes-hub"] .journey-card.theme-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, var(--theme-wash, rgba(200, 149, 108, 0.12)), transparent 55%);
  content: "";
  pointer-events: none;
}

body[data-page-type="themes-hub"] .journey-card.theme-card:nth-child(1) { --theme-wash: rgba(117, 139, 112, 0.24); }
body[data-page-type="themes-hub"] .journey-card.theme-card:nth-child(2) { --theme-wash: rgba(168, 119, 79, 0.24); }
body[data-page-type="themes-hub"] .journey-card.theme-card:nth-child(3) { --theme-wash: rgba(143, 122, 107, 0.23); }
body[data-page-type="themes-hub"] .journey-card.theme-card:nth-child(4) { --theme-wash: rgba(103, 126, 139, 0.22); }

body[data-page-type="themes-hub"] .journey-card.theme-card > * {
  position: relative;
}

body[data-page-type="themes-hub"] .journey-card.theme-card h3 {
  max-width: 11ch;
  margin-top: auto;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  font-weight: 400;
  line-height: 0.95;
}

body[data-page-type="themes-hub"] .journey-card.theme-card p:not(.journey-index) {
  max-width: 46ch;
}

body[data-page-type="themes-hub"] .journey-card.theme-card .text-link {
  margin-top: auto;
  align-self: flex-start;
}

body[data-page-type="themes-hub"] main > .answer-section + .answer-section {
  padding-top: 0;
}

body[data-page-type="themes-hub"] main > .answer-section + .answer-section .answer-card {
  border-top: 1px solid var(--core-rule);
  border-left: 0;
}

body[data-page-type="themes-hub"] .ai-entry-panel,
body[data-page-type="how-it-works"] .ai-entry-panel,
body[data-page-type="why-limina"] .ai-entry-panel {
  grid-template-columns: minmax(240px, 0.52fr) minmax(0, 1fr);
  align-items: start;
  border-radius: 0;
  background: transparent;
}

body[data-page-type="themes-hub"] .ai-entry-grid,
body[data-page-type="how-it-works"] .ai-entry-grid,
body[data-page-type="why-limina"] .ai-entry-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--core-rule);
}

body[data-page-type="themes-hub"] .ai-entry-card,
body[data-page-type="how-it-works"] .ai-entry-card,
body[data-page-type="why-limina"] .ai-entry-card {
  border: 0;
  border-radius: 0;
  background: var(--interior-panel);
}

/* How it works: one continuous route, not eight disconnected cards. */
body[data-page-type="how-it-works"] .timeline-grid {
  position: relative;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 960px;
  margin: 0 auto;
  padding-left: clamp(92px, 12vw, 170px);
}

body[data-page-type="how-it-works"] .timeline-grid::before {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: clamp(35px, 5vw, 66px);
  width: 1px;
  background: linear-gradient(var(--core-brass), rgba(200, 149, 108, 0.12));
  content: "";
}

body[data-page-type="how-it-works"] .timeline-card,
body[data-page-type="how-it-works"] .timeline-card-wide {
  position: relative;
  grid-column: auto;
  min-height: 0;
  padding: 34px 0 42px;
  border: 0;
  border-bottom: 1px solid var(--core-rule);
  border-radius: 0;
  background: transparent;
}

body[data-page-type="how-it-works"] .timeline-card::before {
  position: absolute;
  top: 41px;
  left: calc(clamp(92px, 12vw, 170px) * -1 + clamp(35px, 5vw, 66px) - 5px);
  width: 11px;
  height: 11px;
  border: 1px solid var(--core-brass);
  border-radius: 50%;
  background: var(--interior-ink);
  content: "";
}

body[data-page-type="how-it-works"] .timeline-card h3 {
  max-width: 18ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.1rem, 3.4vw, 3.7rem);
  font-weight: 400;
  line-height: 1;
}

body[data-page-type="how-it-works"] .timeline-card > p:not(.supporting-line) {
  max-width: 66ch;
}

body[data-page-type="how-it-works"] .supporting-line {
  max-width: 54ch;
  color: var(--core-ivory) !important;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 400;
}

body[data-page-type="how-it-works"] .design-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--core-rule);
}

body[data-page-type="how-it-works"] .design-grid article {
  min-height: 220px;
  border: 0;
  border-right: 1px solid var(--core-rule);
  border-bottom: 1px solid var(--core-rule);
  border-radius: 0;
  background: transparent;
}

/* Why Limina: make the threshold chapter the narrative turn. */
body[data-page-type="why-limina"] .manifesto {
  width: 100%;
  max-width: none;
  padding-right: max(30px, calc((100vw - 1180px) / 2));
  padding-left: max(30px, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 78% 16%, rgba(200, 149, 108, 0.16), transparent 36%),
    #0b0908;
}

body[data-page-type="why-limina"] .manifesto-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  counter-reset: why-point;
}

body[data-page-type="why-limina"] .manifesto-grid article {
  position: relative;
  min-height: 300px;
  padding: 44px 42px;
  border: 0;
  border-top: 1px solid var(--core-rule);
  border-right: 1px solid var(--core-rule);
  border-radius: 0;
  background: transparent;
  counter-increment: why-point;
}

body[data-page-type="why-limina"] .manifesto-grid article::before {
  display: block;
  margin-bottom: 72px;
  color: var(--core-brass);
  font: 500 0.72rem/1 Manrope, sans-serif;
  letter-spacing: 0.2em;
  content: "0" counter(why-point);
}

body[data-page-type="why-limina"] .manifesto-grid article h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
}

body[data-page-type="why-limina"] .how-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--core-rule);
}

body[data-page-type="why-limina"] .how-card {
  min-height: 280px;
  border: 0;
  border-radius: 0;
  background: var(--interior-panel);
}

body[data-page-type="why-limina"] .image-break {
  width: 100%;
  max-width: none;
  padding-right: max(30px, calc((100vw - 1180px) / 2));
  padding-left: max(30px, calc((100vw - 1180px) / 2));
  background: #16110d;
}

body[data-page-type="why-limina"] .dual-essay {
  overflow: hidden;
  border: 1px solid var(--core-rule);
}

body[data-page-type="why-limina"] .dual-essay img,
body[data-page-type="why-limina"] .essay-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page-type="why-limina"] .who-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--core-rule);
}

body[data-page-type="why-limina"] .who-grid article {
  min-height: 270px;
  border: 0;
  border-radius: 0;
  background: var(--interior-panel);
}

/* Founder note: a quiet letter with a strong reading rhythm. */
body[data-page-type="founder-note"] .geo-page > .section-narrow {
  width: min(1080px, calc(100% - 60px));
}

body[data-page-type="founder-note"] .article-body {
  position: relative;
  max-width: 760px;
  margin-left: clamp(0px, 12vw, 170px);
  padding: clamp(24px, 4vw, 52px) 0 clamp(30px, 5vw, 70px) clamp(28px, 5vw, 74px);
  border-left: 1px solid var(--core-rule);
}

body[data-page-type="founder-note"] .article-body::before {
  position: absolute;
  top: 58px;
  right: calc(100% + 38px);
  width: 110px;
  color: var(--core-brass);
  font: 600 0.66rem/1.6 Manrope, sans-serif;
  letter-spacing: 0.16em;
  text-align: right;
  text-transform: uppercase;
  content: "A note on thresholds, attention, and care";
}

body[data-page-type="founder-note"] .article-body > p:first-child {
  color: var(--core-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 2.3vw, 2.25rem);
  line-height: 1.45;
}

body[data-page-type="founder-note"] .article-body h2 {
  max-width: 12ch;
  margin-top: clamp(58px, 8vw, 90px);
  font-size: clamp(2.6rem, 4.2vw, 4.6rem);
  font-weight: 400;
  line-height: 0.98;
}

body[data-page-type="founder-note"] .article-body p {
  font-size: 1.06rem;
  line-height: 1.95;
}

body[data-page-type="founder-note"] .founder-signature {
  margin-top: 62px;
  color: var(--core-ivory);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  font-style: italic;
}

body[data-page-type="founder-note"] .founder-signature span {
  display: block;
  margin-bottom: 8px;
  color: var(--core-brass);
  font: 600 0.68rem/1 Manrope, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  body[data-page-type="about"] .manifesto-grid article,
  body[data-page-type="about"] .manifesto-grid article:nth-child(4),
  body[data-page-type="about"] .manifesto-grid article:nth-child(5) {
    grid-column: span 6;
  }

  body[data-page-type="themes-hub"] .ai-entry-panel,
  body[data-page-type="how-it-works"] .ai-entry-panel,
  body[data-page-type="why-limina"] .ai-entry-panel {
    grid-template-columns: 1fr;
  }

  body[data-page-type="why-limina"] .who-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.core-cinematic .answer-section .answer-card {
    padding: 28px 22px 34px;
  }

  body.core-cinematic .answer-section .answer-card h2 {
    font-size: clamp(2.25rem, 12vw, 3.35rem);
  }

  body[data-page-type="about"] .manifesto-grid,
  body[data-page-type="themes-hub"] .journey-grid,
  body[data-page-type="why-limina"] .manifesto-grid,
  body[data-page-type="why-limina"] .how-grid,
  body[data-page-type="why-limina"] .who-grid {
    grid-template-columns: 1fr;
  }

  body[data-page-type="about"] .manifesto-grid article,
  body[data-page-type="about"] .manifesto-grid article:nth-child(4),
  body[data-page-type="about"] .manifesto-grid article:nth-child(5) {
    grid-column: auto;
    min-height: 0;
  }

  body[data-page-type="about"] main > .section.section-narrow:nth-of-type(5),
  body[data-page-type="about"] main > .section.section-narrow:nth-of-type(6) {
    width: min(100% - 36px, 1180px);
  }

  body[data-page-type="about"] main > .section.section-narrow:nth-of-type(5) .section-heading,
  body[data-page-type="about"] main > .section.section-narrow:nth-of-type(6) .section-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body[data-page-type="about"] main > .section.section-narrow:nth-of-type(5) h2,
  body[data-page-type="about"] main > .section.section-narrow:nth-of-type(6) h2 {
    grid-row: auto;
  }

  body[data-page-type="themes-hub"] .journey-card.theme-card {
    min-height: 350px;
  }

  body[data-page-type="themes-hub"] .ai-entry-grid,
  body[data-page-type="how-it-works"] .ai-entry-grid,
  body[data-page-type="why-limina"] .ai-entry-grid,
  body[data-page-type="how-it-works"] .design-grid {
    grid-template-columns: 1fr;
  }

  body[data-page-type="how-it-works"] .timeline-grid {
    padding-left: 44px;
  }

  body[data-page-type="how-it-works"] .timeline-grid::before {
    left: 6px;
  }

  body[data-page-type="how-it-works"] .timeline-card::before {
    left: -43px;
  }

  body[data-page-type="why-limina"] .manifesto,
  body[data-page-type="why-limina"] .image-break {
    padding-right: 18px;
    padding-left: 18px;
  }

  body[data-page-type="why-limina"] .manifesto-grid article,
  body[data-page-type="why-limina"] .how-card,
  body[data-page-type="why-limina"] .who-grid article {
    min-height: 0;
  }

  body[data-page-type="founder-note"] .geo-page > .section-narrow {
    width: min(100% - 36px, 1080px);
  }

  body[data-page-type="founder-note"] .article-body {
    margin-left: 0;
    padding-left: 22px;
  }

  body[data-page-type="founder-note"] .article-body::before {
    position: static;
    display: block;
    width: auto;
    margin-bottom: 28px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.core-cinematic .manifesto-grid article,
  body.core-cinematic .journey-card,
  body.core-cinematic .timeline-card,
  body.core-cinematic .how-card {
    animation: core-rise 700ms cubic-bezier(.16, 1, .3, 1) both;
  }

  body.core-cinematic .manifesto-grid article:nth-child(2),
  body.core-cinematic .journey-card:nth-child(2),
  body.core-cinematic .timeline-card:nth-child(2),
  body.core-cinematic .how-card:nth-child(2) { animation-delay: 70ms; }

  body.core-cinematic .manifesto-grid article:nth-child(3),
  body.core-cinematic .journey-card:nth-child(3),
  body.core-cinematic .timeline-card:nth-child(3),
  body.core-cinematic .how-card:nth-child(3) { animation-delay: 140ms; }
}

@keyframes core-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
