/* ---- Our Story ---- */
.story-section {
  scroll-margin-top: 5.5rem;
  padding-top: clamp(5.5rem, 11vw, 9rem);
  overflow: clip;
}

.story-section .container { max-width: 1280px; }

.story-opening {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.6rem);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(8, 10, 16, 0.72), rgba(8, 10, 16, 0.46)),
    radial-gradient(circle at 50% 0%, rgba(111, 217, 196, 0.09), transparent 48%);
  border-color: rgba(201, 168, 106, 0.24);
  box-shadow: 0 34px 90px -46px rgba(0, 0, 0, 0.92), 0 0 55px -42px rgba(111, 217, 196, 0.5);
}

.story-section .story-opening,
.story-section .story-chapter {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.story-opening .module-eyebrow { justify-content: center; }
.story-opening .module-eyebrow::before { display: none; }
.story-opening h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.35rem, 6vw, 4.5rem);
  letter-spacing: -0.015em;
}

.story-kicker {
  margin: 0 auto 0.85rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  font-style: italic;
}

.story-opening .story-opening-copy {
  max-width: 64ch;
  margin-inline: auto;
  font-size: clamp(1.04rem, 1.65vw, 1.18rem);
}

.story-begin,
.story-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.story-begin {
  margin-top: 1.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--accent-2-dim);
}

.story-begin:hover,
.story-begin:focus-visible,
.story-text-link:hover,
.story-text-link:focus-visible { color: var(--ink); }

.story-trail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(7rem, 12vw, 10rem);
  row-gap: clamp(8rem, 15vw, 12rem);
  margin-top: clamp(5rem, 11vw, 8rem);
  padding: 3rem 0 4rem;
}

.story-trail-line {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.story-trail-stroke,
.story-trail-glow {
  fill: none;
  stroke: url(#storyTrailGradient);
  vector-effect: non-scaling-stroke;
}

.story-trail-stroke {
  stroke-width: 2;
  stroke-linecap: round;
}

.story-trail-glow {
  stroke-width: 10;
  opacity: 0.34;
  filter: url(#storyTrailGlow);
}

.story-chapter {
  z-index: 1;
  width: 100%;
  max-width: 470px;
  scroll-margin-top: 5.5rem;
  padding: clamp(2rem, 4vw, 3.15rem);
  background:
    linear-gradient(145deg, rgba(8, 10, 16, 0.78), rgba(8, 10, 16, 0.53)),
    radial-gradient(circle at 12% 0%, rgba(111, 217, 196, 0.06), transparent 44%);
  box-shadow: 0 38px 75px -38px rgba(0, 0, 0, 0.88), 0 0 42px -34px rgba(111, 217, 196, 0.42);
}

.story-chapter--left { grid-column: 1; justify-self: end; }
.story-chapter--right { grid-column: 2; justify-self: start; }
#story-chapter-1 { grid-row: 1; }
#story-chapter-2 { grid-row: 2; }
#story-chapter-3 { grid-row: 3; }
#story-chapter-4 { grid-row: 4; }
.story-chapter--final {
  grid-column: 1 / -1;
  grid-row: 5;
  justify-self: center;
  width: min(100%, 620px);
  max-width: 620px;
  border-color: rgba(201, 168, 106, 0.28);
  background:
    linear-gradient(135deg, rgba(8, 10, 16, 0.76), rgba(8, 10, 16, 0.53)),
    radial-gradient(circle at 85% 85%, rgba(201, 168, 106, 0.09), transparent 45%);
}

.story-chapter-marker {
  position: absolute;
  top: 3rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-2-dim);
  border-radius: 50%;
  background: rgba(5, 6, 10, 0.94);
  box-shadow: 0 0 0 7px rgba(5, 6, 10, 0.52), 0 0 24px rgba(111, 217, 196, 0.12);
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.story-chapter--left .story-chapter-marker { right: calc(-1 * clamp(3.5rem, 6vw, 5rem)); transform: translateX(50%); }
.story-chapter--right .story-chapter-marker { left: calc(-1 * clamp(3.5rem, 6vw, 5rem)); transform: translateX(-50%); }
.story-chapter--final .story-chapter-marker { left: 50%; top: -1.2rem; transform: translateX(-50%); }

.story-chapter-heading {
  margin-bottom: 1.6rem;
  padding-bottom: 1.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.story-chapter-label {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  line-height: 1.6;
  text-transform: uppercase;
}

.story-chapter h3 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  line-height: 1.03;
  letter-spacing: -0.015em;
}

.story-chapter-heading .story-statement {
  max-width: 31ch;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  font-style: italic;
  line-height: 1.45;
}

.story-chapter-copy p {
  max-width: 52ch;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.78;
}
.story-chapter-copy a:not(.btn) { color: var(--accent-2); text-underline-offset: 0.2em; }
.story-chapter-copy .story-text-link { margin-top: 1.5rem; text-decoration: none; }

.story-chapter blockquote {
  margin: 1.6rem 0 1.35rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 1px solid var(--accent);
}

.story-chapter blockquote p {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-style: italic;
  line-height: 1.35;
}

.story-chapter-copy .story-blessing { color: var(--accent); font-style: italic; }
.story-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.75rem; }

@media (max-width: 899px) {
  .story-trail {
    grid-template-columns: 1fr;
    gap: clamp(4rem, 10vw, 6rem);
    padding: 2rem 0 3rem 2.5rem;
  }
  .story-trail-line { display: none; }
  .story-trail::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 1rem;
    left: 0.9rem;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-2) 10%, var(--accent-dim) 52%, var(--accent-2-dim) 88%, transparent);
    box-shadow: 0 0 18px rgba(111, 217, 196, 0.2);
  }
  .story-chapter,
  .story-chapter--left,
  .story-chapter--right,
  .story-chapter--final {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
    max-width: none;
  }
  .story-chapter--left .story-chapter-marker,
  .story-chapter--right .story-chapter-marker,
  .story-chapter--final .story-chapter-marker {
    top: 2.5rem;
    right: auto;
    left: -2.78rem;
    transform: none;
  }
}

