/* ── BYR POST: Thomas's Story ──
 * Always-dark glass panel. No light mode override.
 * Loaded conditionally via functions.php when template-thomas-story.php is active.
 *
 * Token namespace: --story-* (scoped to .byr-story)
 * Core token refs: --color-accent-primary (cyan), --color-accent-secondary (emerald)
 * Cleaned (2026-04): Retired --s-* tokens → --story-* namespace + core token refs.
 */

.byr-story {
  /* Page-scoped tokens (unique to this post's always-dark glass design) */
  --story-accent-dim:      rgba(34, 211, 238, 0.65);
  --story-accent-purple:   #8B5CF6;
  --story-text-primary:    rgba(240, 240, 248, 0.94);
  --story-text-secondary:  rgba(220, 225, 245, 0.80);
  --story-text-muted:      rgba(180, 185, 210, 0.55);

  --story-glass-bg:        rgba(4, 10, 28, 0.88);
  --story-glass-card:      rgba(8, 16, 40, 0.72);

  --story-font-heading:    'Charter', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --story-font-body:       'Charter', 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;

  position: relative;
  padding: clamp(36px, 6vw, 80px) clamp(24px, 5vw, 72px);
  border-radius: var(--radius-xl);
  font-family: var(--story-font-body);
  font-size: var(--text-lg);
  line-height: 1.88;
  color: var(--story-text-primary);

  /* Always dark glass — never overridden */
  background:
    var(--story-glass-bg) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.55)  0%,
      rgba(255, 255, 255, 0.30) 35%,
      rgba(16, 185, 129, 0.50)  65%,
      rgba(139, 92, 246, 0.45)  100%
    ) border-box;
  border: 1.5px solid transparent;
  backdrop-filter: blur(18px) saturate(160%) brightness(0.88);
  -webkit-backdrop-filter: blur(18px) saturate(160%) brightness(0.88);
  box-shadow:
    0 12px 60px rgba(0, 0, 0, 0.65),
    0 0 100px rgba(34, 211, 238, 0.06) inset,
    0 0 1px  rgba(34, 211, 238, 0.25);
  overflow: visible;
}

/* Starfield glow halo */
.byr-story::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-xl);
  background: transparent;
  box-shadow:
    0 0  80px rgba(34, 211, 238, 0.08),
    0 0 160px rgba(139, 92, 246, 0.05);
  pointer-events: none;
  z-index: -1;
}

/* Decorative top chrome line */
.byr-story::after {
  content: "";
  position: absolute;
  top: 0; left: 6%; right: 6%;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.7)   20%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(16, 185, 129, 0.7)   80%,
    transparent 100%);
  pointer-events: none;
}


/* ── EYEBROW ── */
.byr-story .s-eyebrow {
  display: inline-block;
  font-family: var(--story-font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--story-accent-dim);
  margin: 0 0 1.2rem;
  padding: 5px 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-pill);
  background: rgba(34, 211, 238, 0.06);
}


/* ── HERO H1 ── */
.byr-story .s-h1 {
  font-family: var(--story-font-heading);
  font-size: var(--text-4xl);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 0.35em;
  background: linear-gradient(140deg,
    #FFFFFF      0%,
    #FFFFFF      20%,
    var(--color-accent-primary) 48%,
    #FFFFFF      76%,
    #FFFFFF      100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: s-shimmer 8s linear infinite;
}

@keyframes s-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}


/* ── SECTION HEADING H2 ── */
.byr-story .s-h2 {
  font-family: var(--story-font-heading);
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 3rem 0 1rem;
  color: var(--story-text-primary);
  background: linear-gradient(140deg,
    #FFFFFF 0%,
    #FFFFFF 40%,
    var(--color-accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── META LINE ── */
.byr-story .s-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--story-text-muted);
  margin-bottom: 3rem;
}

.byr-story .s-meta::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(34,211,238,0.3), transparent);
}


