/* ==========================================================================
   Parklane — Approach page
   Builds on tokens/base/components. Rhythm: dark hero → dark → ivory → stone
   → dark (photographic) → ivory → dark → dark finish. Tonal changes are
   softened with eased seams (.ap-seam) rather than hard section cuts.
   ========================================================================== */

.page-approach {
  --ap-ink: var(--c-ink);
  --ap-dark: var(--c-vault);          /* #08120D */
  --ap-dark-2: #0b100d;               /* a breath lighter, for alternation */
  --ap-stone: #ebe5d8;
  --ap-hair-dark: rgba(242, 239, 229, 0.12);
  --ap-hair-light: rgba(23, 24, 22, 0.12);
  --ap-muted-dark: #a8a397;
  background: var(--c-obsidian);
}

/* Shared --------------------------------------------------------------------- */

.ap-section {
  position: relative;
  padding-block: var(--section-y);
}

.ap-dark  { background: var(--ap-dark); color: var(--c-ivory); }
.ap-ivory { background: var(--c-ivory); color: var(--ap-ink); }
.ap-stone { background: var(--ap-stone); color: var(--ap-ink); }

.ap-ivory .eyebrow,
.ap-stone .eyebrow {
  color: var(--c-bronze);
}

.ap-heading {
  margin-top: var(--s-6);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

.ap-heading em {
  font-style: italic;
  color: var(--c-limestone);
}

.ap-ivory .ap-heading em,
.ap-stone .ap-heading em {
  color: #6e665a;
}

.ap-heading--xl {
  font-size: clamp(2.5rem, 1.3rem + 3.8vw, 5rem);
  line-height: 1.02;
  max-width: 16ch;
}

.ap-body {
  margin-top: var(--s-5);
  max-width: 32rem;
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--ap-muted-dark);
}

.ap-ivory .ap-body,
.ap-stone .ap-body {
  color: var(--c-ink-muted);
}

.ap-body--strong {
  color: var(--c-ivory);
}

.ap-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(3rem, 1rem + 6vw, 8rem);
  align-items: center;
}

.ap-split--reverse .ap-split__text { order: 2; }
.ap-split--reverse .ap-etched      { order: 1; }

/* Tone changes ---------------------------------------------------------------
   Dark → dark hands off with an eased fade (see .ap-hero::after), as on the
   homepage. Light ↔ dark meets on a crisp edge marked by a brass hairline:
   a gradient between ivory and green-black passes through a muddy grey. */

.ap-dark + .ap-ivory::before,
.ap-ivory + .ap-dark::before,
.ap-stone + .ap-dark::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(169, 138, 82, 0.45) 30%, rgba(169, 138, 82, 0.45) 70%, transparent 100%);
}

/* 1. HERO ==================================================================== */

.ap-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(100svh, 62rem);
  padding-block: calc(var(--header-h) + var(--s-8)) var(--s-9);
  background:
    radial-gradient(60% 70% at 72% 45%, rgba(200, 193, 179, 0.07), rgba(200, 193, 179, 0) 70%),
    var(--c-obsidian);
  color: var(--c-ivory);
  overflow: hidden;
}

/* Hand-off into the green-black of the next section (as on the homepage) */
.ap-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(8, 18, 13, 0) 0%, rgba(8, 18, 13, 0.09) 20%, rgba(8, 18, 13, 0.3) 40%,
    rgba(8, 18, 13, 0.59) 60%, rgba(8, 18, 13, 0.85) 80%, var(--ap-dark) 100%);
}

.ap-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(3rem, 1rem + 5vw, 7rem);
  align-items: center;
  width: 100%;
}

.ap-hero__title {
  margin-top: var(--s-6);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
}

.ap-hero__title span,
.ap-hero__title em {
  display: block;
}

.ap-hero__title em {
  margin-top: 0.12em;
  font-size: 0.62em;
  font-style: italic;
  color: var(--c-limestone);
}

.ap-hero__lead {
  margin-top: var(--s-7);
  max-width: 30rem;
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--c-ivory);
}

.ap-hero__sub {
  margin-top: var(--s-4);
  max-width: 28rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ap-muted-dark);
}

/* The visual: a large limestone slab with two plans suspended in smoked glass */
.ap-hero__visual {
  margin: 0;
}

.ap-slab {
  position: relative;
  aspect-ratio: 5 / 6;
  max-height: 44rem;
  margin-left: auto;
  background:
    radial-gradient(110% 80% at 20% 10%, rgba(255, 252, 244, 0.5) 0%, rgba(255, 252, 244, 0) 60%),
    linear-gradient(90deg, transparent 58%, rgba(120, 106, 84, 0.22) 58%, rgba(120, 106, 84, 0.22) calc(58% + 1px), transparent calc(58% + 1px)),
    linear-gradient(180deg, transparent 64%, rgba(120, 106, 84, 0.2) 64%, rgba(120, 106, 84, 0.2) calc(64% + 1px), transparent calc(64% + 1px)),
    linear-gradient(180deg, #ddd5c5 0%, #cbc2af 100%);
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.8);
}

