/* Havstock Members. Tokens from projects/havstock/marketing/DESIGN.md (Geist, greyscale). */
:root {
  --bg: #0a0a0a;
  --card: #141414;
  --subtle: #1a1a1a;
  --text: #ededed;
  --muted: #a0a0a0;
  --faint: #737373;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --btn: #ededed;
  --btn-text: #0a0a0a;
  --ok: #22c55e;
  --warn: #f59e0b;
  --err: #ef4444;
  --r: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.6 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--text); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.02em; overflow-wrap: break-word; }
h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 600; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--faint); font-weight: 400; margin-left: -4px; }
.mark { width: 28px; height: 28px; padding: 4px; background: #fafafa; border-radius: 6px; flex: none; }
.top-right { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); min-width: 0; }
.top-right .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.top-right .linkbtn { white-space: nowrap; }

/* Buttons and inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn); color: var(--btn-text); border: 0; border-radius: 6px;
  padding: 12px 22px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.full { width: 100%; }
.btn.big { padding: 16px 24px; font-size: 17px; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.btn.ghost:hover { color: var(--text); }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px; }
.linkbtn:hover { color: var(--text); }
label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
input[type=email], input[type=text] {
  width: 100%; background: var(--subtle); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px; padding: 12px 14px; font: inherit;
}
input:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--btn); }
.field { margin-bottom: 14px; }
.msg { font-size: 14px; margin-top: 10px; min-height: 1em; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }

/* Cards */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.course-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; }
.course-card .cover { aspect-ratio: 16 / 9; background: var(--subtle); position: relative; }
.course-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.course-card.locked .cover img { filter: grayscale(1) brightness(0.45); }
.lock { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.7); border: 1px solid var(--line-strong); border-radius: 9999px; padding: 4px 12px; font-size: 12px; font-weight: 500; }
.course-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card .body p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.bar { height: 4px; background: var(--subtle); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--text); }
.pill { display: inline-block; background: rgba(255, 255, 255, 0.06); border-radius: 9999px; padding: 4px 12px; font-size: 12px; font-weight: 500; color: var(--muted); }

