/* R2RFX — The Rags to Riches Project. One stylesheet for the whole site. */
:root {
  --ink: #14100c;
  --panel: rgba(16, 12, 8, 0.86);
  --panel-solid: #1c1610;
  --paper: #faf5ec;
  --cream: #f3ead9;
  --gold: #d9a441;
  --gold-dark: #b4832c;
  --rust: #b4552d;
  --line: rgba(217, 164, 65, 0.35);
  --muted: #cbbfa9;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, .sans { font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif; }

a { color: var(--gold); }
a:hover { color: #eec26a; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 12, 8, 0.94);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.wordmark {
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  font-weight: 800; letter-spacing: 2px; font-size: 1.35rem;
  color: var(--cream); text-decoration: none;
}
.wordmark span { color: var(--gold); }
.main-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.main-nav a {
  color: var(--cream); text-decoration: none; font-size: 0.95rem;
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold); }

/* ---------- hero (front page) ---------- */
.hero {
  min-height: 92vh;
  background: url("/assets/img/r2rfx-road.jpg") center 62% / cover no-repeat scroll;
  display: flex; align-items: center;
  padding: 48px 0;
}
.hero .wrap { width: 100%; display: flex; justify-content: flex-end; }
.hero-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 34px 28px;
  max-width: 620px;
  margin-left: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
.hero-formula {
  text-align: center; font-size: 1.2rem; margin: 18px 0 16px; color: #fff;
}
.hero-formula small { color: var(--gold); font-size: 0.95rem; }
.podcast-banner {
  display: block; background: var(--gold); color: #20180a;
  text-align: center; padding: 15px 20px; text-decoration: none;
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif; font-size: 1.05rem;
}
.podcast-banner:hover { background: #eec26a; color: #20180a; }
.podcast-banner .pb-arrow { font-weight: 700; white-space: nowrap; }
.hero h1 {
  margin: 0 0 2px; font-size: 3.4rem; letter-spacing: 6px; line-height: 1.05;
}
.hero h1 span { color: var(--gold); }
.hero .project {
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  font-size: 1.25rem; color: var(--gold); margin: 0 0 14px; letter-spacing: 1px;
}
.tagline {
  font-size: 1.15rem; font-style: italic; color: #fff; margin: 0 0 18px;
}
.hero p { margin: 0 0 14px; }
.hero .btn-row { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  font-weight: 700; font-size: 1rem;
  background: var(--gold); color: #20180a;
  border: 1px solid var(--gold);
  padding: 11px 22px; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #eec26a; color: #20180a; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: rgba(217, 164, 65, 0.15); }
.btn.small { padding: 7px 16px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.55; cursor: wait; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: #1a140e; }
.section h2 {
  font-size: 2rem; margin: 0 0 8px; color: #fff;
}
.section h2 .accent { color: var(--gold); }
.section .lede { font-size: 1.1rem; color: var(--muted); max-width: 46em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 26px; }
.card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin: 0 0 6px; color: var(--gold); font-size: 1.1rem; }
.card p { margin: 0; color: var(--cream); font-size: 0.98rem; }
.formula {
  font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  font-size: 1.3rem; text-align: center; color: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 26px 0; background: var(--panel-solid);
}
.chapters { columns: 2; column-gap: 40px; margin-top: 14px; }
.chapters li { margin-bottom: 8px; break-inside: avoid; }
.big-quote {
  font-size: 1.5rem; font-style: italic; color: #fff;
  border-left: 4px solid var(--gold); padding-left: 18px; margin: 30px 0 6px;
}

/* ---------- forms ---------- */
form .field { margin-bottom: 16px; }
label { display: block; font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif; font-size: 0.95rem; margin-bottom: 6px; color: #fff; }
label .req { color: var(--gold); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid #57492f; background: #100c08; color: var(--cream);
  font: inherit; font-size: 1rem;
}
input:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
textarea { min-height: 110px; resize: vertical; }
.form-note { color: var(--muted); font-size: 0.92rem; }
.form-status { margin-top: 14px; min-height: 1.4em; }
.form-status.ok { color: #9ed08a; }
.form-status.err { color: #f0957a; }
.radio-row { display: flex; gap: 22px; }
.radio-row label { display: flex; gap: 8px; align-items: center; font-family: inherit; color: var(--cream); }

/* ---------- chat ---------- */
.chat-shell {
  display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start;
}
.chat-box {
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column;
  height: 640px; max-height: 78vh;
}
.chat-log { flex: 1; overflow-y: auto; padding: 18px; }
.msg { max-width: 85%; padding: 11px 15px; border-radius: 14px; margin-bottom: 12px; white-space: pre-wrap; }
.msg.assistant { background: #2a2115; border: 1px solid var(--line); margin-right: auto; }
.msg.user { background: var(--gold); color: #20180a; margin-left: auto; }
.msg.system { background: transparent; border: 1px dashed var(--line); color: var(--muted); margin-right: auto; font-size: 0.93rem; }
.chat-input { display: flex; gap: 10px; border-top: 1px solid var(--line); padding: 12px; }
.chat-input textarea { min-height: 48px; max-height: 120px; flex: 1; }
.side-panel { background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side-panel h3 { color: var(--gold); margin-top: 0; }
.side-panel ul { padding-left: 18px; margin: 8px 0; }

/* ---------- premium tools ---------- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 18px 0; }
.score-card { background: var(--panel-solid); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.score-card .num { font-size: 2.4rem; font-family: "Trebuchet MS", sans-serif; color: var(--gold); }
.scale { display: flex; gap: 8px; margin: 6px 0 14px; }
.scale button {
  flex: 1; padding: 9px 0; border-radius: 8px; cursor: pointer;
  border: 1px solid #57492f; background: #100c08; color: var(--cream);
  font-family: "Trebuchet MS", sans-serif; font-size: 0.95rem;
}
.scale button[aria-pressed="true"] { background: var(--gold); color: #20180a; border-color: var(--gold); font-weight: 700; }
.report-box {
  background: #100c08; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; white-space: pre-wrap; font-size: 0.98rem;
}
.tool-block { margin-bottom: 42px; }
.hidden { display: none !important; }

/* ---------- events ---------- */
.calendar-frame {
  width: 100%; height: 640px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: #100c08;
  padding: 34px 0; color: var(--muted); font-size: 0.95rem;
}
.site-footer .tagline { color: var(--cream); font-size: 1.05rem; }
.site-footer a { color: var(--gold); }

@media (max-width: 820px) {
  .hero { background-attachment: scroll; }
  .hero h1 { font-size: 2.4rem; letter-spacing: 3px; }
  .chat-shell { grid-template-columns: 1fr; }
  .chapters { columns: 1; }
  .hero-panel { padding: 24px 20px; }
}
