/* =========================================================
   HDHH — Peptide Protocol Guidance
   Shared stylesheet (landing + advisor + funnel)
   ========================================================= */

:root {
  --bg: #0b0f17;
  --bg-soft: #111726;
  --bg-card: #141b2c;
  --bg-elev: #182135;
  --line: #24304a;
  --line-soft: #1c2740;
  --text: #eaf0fb;
  --text-dim: #a7b2c8;
  --text-mut: #7f8aa3;
  --brand: #4de1c1;
  --brand-2: #6aa6ff;
  --brand-ink: #052723;
  --accent: #b98bff;
  --warn: #ffcf6b;
  --danger: #ff8080;
  --ok: #6be6a1;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -25px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 10px 30px -18px rgba(0, 0, 0, 0.65);
  --maxw: 1160px;
  --grad: linear-gradient(120deg, var(--brand), var(--brand-2));
  --grad-soft: linear-gradient(120deg, rgba(77, 225, 193, 0.16), rgba(106, 166, 255, 0.16));
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(106, 166, 255, 0.12), transparent 60%),
    radial-gradient(1000px 600px at -10% 10%, rgba(77, 225, 193, 0.10), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--text-dim); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); background: var(--grad-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 13px; --pad-x: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: var(--pad-y) var(--pad-x); border-radius: 999px; font-weight: 650; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); color: var(--brand-ink); box-shadow: 0 12px 30px -12px rgba(77, 225, 193, .6); }
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(77, 225, 193, .8); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: #fff; background: rgba(255,255,255,0.02); }
.btn-lg { --pad-y: 16px; --pad-x: 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(11, 15, 23, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; letter-spacing: -0.02em; font-size: 1.12rem; color: #fff; }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: var(--brand-ink); font-weight: 800; box-shadow: var(--shadow-soft); }
.brand small { display: block; font-size: 0.64rem; letter-spacing: 0.18em; color: var(--text-mut); font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-dim); font-size: 0.94rem; font-weight: 550; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 10px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 74px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; }
.hero h1 { margin-top: 18px; }
.hero .lead { font-size: 1.18rem; color: var(--text-dim); max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 22px; color: var(--text-mut); font-size: 0.88rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 8px; }
.tick { color: var(--brand); }

/* Hero visual — advisor card mock */
.hero-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow); position: relative;
}
.hero-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(120deg, rgba(77,225,193,.5), rgba(106,166,255,.3), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.hc-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.hc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(107,230,161,.15); }
.hc-title { font-weight: 650; font-size: 0.95rem; }
.hc-sub { color: var(--text-mut); font-size: 0.8rem; }
.bubble { border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 0.92rem; max-width: 88%; }
.bubble.user { margin-left: auto; background: var(--grad); color: var(--brand-ink); border-bottom-right-radius: 4px; font-weight: 550; }
.bubble.bot { background: var(--bg-elev); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; color: var(--text); }
.bubble.bot b { color: #fff; }
.hc-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--text-mut); font-size: 0.78rem; }

