/* secondary.css — reusable content-page format (Journey, Writing, Interests,
   Contact, essays). Authored by Codex; asset paths wired to the live build.
   Data-driven by an inline `window.PAGE` object + js/secondary.js. */

:root {
  --ink: #061018;
  --ink-2: #0a1219;
  --graphite: #121a21;
  --graphite-soft: #18232b;
  --paper: #e8d2ae;        /* matched to the homepage map cream (sampled #e8d2ae) */
  --paper-light: #f0e0c4;  /* lit cream highlight, same hue family */
  --paper-shadow: #b08c56;
  --paper-text: #17120b;
  --gold: #d2a761;
  --gold-soft: #e4bf78;
  --cream: #f2dfb4;
  --muted: #c9ad76;
  --line: rgba(210, 167, 97, 0.42);
  --radius: 6px;
  --max: 1180px;
  /* elegant serif used on the homepage canvas (GA monogram + display headings) */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
}

a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12rem, rgba(52, 75, 68, 0.32), transparent 36rem),
    linear-gradient(180deg, #061018 0%, #05080c 100%);
}

/* ---- Header: real text (Cormorant Garamond) matched to the baked homepage-canvas
   header, with logo.png + compass_star.png as the only art. Brand + nav are
   uppercase; the tagline is sentence-case gold. (To be back-ported to the main page.) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: clamp(64px, 5.622vw, 94px);
  background: #061018;
  border-bottom: 1px solid rgba(210, 167, 97, 0.18);
}
/* content constrained to the chamber/mountain width (1672) and centered, so the
   logo + tagline align with the mountain-transition edges on wide screens. */
.site-header__inner {
  max-width: 1672px;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.8rem, 2.2vw, 2.2rem);
  padding: 0 clamp(0.9rem, 2vw, 2.1rem);
}

/* brand (left): logo + divider + two uppercase lines */
.brand { display: inline-flex; align-items: center; gap: clamp(0.55rem, 1.3vw, 1.05rem); text-decoration: none; justify-self: start; }
.brand__logo { height: clamp(42px, 4.7vw, 72px); width: auto; display: block; }
.brand__divider { align-self: stretch; width: 1px; margin: clamp(0.45rem, 1vw, 0.95rem) 0; background: rgba(210, 167, 97, 0.45); }
.brand__lines { display: grid; gap: 0.22em; }
.brand__l1, .brand__l2 {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ddd2bb;
  font-size: clamp(0.6rem, 0.9vw, 0.86rem);
  line-height: 1.12;
  white-space: nowrap;
}

/* nav (center) */
.site-nav { display: flex; align-items: center; gap: clamp(1.2rem, 3.65vw, 3.85rem); justify-self: center; }
.site-nav a {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e4dfd3;
  font-size: clamp(0.78rem, 0.97vw, 1rem);
  text-decoration: none;
  line-height: 1;
  padding-bottom: 0.95em;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--gold-soft); }
.site-nav a[aria-current="page"] { color: #f1e8d2; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: #e0b878;
}

/* tagline (right): compass star + divider + two-line gold sentence-case */
.site-tagline { display: inline-flex; align-items: center; gap: clamp(0.5rem, 1.1vw, 0.95rem); justify-self: end; }
.site-tagline__star { height: clamp(34px, 3.7vw, 54px); width: auto; display: block; }
.site-tagline__divider { align-self: stretch; width: 1px; margin: clamp(0.4rem, 0.9vw, 0.8rem) 0; background: rgba(210, 167, 97, 0.4); }
.site-tagline__text {
  font-family: var(--font-display);
  font-weight: 500;
  color: #d7b677;
  font-size: clamp(0.7rem, 1vw, 1rem);
  line-height: 1.32;
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .site-header__inner { grid-template-columns: auto 1fr; }
  .site-tagline { display: none; }
  .site-nav { justify-self: end; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 600px) {
  .brand__lines, .brand__divider { display: none; }
}

.page-hero {
  position: relative;
  min-height: clamp(300px, 36vw, 440px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Uniform parchment wash across the whole image (no left-to-right gradient):
     the map shows everywhere but stays muted so the heading/body text stays clean.
     Original left-heavy fade kept for reference:
     linear-gradient(90deg, rgba(232, 210, 174, 0.94) 0%, rgba(232, 210, 174, 0.86) 50%, rgba(232, 210, 174, 0.45) 72%, rgba(232, 210, 174, 0.12) 90%), */
  background:
    linear-gradient(rgba(232, 210, 174, 0.55), rgba(232, 210, 174, 0.55)),
    url("../assets/art/page-hero.png") center 49% / cover no-repeat;
}
.page-hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 16, 24, 0.18), transparent 38%, rgba(6, 16, 24, 0.42)),
    radial-gradient(circle at 18% 55%, rgba(240, 224, 196, 0.5), transparent 17rem);
}
.page-hero__content {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  color: var(--paper-text);
  /* Soft cream bloom behind the heading/body so dark text stays legible where the
     map background goes dark. Subtle, in the same parchment cream as the wash:
     invisible over light areas, a gentle halo over dark ones. (Inherited by the
     eyebrow, h1, and subtitle.) */
  text-shadow:
    0 0 6px rgba(240, 226, 198, 0.7),
    0 0 14px rgba(240, 226, 198, 0.42),
    0 0 26px rgba(240, 226, 198, 0.26);
}
.eyebrow {
  margin: 0 0 0.65rem;
  color: #4c3318;
  font-size: 0.78rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.page-hero h1 {
  max-width: none;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.9vw, 3.95rem);
  font-weight: 600;
  line-height: 1.0;
}
.page-hero__content > p:last-child {
  max-width: 54rem;
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(28, 22, 12, 0.35);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.4;
}