/* Course page */
.course { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 28px 0 60px; }
.lessons { list-style: none; margin: 0; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); align-self: start; position: sticky; top: 16px; }
.lessons a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--muted); font-size: 15px; }
.lessons a:hover { background: var(--subtle); color: var(--text); }
.lessons a.on { background: var(--subtle); color: var(--text); }
.tick { flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 11px; }
.tick.done { background: var(--ok); border-color: var(--ok); color: #000; }
.video { aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.video iframe { width: 100%; height: 100%; border: 0; }
.lesson-body { max-width: 720px; }
.lesson-body h2 { margin-top: 28px; }
.lesson-body li { margin-bottom: 6px; }
.lesson-body a { text-decoration: underline; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; flex-wrap: wrap; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 440px; gap: 40px; padding: 40px 0 80px; align-items: start; }
.product-head { display: flex; gap: 18px; align-items: center; margin-bottom: 24px; }
.product-head img { width: 160px; border-radius: 6px; border: 1px solid var(--line); }
.bump { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 16px; margin-bottom: 12px; cursor: pointer; }
.bump.on { border-style: solid; border-color: var(--text); }
.bump input { margin-top: 4px; width: 20px; height: 20px; accent-color: #ededed; flex: none; }
.bump img { width: 72px; border-radius: 4px; flex: none; }
.bump .t { font-weight: 600; }
.bump .d { color: var(--muted); font-size: 14px; }
.lines { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; font-size: 15px; }
.lines div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--muted); }
.lines .total { color: var(--text); font-weight: 600; font-size: 18px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
#payment-element { margin: 6px 0 16px; }
.consent { font-size: 13px; color: var(--faint); margin-top: 12px; }
.trust { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--faint); margin-top: 14px; }

/* Offer page */
.offer { max-width: 760px; margin: 0 auto; padding: 48px 16px 80px; text-align: center; }
.offer .eyebrow { margin-bottom: 18px; }
.offer .sub { color: var(--muted); font-size: 20px; margin-bottom: 28px; }
.offer img.hero { border-radius: var(--r); border: 1px solid var(--line); margin: 0 auto 28px; }
.offer .points { text-align: left; max-width: 520px; margin: 0 auto 24px; }
.offer .price { font-size: 22px; font-weight: 600; margin: 8px 0 18px; }
.offer .actions { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* Login */
.login { min-height: calc(100vh - 61px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-side { display: flex; flex-direction: column; justify-content: center; padding: 64px 48px; }
.login-form { width: 100%; max-width: 400px; margin: 0 auto; }
.login-form h1 { font-size: clamp(30px, 3.2vw, 40px); letter-spacing: -0.03em; margin-bottom: 14px; text-wrap: balance; }
.login-form .lead { color: var(--muted); font-size: 17px; margin-bottom: 32px; text-wrap: pretty; }
.login-form .pill { margin-bottom: 20px; }
.login-form .btn { padding: 14px 22px; margin-top: 4px; }
.login-form .btn svg { transition: transform 0.15s ease; }
.login-form .btn:not(:disabled):hover svg { transform: translateX(2px); }
.login-form input::placeholder { color: var(--faint); }
.login-note { display: flex; gap: 10px; align-items: flex-start; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: 14px; color: var(--faint); text-wrap: pretty; }
.login-note svg { flex: none; margin-top: 2px; }
.sent-icon { width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; margin-bottom: 24px; color: var(--text); }
.login-art { position: relative; overflow: hidden; display: flex; align-items: center; border-left: 1px solid var(--line);
  background: radial-gradient(55% 45% at 45% 50%, rgba(255, 255, 255, 0.07), transparent 70%), var(--card); }
.login-art::before { content: ''; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent); mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent); }
.login-art .caption { position: absolute; left: 0; right: 0; bottom: 32px; margin: 0; text-align: center; font-size: 14px; color: var(--muted); padding: 0 24px; }

/* Portal mockup on the login page. Pure HTML, no real data. */
.mock { position: relative; flex: none; width: 680px; margin-left: 56px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6); font-size: 12px; color: var(--muted); }
.mock-bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.mock-bar > i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2a; }
.mock-url { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto; transform: translateX(-20px); padding: 3px 12px; border-radius: 6px; background: var(--subtle); color: var(--faint); font-size: 11px; }
.mock-url svg { width: 11px; height: 11px; }
.mock-body { display: grid; grid-template-columns: 196px 1fr; }
.mock-side { padding: 18px 12px; border-right: 1px solid var(--line); }
.mock-course { color: var(--text); font-weight: 600; font-size: 13px; padding: 0 8px; }
.mock-prog { height: 3px; background: var(--subtle); border-radius: 3px; margin: 10px 8px 6px; overflow: hidden; }
.mock-prog b { display: block; height: 100%; width: 34%; background: var(--text); animation: mock-fill 1.2s 0.4s ease-out both; }
.mock-meta { font-size: 11px; color: var(--faint); padding: 0 8px; margin-bottom: 14px; }
.mock-side ul { list-style: none; margin: 0; padding: 0; }
.mock-side li { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 6px; }
.mock-side li.on { background: var(--subtle); color: var(--text); }
.mock-side .dot { flex: none; width: 14px; height: 14px; display: grid; place-items: center; }
.mock-side .dot::after { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-strong); }
.mock-side li.on .dot::after { background: var(--text); border-color: var(--text); width: 7px; height: 7px; }
.mock-side li.done .dot { color: var(--ok); }
.mock-side li.done .dot::after { display: none; }
.mock-main { padding: 18px; }
.mock-video { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; border: 1px solid var(--line);
  background: radial-gradient(70% 70% at 50% 40%, #262626, #0f0f0f); display: grid; place-items: center; }
.mock-play { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); display: grid; place-items: center; color: #0a0a0a; }
.mock-time { position: absolute; left: 14px; right: 14px; bottom: 12px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.mock-time b { display: block; height: 100%; width: 38%; background: #fff; }
.mock-title { color: var(--text); font-size: 15px; font-weight: 600; margin: 16px 0 10px; letter-spacing: -0.01em; }
.mock-lines i { display: block; height: 6px; border-radius: 3px; background: var(--subtle); margin-bottom: 8px; }
.mock-dl { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--text); }
.mock-toast { position: absolute; left: -28px; bottom: -26px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); animation: mock-in 0.5s 1.4s ease-out both; }
.mock-toast svg { color: var(--ok); flex: none; }
.mock-toast b { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.mock-toast span { font-size: 12px; color: var(--faint); }
@keyframes mock-fill { from { width: 0; } }
@keyframes mock-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .mock-prog b, .mock-toast { animation: none; } }
@media (max-width: 1180px) { .mock { width: 600px; margin-left: 40px; } .mock-body { grid-template-columns: 168px 1fr; } }

.center { min-height: 70vh; display: grid; place-items: center; padding: 40px 16px; }
.narrow { width: 100%; max-width: 420px; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-top-color: var(--text); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

@media (max-width: 860px) {
  .checkout, .course { grid-template-columns: 1fr; gap: 24px; }
  .lessons { position: static; }
  .product-head img { width: 110px; }
  .offer .sub { font-size: 17px; }
  .top-right .email { display: none; }
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-side { padding: 56px 16px 72px; justify-content: flex-start; }
  .login-art { display: none; }
}
