/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .72rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: var(--step-0); cursor: pointer; line-height: 1;
  transition: transform .12s ease, background .15s ease, color .15s, border-color .15s;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #a8360a; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-crisis { background: #fff; color: var(--brand); border-color: var(--brand); font-weight: 700; }
.btn-crisis:hover { background: var(--brand); color: #fff; }

/* --- Hero: photo banner --------------------------------------------------- */
.hero-photo { position: relative; overflow: hidden; display: flex; align-items: center;
  min-height: clamp(460px, 72vh, 720px); background: #160d06; }
.hero-photo-bg { position: absolute; inset: 0;
  background: url(/assets/img/hero.jpg) 62% center / cover no-repeat; }
.hero-photo::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(18,10,4,.93) 0%, rgba(18,10,4,.78) 42%, rgba(18,10,4,.40) 66%, rgba(18,10,4,.12) 88%),
    linear-gradient(0deg, rgba(18,10,4,.6), rgba(18,10,4,0) 46%),
    linear-gradient(rgba(18,10,4,.28), rgba(18,10,4,.28)); }
.hero-photo .hero-inner { position: relative; z-index: 2; display: block;
  padding-block: clamp(3rem, 3rem + 5vw, 7rem); }
.hero-photo .hero-copy { max-width: 600px; }
.hero-photo .hero-actions { gap: .9rem; margin: 1.7rem 0 1.35rem; }
.hero-photo .hero-actions .btn { padding: 1rem 1.9rem; font-size: var(--step-1); font-weight: 700; }
.hero-photo .btn-primary { box-shadow: 0 10px 26px -10px rgba(194,65,12,.8); }
.hero-photo .eyebrow { color: #ffd9a3; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.hero-photo h1 { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.65), 0 1px 3px rgba(0,0,0,.55); }
.hero-photo .hero-body { color: #fdf4ea; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.hero-photo .hero-badges li { color: #fbf1e6; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.hero-photo .hero-badges li::before { color: #8fe0a2; }
.hero-photo .btn-ghost { color: #fff; border-color: rgba(255,255,255,.65); }
.hero-photo .btn-ghost:hover { background: #fff; color: var(--brand); border-color: #fff; }

/* --- Hero shared layout (used by the photo hero) -------------------------- */
.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(3rem, 3rem + 5vw, 6.5rem);
}
.hero-copy h1 { margin: .3rem 0 .8rem; max-width: 15ch; }
.hero-body { color: var(--ink-soft); font-size: var(--step-1); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1.25rem; }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.hero-badges li {
  font-size: var(--step--1); color: var(--ink-soft); font-weight: 600;
  padding-left: 1.2rem; position: relative;
}
.hero-badges li::before {
  content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800;
}
.hero-momentum {
  background: rgba(255,255,255,.75); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}
.micro-label { text-transform: uppercase; letter-spacing: .12em; font-size: var(--step--1); font-weight: 700; color: var(--brand-2); }
.hero-momentum { text-align: center; }
.momentum-art {
  width: clamp(116px, 42%, 168px); aspect-ratio: 1; margin: .4rem auto 1rem;
  position: relative; border-radius: 50%; overflow: hidden;
  box-shadow: 0 10px 26px -12px rgba(194,65,12,.55), inset 0 0 0 1px rgba(255,255,255,.4);
}
.momentum-art .mscene { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.momentum-art .mscene.is-on { opacity: 1; }
.hero-caption { font-size: var(--step-1); font-weight: 600; margin: .3rem 0 .6rem; min-height: 3em; }
.momentum-sub { color: var(--ink-soft); font-size: var(--step--1); }
.momentum-link { display: inline-block; margin-top: 1rem; font-weight: 700; font-size: var(--step-0); }

/* --- Journey stages ------------------------------------------------------- */
.stage-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-top: 1.4rem; }
.stage-card {
  text-align: left; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1rem 1.1rem; cursor: pointer;
  transition: transform .12s, border-color .15s, background .15s, color .15s;
  display: flex; flex-direction: column; gap: .25rem;
}
.stage-card:hover { transform: translateY(-2px); border-color: var(--tint); }
.stage-card.is-active { background: var(--tint); border-color: var(--tint); color: #fff; }
.stage-n { font-size: var(--step--1); font-weight: 800; color: var(--tint); }
.stage-card.is-active .stage-n { color: #fff; }
.stage-title { font-size: var(--step-1); font-weight: 700; }
.stage-sub { font-size: var(--step--1); color: var(--ink-soft); }
.stage-card.is-active .stage-sub { color: rgba(255,255,255,.85); }

/* --- Check-in ------------------------------------------------------------- */
.checkin { background: var(--sand); }
.checkin-form { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
.checkin-form fieldset { border: 0; }
.checkin-form legend { font-weight: 700; font-size: var(--step-1); margin-bottom: .75rem; }
.checkin-form legend .hint, .field .hint { font-weight: 400; color: var(--ink-soft); font-size: var(--step--1); }
.chip-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font-weight: 600; font-size: var(--step-0); transition: all .15s; cursor: pointer;
}
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.mood-row { display: flex; align-items: center; gap: 1rem; }
.mood-row input[type=range] { flex: 1; accent-color: var(--brand); height: 6px; }
.mood-out { font-weight: 700; color: var(--brand); min-width: 5ch; text-transform: capitalize; }
.checkin-result {
  margin-top: 1.75rem; background: var(--surface); border: 1.5px solid var(--brand);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.checkin-result h3 { color: var(--brand); margin-bottom: .4rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }

/* --- Momentum ------------------------------------------------------------- */
.momentum-grid { display: grid; grid-template-columns: minmax(180px, 250px) 1fr; gap: 1.75rem; margin-top: 1.6rem; align-items: start; }
.ring-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; box-shadow: var(--shadow-sm); }
.ring { position: relative; display: inline-block; line-height: 0; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--sand-2); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset .6s ease; }
.ring-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 92px; text-align: center; line-height: 1.05;
}
.ring-label span { display: block; font-size: var(--step-2); font-weight: 800; color: var(--brand); }
.ring-label small { display: block; font-size: 0.72rem; color: var(--ink-soft); line-height: 1.15; margin-top: 3px; }
.streak { margin-top: 1rem; color: var(--ink-soft); }
.streak strong { color: var(--ink); }
.log-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.quick-wins { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.quick-win {
  border: 1.5px solid var(--line); background: var(--sand); color: var(--ink-soft);
  border-radius: 999px; padding: .45rem .9rem; font-weight: 600; font-size: var(--step--1); cursor: pointer;
  transition: all .15s;
}
.quick-win:hover { border-color: var(--brand); color: var(--brand); }
.win-form { display: flex; gap: .6rem; margin-bottom: .5rem; }
.win-note { margin: 0 0 1rem; font-size: .82rem; line-height: 1.45; color: var(--ink-soft); }
.win-tools { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.win-tool-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.win-tool { padding: .5rem .9rem; font-size: .85rem; font-weight: 600; cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.win-tool:hover { border-color: var(--brand); }
.win-tool-danger { color: #b91c1c; border-color: #f3c2bb; }
.win-tool-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.win-shared { margin: .7rem 0 0; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
.win-form input { flex: 1; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.win-list { list-style: none; display: grid; gap: .5rem; }
.win-list li {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem;
  background: var(--sand); border-radius: var(--radius-sm); font-size: var(--step-0);
}
.win-list li .win-check { color: var(--ok); font-weight: 800; }
.win-list li .win-time { margin-left: auto; color: var(--ink-soft); font-size: var(--step--1); }
.win-list li .win-del { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.win-list li .win-del:hover { color: var(--brand); }
.win-empty { color: var(--ink-soft); background: transparent !important; font-style: italic; }

/* --- Community ------------------------------------------------------------ */
.community { background: var(--sand); }
.post-form { margin: 1.4rem 0 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.post-form textarea, .contact-form textarea, .contact-form input, .post-form input[type=text] {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); font-size: var(--step-0); resize: vertical;
}
.post-form-row { display: flex; gap: .75rem; margin-top: .75rem; flex-wrap: wrap; }
.post-form-row input { flex: 1; min-width: 200px; }
.post-note { font-size: var(--step--1); color: var(--ink-soft); margin-top: .6rem; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; }
.thread-list { list-style: none; display: grid; gap: 1rem; }
.thread { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); }
.thread-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .7rem; }
.thread-who { font-weight: 700; }
.thread-tag { color: var(--ink-soft); font-size: var(--step--1); }
.thread-badge { margin-left: auto; font-size: var(--step--1); font-weight: 700; color: var(--ok); background: #eaf7ee; padding: .2rem .6rem; border-radius: 999px; }
.thread-body { color: var(--ink); }
.thread-mod { margin-top: .8rem; padding: .8rem 1rem; background: var(--sand); border-left: 3px solid var(--brand-2); border-radius: 8px; font-size: var(--step--1); color: var(--ink-soft); }

/* --- Support lines / region tabs ------------------------------------------ */
.region-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.3rem 0 1.2rem; }
.region-tab {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: 999px; padding: .5rem 1rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.region-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.support-lines, .region-lines { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
/* The region panels are shown/hidden by JS via the [hidden] attribute. Because
   the rule above sets an explicit display, we must let [hidden] win again or
   every region shows at once and switching tabs appears to do nothing. The
   attribute-based rule covers any region panel regardless of its class. */
.support-lines[hidden], .region-lines[hidden],
[data-region-panel][hidden] { display: none; }
.support-lines a, .region-lines a {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.15rem; color: var(--ink); transition: border-color .15s, transform .12s;
}
.support-lines a:hover, .region-lines a:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); }
.line-name { display: block; font-weight: 700; color: var(--brand); }
.line-name .ext { font-size: .8em; }
.line-detail { display: block; color: var(--ink-soft); font-size: var(--step--1); margin-top: .2rem; }
.support-roadmap {
  margin-top: 1.6rem; padding: 1.3rem 1.4rem;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand) 5%, transparent);
}
.support-roadmap .eyebrow { color: var(--brand); }
.support-roadmap h3 { margin: .2rem 0 .6rem; font-size: var(--step-1); }
.support-roadmap p { margin: 0 0 .6rem; color: var(--ink); }
.support-roadmap .roadmap-note { font-size: .85rem; color: var(--ink-soft); }
.support-roadmap .btn { margin-top: .4rem; }
.support-note { color: var(--ink-soft); font-size: var(--step--1); margin-top: 1rem; }

/* --- Learn ---------------------------------------------------------------- */
.learn-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.3rem 0 1.5rem; }
.filter-btn {
  border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: .5rem 1rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.filter-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.resource-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; box-shadow: var(--shadow-sm);
}
.resource-card.is-hidden { display: none; }
.resource-meta { display: flex; gap: .5rem; align-items: center; }
.resource-type { font-size: var(--step--1); font-weight: 700; color: #fff; background: var(--brand-2); padding: .15rem .55rem; border-radius: 6px; }
.resource-cat { font-size: var(--step--1); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.resource-source { color: var(--ink-soft); font-size: var(--step--1); }
.resource-desc { color: var(--ink-soft); flex: 1; }
.resource-card .btn { align-self: flex-start; margin-top: .3rem; }
.guide-body { margin-top: .5rem; border-top: 1px dashed var(--line); padding-top: .8rem; }
.guide-body p { color: var(--ink-soft); margin-bottom: .6rem; font-size: var(--step-0); }

/* --- Closing quotes ------------------------------------------------------- */
.closing { background: var(--sand); }
/* Single rotating "proof" quote (leaner than the old 3-card grid) */
.quote-solo { max-width: 62ch; margin: 1.4rem auto 2.4rem; text-align: center; transition: opacity .4s ease; }
.quote-solo blockquote { font-size: var(--step-2); font-weight: 600; line-height: 1.4; color: var(--ink); }
.quote-solo figcaption { margin-top: 1rem; color: var(--brand); font-weight: 700; font-size: var(--step-0); }
.closing.has-photo .quote-solo blockquote { color: #fff; }
.closing.has-photo .quote-solo figcaption { color: #ffd9a3; }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 2.5rem; }
.quote-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.quote-card blockquote { font-size: var(--step-1); font-weight: 600; color: var(--ink); line-height: 1.45; }
.quote-card figcaption { margin-top: 1rem; color: var(--brand); font-weight: 700; font-size: var(--step--1); }
.closing-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.closing-note h3 { margin-bottom: .5rem; }
.closing-note p { color: var(--ink-soft); max-width: 80ch; }
.closing-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.2rem; }

/* --- Newsletter ----------------------------------------------------------- */
.newsletter-strip { background: var(--ink); color: #eaddce; padding-block: clamp(2.5rem, 2rem + 3vw, 4rem); }
.newsletter-inner { display: grid; gap: 1.5rem; }
.newsletter-copy .micro-label { color: var(--brand-2); }
.newsletter-strip h2 { color: #fff; margin: .3rem 0 .5rem; }
.newsletter-lead { color: #c9b6a6; max-width: 60ch; font-size: var(--step-1); }
.newsletter-form { display: grid; gap: .8rem; }
.nl-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.nl-row input {
  flex: 1; min-width: 160px; padding: .8rem .95rem; border: 1.5px solid transparent;
  border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: var(--step-0);
}
.nl-row input:focus-visible { outline: 3px solid var(--brand-2); }
.nl-row .btn { flex: 0 0 auto; }
.nl-consent { display: flex; gap: .55rem; align-items: flex-start; color: #d8c7b8; font-size: var(--step--1); cursor: pointer; }
.nl-consent input { margin-top: .2rem; accent-color: var(--brand); flex: 0 0 auto; }
.nl-small { color: #a7968a; font-size: var(--step--1); }
.nl-small a { color: #e9d9cb; text-decoration: underline; }
.newsletter-flash { max-width: 60ch; }
.newsletter-form .form-note { color: #ffd9b8; }

/* --- Crisis modal --------------------------------------------------------- */
.crisis-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; }
.crisis-modal[hidden] { display: none; }
.crisis-backdrop { position: absolute; inset: 0; background: rgba(42,28,18,.55); backdrop-filter: blur(2px); }
.crisis-card {
  position: relative; z-index: 1; width: min(100%, 640px); max-height: 90dvh; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}
.crisis-close { position: absolute; top: .8rem; right: 1rem; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--ink-soft); cursor: pointer; }
.crisis-close:hover { color: var(--brand); }
.crisis-card h2 { font-size: var(--step-2); margin: .2rem 0 .6rem; }
.crisis-lead { color: var(--ink-soft); margin-bottom: 1rem; }
.region-lines { margin-bottom: 1rem; }
.crisis-foot { font-size: var(--step--1); color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 1rem; }

/* --- Toast ---------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 1100; opacity: 0; transition: opacity .25s, transform .25s;
  font-weight: 600; font-size: var(--step-0); max-width: 90vw; text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Forms / prose pages -------------------------------------------------- */
.page-hero { background: var(--sand); }
.field { margin-bottom: 1.1rem; display: grid; gap: .4rem; }
.field label { font-weight: 700; }
.contact-form .btn { margin-top: .3rem; }
.form-note { font-size: var(--step--1); }
.form-success, .form-error { padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; }
.form-success { background: #eaf7ee; color: #14622f; border: 1px solid #b7e2c4; }
.form-error   { background: #fdecea; color: #8a2016; border: 1px solid #f3c2bb; margin-bottom: 1rem; }
.prose h2 { margin: 1.8rem 0 .6rem; }
.prose p { color: var(--ink-soft); margin-bottom: .8rem; max-width: 72ch; }
.prose .closing-actions { margin-top: 1.5rem; }

/* --- Optional photo bands (config-driven image slots) --------------------- */
.band-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; z-index: 0; }
.connection-strip.has-photo, .closing.has-photo { position: relative; overflow: hidden; }
.connection-strip.has-photo { background: #4a260f; }
.connection-strip.has-photo::after,
.closing.has-photo::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(rgba(30,17,7,.55), rgba(30,17,7,.72)); }
.connection-strip.has-photo .connection-inner { position: relative; z-index: 2; }
.closing.has-photo { background: #2a1c12; }
.closing.has-photo .wrap { position: relative; z-index: 2; }
.closing.has-photo .eyebrow { color: #ffd9a3; }
.closing.has-photo > .wrap > h2 { color: #fff; }

/* --- Journey chart ("the road back") — animated inline SVG ---------------- */
.journeymap-figure { margin: 1.4rem 0 0; }
.journey-svg { width: 100%; height: auto; display: block; border-radius: var(--radius);
  box-shadow: var(--shadow); background: var(--sand); }

/* The line literally draws itself (stroke-dashoffset); waypoint cards fade in
   as the "pen" passes them; the sun eases in. JS adds .will-animate only when
   motion is allowed, then .in-view when the chart scrolls into view. */
.journeymap-figure.will-animate .jm-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.journeymap-figure.will-animate .jm-wp,
.journeymap-figure.will-animate .jm-sun { opacity: 0; }
.journeymap-figure.will-animate.in-view .jm-line { animation: jm-draw 2.2s ease forwards; }
.journeymap-figure.will-animate.in-view .jm-wp { animation: jm-fade .55s ease forwards; animation-delay: var(--d); }
.journeymap-figure.will-animate.in-view .jm-sun { animation: jm-fade 1s ease .5s forwards; }
@keyframes jm-draw { to { stroke-dashoffset: 0; } }
@keyframes jm-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .journeymap-figure.will-animate .jm-line { stroke-dasharray: none; stroke-dashoffset: 0; }
  .journeymap-figure.will-animate .jm-wp,
  .journeymap-figure.will-animate .jm-sun { opacity: 1; animation: none; }
}

/* --- Connection principle strip ------------------------------------------ */
.connection-strip {
  background: linear-gradient(135deg, #7a3b16 0%, #c2410c 55%, #e8963f 130%);
  color: #fff5ec; padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
}
.connection-inner { text-align: center; display: grid; justify-items: center; gap: .35rem; }
.connection-glyph { display: inline-flex; margin-bottom: .3rem; }
.connection-strip h2 { color: #fff; font-size: var(--step-3); }
.connection-lead { color: #ffe9d8; font-size: var(--step-1); max-width: 60ch; }
.connection-cta { margin-top: .8rem; font-weight: 700; }
.connection-cta a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.connection-cta a:hover { color: #ffe1cb; }
.connection-cta .dot { opacity: .6; margin: 0 .5rem; }

/* --- Reflections ---------------------------------------------------------- */
.reflection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 1.5rem; }
.reflection-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .5rem; position: relative;
}
.reflection-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.reflection-flag { font-size: var(--step--1); font-weight: 700; color: #fff; background: var(--brand); padding: .15rem .55rem; border-radius: 6px; }
.reflection-kind { font-size: var(--step--1); font-weight: 700; padding: .15rem .55rem; border-radius: 6px; }
.reflection-kind--guest { background: #eaf2ea; color: #2f7d4f; }   /* a real reader's story */
.reflection-kind--team { background: var(--sand-2); color: var(--ink-soft); }
.reflection-meta { color: var(--ink-soft); font-size: var(--step--1); }
.reflection-card h3 { font-size: var(--step-1); }
.reflection-card h3 a { color: var(--ink); }
.reflection-card h3 a:hover { color: var(--brand); text-decoration: none; }
.reflection-summary { color: var(--ink-soft); flex: 1; }
.reflection-more { font-weight: 700; font-size: var(--step-0); }
.reflection-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* archive list */
.reflection-archive { list-style: none; display: grid; gap: .6rem; }
.reflection-archive-item a {
  display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; color: var(--ink); transition: border-color .15s, transform .12s;
}
.reflection-archive-item a:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-2px); }
.ra-date { color: var(--ink-soft); font-size: var(--step--1); font-weight: 600; padding-top: .15rem; }
.ra-main { display: grid; gap: .25rem; }
.ra-title { font-weight: 700; font-size: var(--step-1); }
.ra-video { font-size: var(--step--1); color: var(--brand); font-weight: 700; }
.ra-summary { color: var(--ink-soft); }
.ra-author { color: var(--ink-soft); font-size: var(--step--1); }

/* single reflection */
.reflection-single .reflection-breadcrumb { margin-bottom: .5rem; }
.reflection-single h1 { margin: .3rem 0 .5rem; }
.reflection-single .reflection-meta { margin-bottom: 1.4rem; }
.reflection-body p { font-size: var(--step-1); line-height: 1.7; margin-bottom: 1rem; max-width: 68ch; }
.reflection-image { margin: 1.4rem 0 1.8rem; }
.reflection-image img { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.reflection-video { margin: 1.75rem 0; }
.reflection-video figcaption { margin-top: .8rem; color: var(--ink-soft); font-size: var(--step-0); display: grid; gap: .3rem; }
.yt-channel { color: var(--ink-soft); font-weight: 400; }
.yt-takeaway { display: block; color: var(--ink-soft); font-size: var(--step-0); max-width: 68ch; }
.reflection-cta { margin-top: 2rem; }

/* youtube facade */
.yt-facade { position: relative; display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: #000; border: 0; padding: 0; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s, opacity .3s; }
.yt-facade:hover img { transform: scale(1.03); opacity: .85; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 48px; border-radius: 12px; background: rgba(194,65,12,.92); }
.yt-play::before { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.yt-facade:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.reflection-video iframe { width: 100%; max-width: 640px; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius); border: 0; }

/* --- Contribute page ------------------------------------------------------ */
.guidelines { background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 1.75rem; }
.guidelines h2 { font-size: var(--step-1); margin-bottom: .6rem; }
.guidelines ul { margin: 0 0 .8rem 1.1rem; display: grid; gap: .5rem; }
.guidelines li { color: var(--ink-soft); }
.consent-note { color: var(--ink); font-weight: 500; border-top: 1px solid var(--line); padding-top: .8rem; font-size: var(--step-0); }
.roadmap-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1rem; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.check input { margin-top: .25rem; flex: 0 0 auto; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b91c1c; box-shadow: 0 0 0 2px rgba(185,28,28,.12); }
.contribute-form .field select { width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-size: var(--step-0); }
.contribute-email { margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.contribute-email h2 { font-size: var(--step-1); margin-bottom: .4rem; }
.contribute-email p { color: var(--ink-soft); }
.crisis-inline { margin-top: 1.5rem; color: var(--ink-soft); font-size: var(--step-0); }

/* ==========================================================================
   RESPONSIVE COMPONENT ADJUSTMENTS
   ========================================================================== */
@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-momentum { max-width: 480px; }
  .stage-row { grid-template-columns: repeat(3, 1fr); }
  .quote-grid { grid-template-columns: 1fr 1fr; }
  .reflection-grid { grid-template-columns: 1fr 1fr; }
  .momentum-grid { grid-template-columns: 1fr; }
  .ring-card { max-width: 320px; }
}
@media (max-width: 767px) {
  .hero-photo { min-height: 78vh; }
  .hero-photo-bg { background-position: 66% center; }
  .hero-photo::after { background:
    linear-gradient(0deg, rgba(18,10,4,.94) 0%, rgba(18,10,4,.6) 50%, rgba(18,10,4,.42) 100%),
    linear-gradient(rgba(18,10,4,.3), rgba(18,10,4,.3)); }
  .hero-photo .hero-copy { max-width: none; }
  .stage-row { grid-template-columns: 1fr 1fr; }
  .support-lines, .region-lines { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .reflection-grid { grid-template-columns: 1fr; }
  .reflection-archive-item a { grid-template-columns: 1fr; gap: .3rem; }
  .ra-date { order: 2; }
  .win-form { flex-direction: column; }
  .win-form .btn { width: 100%; }
}
@media (max-width: 460px) {
  .stage-row { grid-template-columns: 1fr; }
}