.content-region {
  position: relative;
  z-index: 2;                         /* above the pillar walls */
  display: grid;
  grid-template-columns: minmax(190px, 295px) minmax(0, 1fr);
  gap: clamp(1.2rem, 3.2vw, 2.9rem);
  /* widened to halve the navy gutter to the pillars: rail shifts left into the
     left gap, the body column (1fr) absorbs the growth on the right */
  width: min(1432px, 85.5%);
  margin: 0 auto;
  padding: clamp(3rem, 6%, 6.5rem) 0 clamp(2.5rem, 5%, 5rem);
}

.content-rail {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 1rem;
  color: var(--muted);
  border: 1px solid rgba(210, 167, 97, 0.25);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(8, 18, 27, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 228, 166, 0.04);
}
.rail-label {
  margin: 0 0 0.85rem;
  color: var(--gold-soft);
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.content-rail nav { display: grid; gap: 0.6rem; }
.content-rail a { display: flex; align-items: center; gap: 0.55rem; color: var(--cream); text-decoration: none; font-size: 0.9rem; line-height: 1.25; }
.content-rail a:hover { color: var(--gold-soft); }
.rail-marker { flex: 0 0 auto; width: 22px; height: 22px; }

.content-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(210, 167, 97, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(240, 224, 196, 0.97), rgba(230, 207, 170, 0.97)),
    var(--paper);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 241, 199, 0.45);
  color: var(--paper-text);
}
/* Frontier-journal stencil watermark over the cream (opacity-controlled, text stays above) */
.content-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/art/stencil-frontier-journal-stacked.png") top center / 100% auto repeat-y;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
.content-panel__inner {
  position: relative;
  z-index: 1;
  min-height: 48rem;
  padding: clamp(1.2rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.26), transparent 18rem);
}

.content-section { scroll-margin-top: 120px; }   /* clear sticky header on #hash jumps */
.content-section + .content-section {
  margin-top: clamp(2rem, 4vw, 3.4rem);
  padding-top: clamp(1.4rem, 3vw, 2.2rem);
  border-top: 1px solid rgba(57, 38, 18, 0.22);
}
.content-section h2 {
  margin: 0;
  color: #2b2113;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  font-weight: 600;
  line-height: 1.08;
}
.content-section__kicker {
  margin: 0 0 0.45rem;
  color: #6a471d;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Waypoint medallions (reused homepage journey icons) — section header + note-cards.
   The marker pairs with the h2 in a centered row, so it sits on the title line;
   the kicker above is indented by the same marker+gap so it aligns with the title. */
.content-section__head {
  --marker: clamp(38px, 4.2vw, 50px);
  --marker-gap: clamp(0.7rem, 1.6vw, 1.05rem);
}
.content-section__head .content-section__kicker {
  padding-left: calc(var(--marker) + var(--marker-gap));
}
.content-section__titlerow {
  display: flex;
  align-items: center;
  gap: var(--marker-gap);
}
.section-marker {
  flex: 0 0 auto;
  width: var(--marker);
  aspect-ratio: 1;                     /* reserve space so images don't shift #hash landings */
  height: auto;
  filter: drop-shadow(0 2px 5px rgba(20, 12, 4, 0.3));
}
.note-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.15rem;
}
.note-card__icon { flex: 0 0 auto; width: 38px; height: 38px; }
.content-section p, .content-section li {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.68;
}
/* fill the widened panel (cap raised so text uses the space to the right) */
.content-section p { max-width: 90ch; }

