/* ============================================================
   Riveryn — guide pages on the "First Light" system (issue #1244)
   Loads AFTER first-light.css and only adds guide-page patterns:
   hero paper artifact, numbered loop steps, curve + plate panels,
   the 7-day plan list, and the worksheet download card.
   Legal pages stay on styles.css — do not link this there.
   ============================================================ */

/* ---------- Hero: the guide is the artifact ---------- */
.hero-paper {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  padding-block: clamp(16px, 3vw, 32px);
}

/* warm dawn pool behind the paper stack, mirroring the homepage
   phone halo so the cream pages read as an object on the espresso */
.hero-paper::before {
  content: "";
  position: absolute;
  inset: -16% -34%;
  background: radial-gradient(50% 46% at 50% 48%, rgba(255, 188, 84, 0.34) 0%, rgba(255, 178, 62, 0.13) 48%, rgba(21, 217, 87, 0.06) 64%, transparent 78%);
  pointer-events: none;
}

.hero-paper .guide-paper {
  width: min(272px, 64vw);
}

.guide-file-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--faint);
  max-width: 52ch;
}

/* ---------- 01 · The Riveryn loop — numbered ruled steps ---------- */
.guide-steps {
  list-style: none;
  margin: clamp(44px, 6vw, 64px) auto 0;
  padding: 0;
  max-width: 720px;
  text-align: left;
}

.guide-steps li {
  display: flex;
  gap: clamp(18px, 3.4vw, 30px);
  align-items: flex-start;
  padding: 22px 2px;
}

.guide-steps li + li {
  border-top: 1px solid var(--hairline);
}

/* dawn progression: the numerals walk the energy line, gold to green */
.step-num {
  flex: none;
  width: 1.15em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5vw, 48px);
  line-height: 1;
  text-align: center;
}

.guide-steps li:nth-child(1) .step-num {
  color: var(--sun);
  text-shadow: 0 0 24px rgba(255, 178, 62, 0.4);
}

.guide-steps li:nth-child(2) .step-num {
  color: var(--energy-gold-mid);
  text-shadow: 0 0 24px rgba(235, 184, 56, 0.38);
}

.guide-steps li:nth-child(3) .step-num {
  color: var(--energy-steady);
  text-shadow: 0 0 24px rgba(70, 208, 106, 0.35);
}

.guide-steps li:nth-child(4) .step-num {
  color: var(--energy-great);
  text-shadow: 0 0 24px rgba(21, 217, 87, 0.4);
}

.guide-steps h3 {
  font-size: clamp(19px, 2.4vw, 22px);
  margin-bottom: 6px;
}

.guide-steps div > p {
  font-size: 15.5px;
  line-height: 1.58;
  color: var(--muted);
}

/* ---------- 02 · Energy is a curve ---------- */
.curve-layout {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

@media (min-width: 900px) {
  .curve-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

/* p.note-callout ties .section-heading p on specificity; this file
   loads after first-light.css, so the later rule wins the tie. */
p.note-callout {
  border: 1px solid rgba(255, 178, 62, 0.3);
  background: rgba(255, 178, 62, 0.07);
  border-radius: var(--r-card);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
}

.note-callout strong {
  color: var(--sun);
  font-weight: 600;
}

.curve-panel {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: var(--r-hero);
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  gap: 18px;
}

.curve-panel svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.curve-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.curve-key span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.curve-key i {
  display: inline-block;
  width: 18px;
  height: 4px;
  border-radius: 2px;
}

.key-spiky {
  background: var(--energy-low);
}

.key-steady {
  background: linear-gradient(90deg, var(--sun), var(--energy-great));
}

/* ---------- 03 · The plate ---------- */
.plate-layout {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  margin-top: clamp(44px, 6vw, 64px);
}

@media (min-width: 900px) {
  .plate-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.plate-figure {
  position: relative;
  margin: 0;
  justify-self: center;
  display: grid;
  gap: 20px;
  justify-items: center;
}

.plate-figure::before {
  content: "";
  position: absolute;
  inset: -14% -30%;
  background: radial-gradient(50% 44% at 50% 42%, rgba(255, 188, 84, 0.22) 0%, rgba(255, 178, 62, 0.08) 52%, transparent 76%);
  pointer-events: none;
}

.plate-figure svg {
  position: relative;
  width: min(296px, 72vw);
  height: auto;
  filter: drop-shadow(0 22px 34px rgba(10, 8, 5, 0.45));
}

.plate-figure figcaption {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.plate-figure figcaption span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.plate-figure figcaption i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.swatch-plants {
  background: #2f9e57;
}

.swatch-protein {
  background: #3d7fa6;
}

.swatch-carbs {
  background: #e9b93c;
}

.plate-layout .ruled-list {
  margin-top: 0;
}

.clue-list-heading {
  margin-top: clamp(48px, 7vw, 72px);
  font-size: clamp(20px, 2.6vw, 24px);
}

.guide-clue-list {
  margin-top: 8px;
}

/* ---------- 04 · The 7-day plan ---------- */
.plan-layout {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
}

@media (min-width: 900px) {
  .plan-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }
}

.day-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.day-list li {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 20px 2px;
}

.day-list li + li {
  border-top: 1px solid var(--hairline);
}

.day-list h3 {
  font-size: 19px;
}

.day-list p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- The worksheet download card ---------- */
.guide-download-card {
  margin-top: clamp(56px, 8vw, 88px);
}

@media (min-width: 900px) {
  .guide-download-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-download-card .guide-copy {
    justify-items: center;
    text-align: center;
    margin-inline: auto;
    max-width: 640px;
  }

  .guide-download-card .eyebrow-line::before {
    content: "";
    flex: 1 1 0;
    height: 1px;
    background: linear-gradient(270deg, var(--hairline), transparent);
  }
}