.ap-slab::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .22 0 0 0 .26 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 160px,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.01 .026' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .32 0 0 0 0 .25 0 0 0 .7 -.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E") 0 0 / 520px 520px;
  pointer-events: none;
}

.ap-glass {
  --depth: 18px;
  position: absolute;
  background:
    linear-gradient(128deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, rgba(244, 241, 233, 0.12) 0%, rgba(188, 186, 172, 0.1) 100%),
    rgba(92, 98, 88, 0.045);
  -webkit-backdrop-filter: blur(1.8px) saturate(0.9);
  backdrop-filter: blur(1.8px) saturate(0.9);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.9),
    inset -1px -1px 0 rgba(96, 104, 92, 0.35),
    2px 3px 0 rgba(150, 158, 140, 0.34),
    3px 4px 0 rgba(110, 104, 88, 0.12),
    calc(var(--depth) * 1.2) calc(var(--depth) * 1.8) calc(var(--depth) * 3) calc(var(--depth) * -0.6) rgba(64, 52, 36, 0.24),
    3px 5px 12px rgba(64, 52, 36, 0.07);
}

.ap-glass svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(calc(var(--depth) * 0.45) calc(var(--depth) * 0.65) 2px rgba(70, 58, 40, 0.13));
}

.ap-glass--rear {
  --depth: 10px;
  inset: 6% 34% 40% 8%;
  opacity: 0.85;
}

.ap-glass--front {
  --depth: 24px;
  inset: 16% 7% 7% 26%;
}

/* 2. WHOLE POSITION ========================================================== */

.ap-etched {
  position: relative;
  margin: 0;
  padding: clamp(1rem, 0.5rem + 1.5vw, 2rem);
  /* dark glass: faint top-left light and a lit edge */
  background:
    linear-gradient(135deg, rgba(242, 239, 229, 0.05) 0%, rgba(242, 239, 229, 0) 40%),
    rgba(242, 239, 229, 0.015);
  box-shadow:
    inset 1px 1px 0 rgba(242, 239, 229, 0.12),
    inset -1px -1px 0 rgba(0, 0, 0, 0.4),
    0 40px 80px -40px rgba(0, 0, 0, 0.7);
}

.ap-etched svg {
  display: block;
  width: 100%;
  height: auto;
}

.ap-etched--quiet {
  background: none;
  box-shadow: none;
  padding: 0;
}

/* 3. METHOD ================================================================== */

.ap-method__head {
  max-width: 44rem;
}

.ap-chapters {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  border-top: 1px solid rgba(169, 138, 82, 0.5);
}

.ap-chapter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 4fr) minmax(0, 5fr);
  gap: var(--s-6);
  align-items: start;
  padding-block: clamp(2.5rem, 1.5rem + 2.5vw, 4.5rem);
  border-bottom: 1px solid var(--ap-hair-light);
}

/* drafting tick where each chapter meets the rule */
.ap-chapter::before {
  content: "";
  position: absolute;
  left: 0;
  top: -6px;
  width: 1px;
  height: 11px;
  background: var(--c-brass);
}

.ap-chapter__num {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 2.5rem + 4vw, 7.5rem);
  font-weight: 400;
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: rgba(23, 24, 22, 0.16);
}

.ap-chapter__mark {
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--c-bronze);
}

.ap-chapter__title {
  margin-top: var(--s-3);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 1.4rem + 1.6vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
}

.ap-chapter__sub {
  margin-top: var(--s-2);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  color: #6e665a;
}

.ap-chapter__text {
  padding-top: 1.9rem;
  max-width: 30rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-ink-muted);
}

/* 4. DEFINED PURPOSE ========================================================= */

.ap-taxonomy {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
}

.ap-taxonomy__terms {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--ap-hair-light);
  border-bottom: 1px solid var(--ap-hair-light);
}

.ap-taxonomy__terms li + li {
  border-left: 1px solid var(--ap-hair-light);
}

.ap-term {
  position: relative;
  width: 100%;
  padding: var(--s-6) var(--s-4);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(23, 24, 22, 0.55);
  transition: color var(--dur) var(--ease);
}

.ap-term::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--c-brass);
  transition: width var(--dur) var(--ease), left var(--dur) var(--ease);
}

.ap-term:hover,
.ap-term:focus-visible,
.ap-term[aria-pressed="true"] {
  color: var(--ap-ink);
}

.ap-term[aria-pressed="true"]::after {
  left: 20%;
  width: 60%;
}

.ap-term:focus-visible {
  outline-offset: -6px;
}

.ap-taxonomy__detail {
  min-height: 3.6em;
  margin-top: var(--s-6);
  max-width: 40rem;
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 2rem);
  font-style: italic;
  line-height: 1.35;
  color: #4a4740;
}

.ap-taxonomy__detail.is-changing {
  animation: ap-detail 700ms var(--ease) both;
}

