/* ============================================================
   GG33 — Energy Calendar (universal day). Builds on home.css tokens
   and the lp- ambient from lifepath.css. Clean monochrome-ember:
   soft-white numbers, one ember accent for today / selected / masters.
   No em dashes.
   ============================================================ */

/* Only master days carry the ember accent in the grid; 1-9 stay neutral. */
.energy [data-e="7"]  { --e: #ff453a; }       /* 7 is Gary's unlucky number */
.energy [data-e="8"]  { --e: var(--green); }  /* 8 is the money number */
.energy [data-e="11"], .energy [data-e="22"], .energy [data-e="33"] { --e: var(--orange-2); }

/* ---------- Today hero ---------- */
.energy-hero {
  position: relative;
  margin: 0.4rem 0 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(247, 244, 236, 0.08);
  isolation: isolate;
}
.energy-hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  opacity: 0.8;
}
.energy-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 18%, rgba(5,3,2,0.2), rgba(5,3,2,0.84) 78%),
    linear-gradient(180deg, rgba(5,3,2,0.4), rgba(5,3,2,0.72));
}
.energy-today {
  text-align: center;
  padding: 2.7rem 1.3rem 2.5rem;
  display: flex; flex-direction: column; align-items: center;
}
.energy-today-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(5.5rem, 29vw, 9.5rem);
  line-height: 0.92;
  color: var(--e, var(--ink));
  letter-spacing: -0.04em;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.55);
}
.energy-today-name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--orange-2);
  margin: 0.3rem 0 0;
}
.energy-today-date {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin: 0.6rem 0 0; font-weight: 600;
}
.energy-today-blurb {
  font-size: 1rem; line-height: 1.55; color: var(--soft);
  max-width: 38ch; margin: 0.95rem auto 0;
}

/* ---------- Calendar ---------- */
.cal {
  margin: 1.8rem 0 0;
  padding: 1.1rem 1rem 1.3rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(247, 244, 236, 0.02);
}
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 0.9rem; padding: 0 0.2rem;
}
.cal-nav span {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em;
}
.cal-nav button {
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(247,244,236,0.04);
  color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.cal-nav button:hover { border-color: var(--line-strong); background: rgba(247,244,236,0.07); }
.cal-dows {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; margin: 0 0 0.5rem;
}
.cal-dows span {
  text-align: center; font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; }
.cal-cell {
  position: relative; aspect-ratio: 1; border: 1px solid rgba(247,244,236,0.06);
  border-radius: 11px; background: rgba(247,244,236,0.015);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; font-family: var(--sans);
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}
.cal-blank { border: 0; background: none; cursor: default; }
.cal-date { font-size: 0.6rem; color: var(--muted); position: absolute; top: 0.3rem; left: 0.42rem; }
.cal-energy {
  font-family: var(--display); font-weight: 700; font-size: clamp(0.95rem, 3.4vw, 1.3rem);
  color: var(--e, var(--soft));
}
.cal-cell:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(247,244,236,0.05);
}
.cal-cell.is-active {
  border-color: var(--orange-2);
  background: rgba(255,107,20,0.08);
}
.cal-cell.is-today {
  border-color: rgba(255,138,44,0.55);
  background: rgba(255,107,20,0.06);
}
.cal-cell.is-today::before {
  content: "TODAY"; position: absolute; bottom: 0.24rem; font-size: 0.42rem; letter-spacing: 0.1em;
  color: var(--orange-2); font-weight: 700; opacity: 0.85;
}