/* subtle cream bloom so the dark body text lifts off the watermark texture —
   a soft light halo around the glyphs; leaves the background itself unchanged. */
.content-section h2,
.content-section__kicker,
.content-section > p,
.content-section > ul > li {
  text-shadow:
    0 0 3px rgba(245, 232, 206, 1),
    0 0 7px rgba(245, 232, 206, 0.9),
    0 0 14px rgba(245, 232, 206, 0.65);
}
.content-section ul {
  display: grid;
  gap: 0.65rem;
  max-width: 86ch;
  padding-left: 1.25rem;
}

.note-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}
.note-card {
  flex: 1 1 22rem;       /* grow to fill; a lone card stretches up to the cap */
  max-width: 66%;        /* single card uses up to 66% of the row when there's space */
  padding: 1rem;
  color: var(--cream);
  border: 1px solid rgba(210, 167, 97, 0.36);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(210, 167, 97, 0.08), transparent 35%),
    rgba(8, 18, 27, 0.92);
}
.note-card h3 { margin: 0; font-weight: 400; }
.note-card p { margin: 0.55rem 0 0; color: #dccba5; font-size: 0.95rem; line-height: 1.45; }

/* ============ Field-journal chamber (flexible layered lower half) ============
   Carved homepage pieces on the 1672px canvas grid, sized as % of the chamber
   width so they scale as one unit: mountain_transition (top, overlaps the hero)
   → repeating pillar walls (sides) → footer_band (bottom). The interior is the
   dark "card blue" cave; the parchment panel reads as the open journal page. */
.chamber {
  --wall: 5.682%;                 /* 95 / 1672 */
  position: relative;
  max-width: 1672px;
  margin: 0 auto;
  background: linear-gradient(180deg, #0c1724 0%, #0a121d 55%, #070e17 100%);
  isolation: isolate;
}
.chamber__mountains {
  position: absolute;
  left: 0; right: 0; top: 0;
  aspect-ratio: 1672 / 123;
  transform: translateY(-55%);    /* rise up into the hero above */
  background: url("../assets/art/mountain_transition.png") top center / 100% 100% no-repeat;
  z-index: 3;
  pointer-events: none;
}
.chamber__frame { position: relative; }
.chamber__wall {
  position: absolute;
  top: 0; bottom: 0;
  width: var(--wall);
  z-index: 1;
  pointer-events: none;
}
.chamber__wall--left {
  left: 0;
  background:
    url("../assets/art/top_pillar_left.png") top left / 100% auto no-repeat,
    url("../assets/art/bottom_content_left.png") top left / 100% auto repeat-y;
}
.chamber__wall--right {
  right: 0;
  background:
    url("../assets/art/top_pillar_right.png") top right / 100% auto no-repeat,
    url("../assets/art/bottom_content_right.png") top right / 100% auto repeat-y;
}

.deco-footer {
  position: relative;
  z-index: 4;
  aspect-ratio: 1670 / 128;
  margin-top: -1px;
  background: url("../assets/art/footer_band.png") bottom center / 100% 100% no-repeat;
}
/* live principle words overlaid on the band, flanking the baked GA ornament */
.deco-footer__words {
  position: absolute;
  top: 47%;
  transform: translateY(-50%);
  display: flex;
  gap: clamp(0.5rem, 1.4vw, 1.6rem);
  color: var(--gold-soft);
  font-size: clamp(0.5rem, 0.92vw, 0.88rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.deco-footer__words--left  { right: 57%; justify-content: flex-end; }
.deco-footer__words--right { left: 57%; }
.deco-footer__words a { text-decoration: none; }

@media (max-width: 980px) {
  /* thin walls + tiny footer detail don't read on narrow screens: simplify */
  .chamber__mountains { transform: translateY(-45%); }
  .chamber__wall { display: none; }
  .content-region { width: min(var(--max), calc(100% - 2.5rem)); }
}
@media (max-width: 860px) {
  .content-region { grid-template-columns: 1fr; }
  .content-rail { position: static; }
  .content-rail nav { display: flex; flex-wrap: wrap; }
  .content-rail a { padding: 0.45rem 0.65rem; border: 1px solid rgba(210, 167, 97, 0.28); border-radius: var(--radius); }
  .note-card { max-width: none; }   /* full width when stacked on narrow screens */
  .deco-footer__words { font-size: 0.5rem; gap: 0.4rem; letter-spacing: 0.08em; }
}