/* ---------- Marquee / trust bar ---------- */
.stripe { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: rgba(255,255,255,0.015); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 26px 0; text-align: center; }
.stat .n { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 750; color: #fff; letter-spacing: -0.03em; }
.stat .l { color: var(--text-mut); font-size: 0.86rem; }

/* ---------- Sections ---------- */
section { padding: 68px 0; }
.section-head { max-width: 62ch; margin: 0 auto 40px; text-align: center; }
.section-head p { font-size: 1.06rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step .num { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 750; color: var(--brand-ink); background: var(--grad); margin-bottom: 14px; }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; font-size: 0.95rem; }

/* Peptide cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pcard { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .16s ease, border-color .2s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--brand); }
.pcard .tag { font-size: 0.72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.pcard h3 { margin: 8px 0 4px; }
.pcard .goal { color: var(--text-mut); font-size: 0.82rem; margin-bottom: 10px; }
.pcard p { font-size: 0.92rem; margin-bottom: 14px; }
.pcard ul { margin: 0 0 4px; padding-left: 18px; color: var(--text-dim); font-size: 0.88rem; }
.pcard ul li { margin-bottom: 4px; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 26px; display: flex; flex-direction: column; position: relative; }
.price.pop { border-color: var(--brand); box-shadow: var(--shadow); background: linear-gradient(180deg, var(--bg-elev), var(--bg-card)); }
.price .badge { position: absolute; top: -12px; left: 26px; background: var(--grad); color: var(--brand-ink); font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.price .plan { font-weight: 650; font-size: 1.1rem; }
.price .cost { font-size: 2.6rem; font-weight: 780; color: #fff; letter-spacing: -0.03em; margin: 8px 0 2px; }
.price .cost small { font-size: 0.9rem; color: var(--text-mut); font-weight: 500; }
.price .desc { color: var(--text-mut); font-size: 0.9rem; margin-bottom: 16px; }
.price ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.price li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; color: var(--text-dim); }
.price li .tick { margin-top: 2px; }
.price .btn { margin-top: auto; }

/* Advisor CTA band */
.band { background: linear-gradient(120deg, rgba(77,225,193,.10), rgba(106,166,255,.10)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 26px; align-items: center; }
.band h2 { margin-bottom: 8px; }
.band .btnrow { display: flex; gap: 12px; flex-wrap: wrap; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.quote p { color: var(--text); font-size: 0.96rem; }
.quote .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-soft); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--brand); }
.quote .who b { display: block; font-size: 0.92rem; color: #fff; }
.quote .who span { font-size: 0.8rem; color: var(--text-mut); }
.stars { color: var(--warn); letter-spacing: 2px; font-size: 0.9rem; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 12px; background: var(--bg-card); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: #fff; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 0 14px; font-size: 0.95rem; }

/* Lead capture */
.lead { background: linear-gradient(180deg, var(--bg-elev), var(--bg-card)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; text-align: center; box-shadow: var(--shadow); }
.lead form { display: flex; gap: 10px; max-width: 480px; margin: 20px auto 10px; }
.lead input[type=email] { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 14px 18px; font-size: 0.98rem; font-family: inherit; }
.lead input[type=email]:focus { outline: none; border-color: var(--brand); }
.lead .fineprint { color: var(--text-mut); font-size: 0.8rem; }
.form-msg { min-height: 20px; font-size: 0.9rem; margin-top: 8px; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }

/* Disclaimer */
.disclaimer { border: 1px solid var(--line); border-left: 3px solid var(--warn); background: rgba(255,207,107,0.05); border-radius: var(--radius-sm); padding: 18px 20px; color: var(--text-dim); font-size: 0.88rem; }
.disclaimer b { color: var(--warn); }

/* Footer */
footer { border-top: 1px solid var(--line-soft); padding: 50px 0 30px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.foot-grid h4 { font-size: 0.82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); }
.foot-grid a { display: block; color: var(--text-dim); font-size: 0.92rem; margin-bottom: 9px; }
.foot-grid a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--text-mut); font-size: 0.82rem; flex-wrap: wrap; }

/* Utility */
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.muted { color: var(--text-mut); }
.hide { display: none !important; }

/* =========================================================
   Advisor page
   ========================================================= */
.advisor-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 22px; padding: 26px 0 48px; align-items: start; }
.side { position: sticky; top: 90px; display: grid; gap: 16px; }
.panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel h3 { font-size: 0.95rem; margin-bottom: 12px; }
.goal-btn { display: block; width: 100%; text-align: left; background: var(--bg-elev); border: 1px solid var(--line-soft); color: var(--text-dim); border-radius: 10px; padding: 11px 13px; font-size: 0.9rem; margin-bottom: 8px; cursor: pointer; font-family: inherit; transition: border-color .15s, color .15s; }
.goal-btn:hover { border-color: var(--brand); color: #fff; }
.side .disclaimer { font-size: 0.8rem; }

.chat { background: linear-gradient(180deg, var(--bg-soft), var(--bg-card)); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; height: calc(100vh - 130px); min-height: 560px; overflow: hidden; box-shadow: var(--shadow); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.chat-head .hc-dot { flex: none; }
.chat-head .meta b { color: #fff; font-size: 0.98rem; }
.chat-head .meta span { color: var(--text-mut); font-size: 0.8rem; }
.chat-head .status { margin-left: auto; font-size: 0.76rem; color: var(--text-mut); display: inline-flex; align-items: center; gap: 7px; }

.messages { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.msg { display: flex; gap: 12px; max-width: 92%; }
.msg .who { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; font-weight: 750; font-size: 0.78rem; }
.msg.bot .who { background: var(--grad); color: var(--brand-ink); }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg.user .who { background: var(--bg-elev); border: 1px solid var(--line); color: var(--text-dim); }
.msg .body { border-radius: 14px; padding: 12px 15px; font-size: 0.95rem; }
.msg.bot .body { background: var(--bg-elev); border: 1px solid var(--line-soft); border-top-left-radius: 4px; }
.msg.user .body { background: var(--grad); color: var(--brand-ink); border-top-right-radius: 4px; font-weight: 500; }
.msg .body p { color: inherit; margin: 0 0 0.6em; }
.msg .body p:last-child { margin-bottom: 0; }
.msg .body strong { color: #fff; }
.msg.user .body strong { color: var(--brand-ink); }
.msg .body ul, .msg .body ol { margin: 6px 0; padding-left: 20px; color: inherit; }
.msg .body li { margin-bottom: 4px; }
.msg .body code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 5px; font-size: 0.86em; }

.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .5; animation: blink 1.2s infinite; }
.typing i:nth-child(2){ animation-delay: .2s; } .typing i:nth-child(3){ animation-delay: .4s; }
@keyframes blink { 0%,100%{ opacity:.25; transform: translateY(0);} 50%{ opacity:1; transform: translateY(-2px);} }

.composer { border-top: 1px solid var(--line-soft); padding: 14px; display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 12px 14px; font-size: 0.96rem; font-family: inherit; line-height: 1.5; max-height: 160px; }
.composer textarea:focus { outline: none; border-color: var(--brand); }
.composer .send { flex: none; width: 46px; height: 46px; border-radius: 12px; border: none; background: var(--grad); color: var(--brand-ink); cursor: pointer; display: grid; place-items: center; }
.composer .send:disabled { opacity: .5; cursor: not-allowed; }
.chat-disc { text-align: center; font-size: 0.76rem; color: var(--text-mut); padding: 0 14px 12px; }

/* Attachments */
.attach-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; }
.attach-row:empty { display: none; }
.thumb { position: relative; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-elev); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.thumb .sz { position: absolute; bottom: 0; left: 0; right: 0; font-size: 0.6rem; text-align: center; background: rgba(0,0,0,.55); color: #cfe; padding: 1px 0; }
.attach-btn { flex: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text-dim); cursor: pointer; display: grid; place-items: center; }
.attach-btn:hover { border-color: var(--brand); color: #fff; }
.msg .body .imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.msg .body .imgs img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-soft); }
.note-inline { font-size: 0.82rem; color: var(--warn); margin-top: 6px; display: block; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { background: var(--bg-elev); border: 1px solid var(--line-soft); color: var(--text-dim); border-radius: 999px; padding: 8px 14px; font-size: 0.85rem; cursor: pointer; font-family: inherit; transition: border-color .15s, color .15s; }
.chip:hover { border-color: var(--brand); color: #fff; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .steps, .cards, .pricing, .quotes { grid-template-columns: 1fr 1fr; }
  .band { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .advisor-wrap { grid-template-columns: 1fr; }
  .side { position: static; grid-template-columns: 1fr 1fr; display: grid; }
  .chat { height: 70vh; }
}
@media (max-width: 680px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 8px 22px 16px; }
  .nav.open .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .steps, .cards, .pricing, .quotes, .foot-grid { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr; }
  .lead form { flex-direction: column; border-radius: 16px; }
  .lead input[type=email] { text-align: center; }
  section { padding: 52px 0; }
  .band, .lead { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