/* ---------- Selected-day detail ---------- */
.energy-sel {
  margin: 1.4rem 0 0; padding: 1.2rem 1.2rem; border-radius: 18px;
  border: 1px solid var(--line); background: rgba(247,244,236,0.025);
  display: flex; gap: 1.1rem; align-items: center;
}
.energy-sel-num {
  flex: none; width: 4.4rem; height: 4.4rem; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 2.1rem;
  color: var(--e, var(--orange-2));
  border: 1px solid color-mix(in srgb, var(--e, var(--orange-2)) 42%, transparent);
  background: color-mix(in srgb, var(--e, var(--orange-2)) 9%, transparent);
}
.energy-sel-body { min-width: 0; }
.energy-sel-date { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.15rem; font-weight: 600; }
.energy-sel-name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin: 0 0 0.35rem; }
.energy-sel-blurb { font-size: 0.92rem; line-height: 1.5; color: var(--soft); margin: 0 0 0.5rem; }
/* Scope the "read more" link styling to ONLY that link, so it does not poison the gate's CTA buttons */
.energy-sel [data-sel-link] { color: var(--orange-2); text-decoration: none; font-size: 0.85rem; font-weight: 600; border-bottom: 1px solid rgba(255,138,44,0.4); }

/* Ghost variant for the compact funnel banner button (paired with "Get the Cue app") */
.lp-calc-banner .lp-calc-btn-ghost { background: rgba(247, 244, 236, 0.04); border: 1px solid var(--line-strong); color: var(--ink); }

/* ---------- Energy legend / meanings ---------- */
.energy-legend { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin: 1.3rem 0 0; }
@media (min-width: 560px) { .energy-legend { grid-template-columns: 1fr 1fr; } }
.energy-item {
  scroll-margin-top: 5rem;
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 1rem 1.05rem; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(247,244,236,0.025);
}
.energy-item .e-badge {
  flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  color: var(--e, var(--orange-2));
  border: 1px solid color-mix(in srgb, var(--e, var(--orange-2)) 38%, transparent);
  background: color-mix(in srgb, var(--e, var(--orange-2)) 8%, transparent);
}
.energy-item h3 { font-family: var(--display); font-weight: 700; font-size: 1rem; margin: 0.1rem 0 0.25rem; color: var(--ink); }
.energy-item p { font-size: 0.9rem; line-height: 1.5; color: var(--soft); margin: 0; }

@media (prefers-reduced-motion: reduce) { .cal-cell:hover { transform: none; } }

/* ============================================================
   Desktop layer (min-width: 761px) — mobile rendering untouched.
   Hero keeps the full-bleed art; the working pieces (calendar,
   selected day) sit on a centered 58rem line; the legend becomes
   a full-width card grid.
   ============================================================ */
@media (min-width: 761px) {
  .energy-today { padding: 3.6rem 2rem 3.4rem; }
  .energy-today-blurb { max-width: 52ch; font-size: 1.08rem; }

  .cal { max-width: 58rem; margin-left: auto; margin-right: auto; padding: 1.5rem 1.5rem 1.7rem; }
  .cal-grid, .cal-dows { gap: 0.55rem; }
  .cal-cell { border-radius: 13px; }
  .cal-date { font-size: 0.66rem; }
  .cal-energy { font-size: 1.45rem; }
  .cal-cell.is-today::before { font-size: 0.5rem; }

  .energy-sel { max-width: 58rem; margin-left: auto; margin-right: auto; padding: 1.5rem 1.6rem; }
  .energy-sel-num { width: 5rem; height: 5rem; font-size: 2.4rem; }
  .energy-sel-name { font-size: 1.35rem; }
  .energy-sel-blurb { font-size: 1rem; }

  /* legend section: break out of the editorial rail, card grid across */
  .lp-section:has(.energy-legend) { display: block; }
  .lp-section:has(.energy-legend) > .lp-h2 { position: static; margin-bottom: 0.9rem; max-width: none; font-size: clamp(1.7rem, 2.4vw, 2.1rem); }
  .lp-section:has(.energy-legend) > p { max-width: 62ch; }
  .lp-section > .energy-legend { max-width: none; }
  .energy-legend { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .energy-item { padding: 1.15rem 1.2rem; border-radius: 16px; }
  .energy-item h3 { font-size: 1.08rem; }
  .energy-item p { font-size: 0.95rem; }
}

@media (min-width: 1100px) {
  .energy-legend { grid-template-columns: repeat(3, 1fr); }
}
