/* ===========================================================
   Insight page — layered on top of styles.css
   Reuses :root tokens, .site-header, .brand, .site-nav,
   .nav-toggle, .button(.--accent), .sr-only, fonts.
   Section scale/spacing mirrors genius.css / author.css.
   =========================================================== */

.insight-main {
  background: #ffffff;
}

/* ---------- Hero ---------- */
.insight-hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 8.5rem var(--gutter) 5.5rem;
  background: #0f0e0c;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* Curtain stacking (see curtain.js): each locked section rises up to cover the
   one before it (the first covers the pinned hero). z-index increases down the
   page so each section paints over the previous one; the detail + footer scroll
   in normally after #features releases. */
.insight-intro,
.insight-feature,
.insight-detail,
.insight-footer {
  position: relative;
}
.insight-intro {
  z-index: 2;
}
.insight-feature {
  z-index: 3;
}
.insight-detail {
  z-index: 4;
}
.insight-footer {
  z-index: 5;
}

/* Locked panels fill the viewport so the lock-and-cover has no gap. */
@media (min-width: 960px) {
  .insight-intro,
  .insight-feature {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
  }
}

.insight-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* the source photo is already dimmed; this just lifts text contrast */
.insight-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 12, 0.52) 0%,
    rgba(10, 10, 12, 0.28) 44%,
    rgba(10, 10, 12, 0.55) 100%
  );
}

.insight-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  max-width: 46rem;
  text-align: center;
}

.insight-hero__icon {
  width: clamp(4.4rem, 6vw, 6.4rem);
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(226, 102, 37, 0.28));
}

.insight-hero h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.55rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.insight-hero__sub {
  margin: 0;
  max-width: 38rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.855rem, 1.4vw, 1.025rem);
  line-height: 1.55;
}

/* ---------- Intro band ---------- */
.insight-intro {
  background: #f2f1ef;
  padding: clamp(3rem, 6vw, 4.6rem) var(--gutter);
}

.insight-intro p {
  width: min(100%, 62rem);
  margin: 0 auto;
  text-align: center;
  color: #1f1f1f;
  font-size: clamp(0.855rem, 1.4vw, 1.025rem);
  line-height: 1.55;
}

/* ---------- Feature (image + text) ---------- */
.insight-feature {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  background: #ffffff;
}

.insight-feature__grid {
  width: min(calc(100% - 2 * var(--gutter)), var(--max-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.insight-feature__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(1rem, 1.6vw, 1.4rem);
  box-shadow: var(--section-shadow);
}

.insight-feature__copy h2 {
  margin: 0 0 1.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.insight-feature__copy p {
  margin: 0 0 1.1rem;
  max-width: 34rem;
  color: #1f1f1f;
  font-size: clamp(0.845rem, 0.12vw + 0.805rem, 0.875rem);
  line-height: 1.5;
}

.insight-feature__copy p:last-child {
  margin-bottom: 0;
}

@media (min-width: 860px) {
  .insight-feature__grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 5.5rem);
  }
}

/* ---------- Detail: try-prompt card + closing copy ---------- */
.insight-detail {
  padding: clamp(1rem, 2vw, 2rem) 0 clamp(3.5rem, 7vw, 6rem);
  background: #ffffff;
}

.insight-detail__inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--max-width));
  margin-inline: auto;
}

/* Try-prompt card — echoes the prompt bar inside the Teeej app. */
.insight-prompt {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  padding: clamp(1.4rem, 2.5vw, 2.1rem) clamp(1.4rem, 2.5vw, 2.2rem);
  background: #ffffff;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: clamp(1rem, 1.6vw, 1.4rem);
  box-shadow: 0 18px 50px rgba(12, 18, 28, 0.08);
}

.insight-prompt__kicker {
  margin: 0 0 0.45rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.insight-prompt__body {
  margin: 0;
  color: #1f1f1f;
  font-size: clamp(0.845rem, 0.12vw + 0.805rem, 0.875rem);
  line-height: 1.5;
}

.insight-prompt__send {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: clamp(2.6rem, 3.4vw, 3.1rem);
  height: clamp(2.6rem, 3.4vw, 3.1rem);
  border-radius: 50%;
  border: 1px solid rgba(20, 20, 20, 0.16);
  background: #ffffff;
  color: #2a2926;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.insight-prompt__send:hover,
.insight-prompt__send:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateX(2px);
}

.insight-closing {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.insight-closing h2 {
  margin: 0 0 1.4rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.insight-closing p {
  margin: 0 0 1.1rem;
  max-width: 62rem;
  color: #1f1f1f;
  font-size: clamp(0.845rem, 0.12vw + 0.805rem, 0.875rem);
  line-height: 1.5;
}

.insight-closing p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.insight-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(2.2rem, 4vw, 3rem) clamp(1.5rem, 5vw, 4rem);
  background: #474545;
  color: rgba(255, 255, 255, 0.92);
}

.insight-footer a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: opacity 160ms ease;
}

.insight-footer a:hover {
  opacity: 0.75;
}

.insight-footer__link {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.insight-footer__brand {
  display: inline-flex;
}

.insight-footer__brand img {
  width: 3rem;
  height: auto;
}

.insight-footer__powered {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .insight-prompt {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
  }

  .insight-prompt__send {
    align-self: flex-end;
  }

  .insight-footer {
    flex-direction: column;
    text-align: center;
    gap: 1.1rem;
  }
}