/* ── SECTION HEADING H3 ── */
.byr-story .s-h3 {
  font-family: var(--story-font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  font-style: italic;
  color: var(--color-accent-primary) !important;
  -webkit-text-fill-color: var(--color-accent-primary) !important;
  background: none !important;
  margin: 2.8rem 0 1.1rem;
  padding-left: 1.1rem;
  border-left: 2px solid rgba(34, 211, 238, 0.5);
  line-height: 1.3;
}


/* ── BODY PARAGRAPHS ── */
.byr-story .s-p {
  color: var(--story-text-secondary);
  margin: 0 0 1.5rem;
}

/* Drop cap — first paragraph only */
.byr-story .s-p.s-dropcap::first-letter {
  font-family: var(--story-font-heading);
  font-size: 4.6em;
  font-weight: 900;
  line-height: 0.72;
  float: left;
  margin: 0.05em 0.1em 0 0;
  background: linear-gradient(140deg, var(--color-accent-primary), var(--color-accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── PULL QUOTE ── */
.byr-story .s-pull {
  position: relative;
  margin: 2.5rem 0;
  padding: 2rem 2rem 2rem 2.5rem;
  background:
    rgba(34, 211, 238, 0.05) padding-box,
    linear-gradient(135deg,
      rgba(34, 211, 238, 0.45) 0%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(16, 185, 129, 0.38) 100%
    ) border-box;
  border: 1px solid transparent;
  border-left: 3px solid var(--color-accent-primary) !important;
  border-radius: 0 16px 16px 0;
  font-style: italic;
  font-size: 1.08em;
  color: rgba(240, 245, 255, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.byr-story .s-pull::before {
  content: "\201C";
  position: absolute;
  top: -0.5rem; left: 0.9rem;
  font-family: var(--story-font-heading);
  font-size: 6rem;
  line-height: 1;
  color: rgba(34, 211, 238, 0.18);
  pointer-events: none;
}


/* ── DIVIDER ── */
.byr-story .s-divider {
  display: block;
  text-align: center;
  font-size: 0.48rem;
  letter-spacing: 0.7em;
  margin: 3rem 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34,211,238,0.55)  25%,
    rgba(255,255,255,0.90) 50%,
    rgba(16,185,129,0.55)  75%,
    transparent 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── SYMPTOM LIST ── */
.byr-story .s-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.8rem;
}

.byr-story .s-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.9rem;
  color: var(--story-text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.byr-story .s-list li:last-child { border-bottom: none; }

.byr-story .s-list li::before {
  content: "◆";
  position: absolute;
  left: 0.1rem;
  top: 0.65rem;
  font-size: 0.48rem;
  color: var(--color-accent-primary);
  opacity: 0.75;
}


/* ── MEDICATIONS CARD ── */
.byr-story .s-meds-card {
  margin: 0.5rem 0 2rem;
  padding: 1.5rem 1.8rem;
  background:
    var(--story-glass-card) padding-box,
    linear-gradient(135deg,
      rgba(139, 92, 246, 0.45) 0%,
      rgba(255,255,255,0.15)   50%,
      rgba(34, 211, 238, 0.35) 100%
    ) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.byr-story .s-meds-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--story-accent-purple);
  opacity: 0.85;
  margin-bottom: 1rem;
}

.byr-story .s-meds-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.55rem 1.5rem;
}

.byr-story .s-meds-list li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  font-size: 0.92em;
  color: rgba(220, 225, 245, 0.85);
  padding: 0.2rem 0;
}

.byr-story .s-meds-list li::before {
  content: "Rx";
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--story-accent-purple);
  opacity: 0.7;
  padding: 1px 5px;
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: var(--radius-xs);
  line-height: 1.6;
}


/* ── SCAN RESULTS CARDS ── */
.byr-story .s-scans-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.byr-story .s-scans-list li {
  position: relative;
  padding: 1rem 1.2rem 1rem 3.2rem;
  background: rgba(34, 211, 238, 0.04);
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: var(--radius-md);
  color: var(--story-text-secondary);
  font-size: 0.95em;
  line-height: 1.7;
}

.byr-story .s-scans-list li .s-scan-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--story-accent-dim);
  margin-bottom: 0.3rem;
}

.byr-story .s-scans-list li::before {
  content: attr(data-icon);
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xl);
  opacity: 0.55;
}


/* ── SIGNATURE ── */
.byr-story .s-sign {
  margin-top: 4rem;
  padding-top: 2.5rem;
  position: relative;
  text-align: center;
}

.byr-story .s-sign::before {
  content: "";
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(34,211,238,0.45)  30%,
    rgba(16,185,129,0.40)  70%,
    transparent);
}

.byr-story .s-sign-thanks {
  font-family: var(--story-font-heading);
  font-style: italic;
  font-size: var(--text-lg);
  color: rgba(240, 245, 255, 0.7);
  margin-bottom: 1.2rem;
}

.byr-story .s-sign-name {
  display: inline-block;
  font-family: var(--story-font-heading);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg,
    #FFFFFF 0%, var(--color-accent-primary) 50%, #FFFFFF 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: s-shimmer 8s linear infinite;
  margin-bottom: 0.35rem;
}

.byr-story .s-sign-place {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--story-text-muted);
}

/* Quit smoking highlight */
.byr-story .s-highlight {
  color: var(--color-accent-primary);
  font-weight: 600;
}


/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .byr-story {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .byr-story .s-p.s-dropcap::first-letter {
    font-size: 3.4em;
  }
  .byr-story .s-meds-list {
    grid-template-columns: 1fr;
  }
  .byr-story .s-pull {
    padding: 1.2rem 1.2rem 1.2rem 1.6rem;
  }
  .byr-story .s-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .byr-story .s-meta::after { display: none; }
}