@media (max-width: 520px) {
  .story-section .container { padding-inline: 1rem; }
  .story-opening, .story-chapter { border-radius: 20px; }
  .story-trail { padding-left: 1.8rem; gap: 3.75rem; }
  .story-trail::before { left: 0.25rem; }
  .story-chapter--left .story-chapter-marker,
  .story-chapter--right .story-chapter-marker,
  .story-chapter--final .story-chapter-marker { left: -2.75rem; }
  .story-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .story-begin { scroll-behavior: auto; }
}

/* ---- Explore the World ---- */
#explore .card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.explore-card[data-scroll-target] {
  cursor: pointer;
}

/* ---- Digital Frontier ---- */
.frontier-section {
  position: relative;
}

.frontier-section .module--wide {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.frontier-note {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}

/* ---- Whisper About It Management plan ---- */
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
  margin: 1rem 0 1.5rem;
  font-family: var(--serif);
}

.plan-amount {
  font-size: clamp(2.2rem, 5vw, 2.8rem);
  color: var(--accent);
  font-weight: 500;
}

.plan-interval {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.form-error {
  color: #e2726c;
}

#services .plan-module {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

/* ---- Services ---- */
.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  margin: 1.5rem 0 2.25rem;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.services-list li {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1em;
}

.services-note {
  margin-top: 1.75rem;
  font-size: 0.92rem;
  color: var(--ink-faint);
  line-height: 1.6;
  max-width: 56ch;
}

/* ---- Stand With Whisper About It (homepage teaser) ---- */
.supporter-module {
  text-align: center;
  border-color: var(--accent-2-dim);
  box-shadow: 0 30px 70px -30px rgba(111, 217, 196, 0.18), 0 30px 60px -30px rgba(0, 0, 0, 0.65);
}

.supporter-module .module-eyebrow { justify-content: center; }
.supporter-module .module-eyebrow::before { display: none; }
.supporter-module p { margin-inline: auto; }

.supporter-price .plan-amount { color: var(--accent-2); }

.supporter-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ---- Start a Project modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-fast) var(--ease-out), visibility var(--dur-fast);
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  padding: clamp(1.75rem, 5vw, 2.75rem);
  transform: translateY(18px) scale(0.98);
  transition: transform var(--dur-fast) var(--ease-out);
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}

.modal h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 0.85rem;
  padding-right: 2rem;
}

.modal p {
  color: var(--ink-dim);
  font-size: 0.98rem;
  line-height: 1.65;
}

.modal ol {
  margin: 1.25rem 0;
  padding-left: 1.2rem;
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.modal-fineprint {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal { transition: none; }
}