@keyframes ap-detail {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* 5. DECISIONS IN CONTEXT ==================================================== */

.ap-context {
  background: var(--ap-dark-2);
}

.ap-context__layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(3rem, 1rem + 6vw, 8rem);
  align-items: center;
}

.ap-context__media {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1a1b17;
}

.ap-context__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.92);
}

.ap-context__lines {
  margin-top: var(--s-7);
  border-top: 1px solid var(--ap-hair-dark);
}

.ap-context__lines li {
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--ap-hair-dark);
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  line-height: 1.3;
  color: var(--c-ivory);
}

.ap-context__lines li:last-child {
  color: var(--c-limestone);
  font-style: italic;
}

.ap-context__close {
  margin-top: var(--s-7);
  max-width: 28rem;
  padding-left: var(--s-5);
  border-left: 1px solid var(--c-brass);
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--ap-muted-dark);
}

/* 6. LONG-TERM PERSPECTIVE =================================================== */

.ap-longterm__head .ap-body {
  max-width: 36rem;
}

.ap-triad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 5rem);
  margin-top: clamp(3.5rem, 2rem + 4vw, 6rem);
}

.ap-triad li {
  padding-top: var(--s-5);
  border-top: 1px solid rgba(169, 138, 82, 0.55);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2.125rem);
  line-height: 1.2;
  color: #4a4740;
}

.ap-triad__verb {
  display: block;
  color: var(--ap-ink);
  font-weight: 500;
}

/* 7. COORDINATION ============================================================ */

.ap-coordination .ap-etched svg {
  max-width: 34rem;
  margin-inline: auto;
}

/* 8. PRIVATE ACCESS ========================================================== */

.ap-access {
  background:
    radial-gradient(50% 60% at 50% 40%, rgba(6, 74, 18, 0.12), rgba(6, 74, 18, 0) 70%),
    var(--ap-dark);
  color: var(--c-ivory);
  text-align: center;
  padding-block: clamp(7rem, 5rem + 6vw, 12rem);
}

/* seamless join from the coordination section above */
.ap-access::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(169, 138, 82, 0.35), transparent);
}

.ap-access__inner {
  display: grid;
  justify-items: center;
  gap: var(--s-5);
}

.ap-access__rule {
  width: 1px;
  height: 4rem;
  margin-bottom: var(--s-3);
  background: rgba(169, 138, 82, 0.55);
}

.ap-access__title {
  max-width: 22ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem);
  line-height: 1.08;
  text-wrap: balance;
}

.ap-access__title em {
  font-style: italic;
  color: var(--c-limestone);
}

.ap-access__copy {
  max-width: 30rem;
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--ap-muted-dark);
}

.ap-access .access__link {
  width: 100%;
  margin-top: var(--s-5);
}

/* Responsive ================================================================= */

@media (max-width: 1024px) {
  .ap-hero__layout,
  .ap-split,
  .ap-context__layout {
    grid-template-columns: 1fr;
  }

  .ap-split--reverse .ap-split__text { order: 1; }
  .ap-split--reverse .ap-etched      { order: 2; }

  .ap-slab {
    max-width: 34rem;
    margin-inline: auto;
  }

  .ap-context__media {
    aspect-ratio: 16 / 10;
  }

  .ap-context__media img {
    object-position: 62% 60%;
  }

  .ap-chapter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  }

  .ap-chapter__text {
    grid-column: 2;
    padding-top: 0;
  }

  .ap-taxonomy__terms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ap-taxonomy__terms li:nth-child(4) {
    border-left: 0;
  }

  .ap-taxonomy__terms li:nth-child(n + 4) {
    border-top: 1px solid var(--ap-hair-light);
  }
}

@media (max-width: 640px) {
  .ap-hero {
    min-height: 0;
    padding-bottom: var(--s-8);
  }

  .ap-slab {
    aspect-ratio: 4 / 5;
  }

  .ap-chapter {
    grid-template-columns: 1fr;
    gap: var(--s-3);
  }

  .ap-chapter__num {
    font-size: 3.5rem;
  }

  .ap-chapter__text {
    grid-column: 1;
  }

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

  .ap-taxonomy__terms li:nth-child(4) {
    border-left: 1px solid var(--ap-hair-light);
  }

  .ap-taxonomy__terms li:nth-child(odd) {
    border-left: 0;
  }

  .ap-taxonomy__terms li:nth-child(n + 3) {
    border-top: 1px solid var(--ap-hair-light);
  }

  .ap-term {
    padding: var(--s-5) var(--s-2);
  }

  .ap-context__media {
    aspect-ratio: 4 / 5;
  }

  .ap-triad {
    grid-template-columns: 1fr;
  }
  /* Diagram labels scale with the drawing; lift them so they stay legible */
  .ap-position .ap-etched svg text {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .ap-coordination .ap-etched svg text {
    font-size: 14px;
    letter-spacing: 0.08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-taxonomy__detail.is-changing {
    animation: none;
  }
}
