@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800;14..32,900&display=swap");

/* ============================================================
   InsideHer · Course Reader — flagship learning experience
   (2026-06-30). For long-form courses: sticky module nav with
   scroll-spy + progress, module panels with visual rhythm,
   colour-coded callouts. Pairs with insideher-course.js.
   ============================================================ */

:root {
  --indigo: #5B4FE5;
  --violet: #A24DC6;
  --mauve: #c277d8;
  --rose: #E94BA8;
  --pink: #f085b7;
  --gradient: linear-gradient(105deg, #5B4FE5 0%, #A24DC6 42%, #E94BA8 100%);

  --ink: #15110d;
  --body: #574e45;
  --muted: #8b8175;
  --faint: #b6ab9d;

  --paper: #efe9e1;
  --paper-2: #e7e0d6;
  --card: #fffdfa;
  --lilac: #f3eef9;
  --plum: #171019;
  --plum-2: #0f0a14;

  --eyebrow: #5B4FE5;
  --label: #a24dc6;

  --line: rgba(21, 17, 13, 0.10);
  --line-2: rgba(21, 17, 13, 0.06);
  --line-dk: rgba(250, 246, 240, 0.14);

  --sh-sm: 0 1px 2px rgba(21, 17, 13, 0.05);
  --sh: 0 2px 6px rgba(21, 17, 13, 0.05), 0 22px 48px rgba(21, 17, 13, 0.08);
  --sh-lg: 0 4px 10px rgba(21, 17, 13, 0.06), 0 48px 90px rgba(21, 17, 13, 0.14);
  --sh-glow: 0 24px 60px rgba(162,77,198, 0.30);

  --r: 18px;
  --r-lg: 28px;
  --r-xl: 36px;
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  font-optical-sizing: auto; line-height: 1.6; font-size: 17px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(162,77,198, 0.22); }
*:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; border-radius: 6px; }

.wrap { width: min(100%, var(--maxw)); margin: 0 auto; padding-inline: clamp(20px, 4vw, 56px); }
.accent-text { background: var(--gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: var(--violet); }

/* ============================================================ TOP BAR */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(239, 233, 225, 0.82);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line-2);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 70px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-lockup__mark { width: 32px; height: 32px; object-fit: contain; flex: 0 0 auto; }
.brand-lockup__wordmark { height: 21px; width: auto; object-fit: contain; }
.topbar__nav { display: flex; align-items: center; gap: 26px; }
.topbar__nav a { color: var(--body); text-decoration: none; font-size: 0.93rem; font-weight: 500; transition: color 180ms var(--ease); }
.topbar__nav a:hover { color: var(--ink); }
.topbar__nav .nav-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 0.9rem;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.topbar__nav .nav-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--sh); }

/* ============================================================ BUTTONS */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; font-weight: 600; font-size: 0.98rem; cursor: pointer;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}
.button svg { width: 18px; height: 18px; transition: transform 240ms var(--ease); }
.button--primary { color: #fff; background: var(--gradient); box-shadow: var(--sh-glow); }
.button--primary:hover { transform: translateY(-3px); box-shadow: 0 30px 70px rgba(162,77,198,0.42); }
.button--primary:hover svg { transform: translateX(4px); }
.button--secondary { color: var(--ink); background: var(--card); border-color: var(--line); box-shadow: var(--sh-sm); }
.button--secondary:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.button--light { color: var(--ink); background: #fff; }
.button--light:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,0.2); }

/* ============================================================ COURSE HERO (dark, premium) */
.chero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 520px at 86% -12%, rgba(162,77,198,0.55), transparent 60%),
    radial-gradient(680px 480px at 4% 116%, rgba(240,133,183,0.42), transparent 60%),
    linear-gradient(157deg, #1e1529, var(--plum) 58%, var(--plum-2));
}
.chero::after { content:""; position:absolute; inset:0; background-image:var(--grain); background-size:180px; opacity:0.1; mix-blend-mode:overlay; pointer-events:none; }
.chero__inner { position: relative; padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 6vw, 72px); }
.chero__eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: rgba(255,255,255,0.72);
}
.chero__eyebrow::before { content:""; width: 22px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg,#fff,#f4c6e7); }
.chero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1; font-weight: 800; letter-spacing: -0.04em; max-width: 18ch; }
.chero h1 .accent-text { background: linear-gradient(100deg,#cdb8ff,#ffc2df); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.chero__sub { margin-top: 22px; max-width: 60ch; color: rgba(255,255,255,0.78); font-size: clamp(1.04rem, 1.4vw, 1.16rem); line-height: 1.62; }
.chero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.chero__meta {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: clamp(40px, 5vw, 60px); border-top: 1px solid var(--line-dk);
}
.chero__meta > div { padding: 24px clamp(18px,3vw,40px) 0 0; }
.chero__meta > div + div { border-left: 1px solid var(--line-dk); padding-left: clamp(18px,3vw,40px); }
.chero__meta dt { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.chero__meta div:first-child dt { background: linear-gradient(100deg,#cdb8ff,#ffc2df); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.chero__meta dd { margin-top: 9px; color: rgba(255,255,255,0.6); font-size: 0.84rem; }

/* ============================================================ READER LAYOUT */
.reader { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); align-items: start; }

/* sticky module rail */
.crail { position: sticky; top: 92px; }
.crail__card { border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh); padding: 24px 22px; }
.crail__kicker { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.crail__title { font-size: 1.06rem; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 18px; }
.crail__progress { height: 4px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin-bottom: 18px; }
.crail__progress span { display: block; height: 100%; width: 0; background: var(--gradient); transition: width 200ms linear; }

.course-nav .nav-card nav { display: grid; gap: 2px; }
.course-nav .nav-card nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none;
  color: var(--body); font-size: 0.9rem; font-weight: 550; line-height: 1.25;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.course-nav .nav-card nav a .ix {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 800; color: var(--muted);
  background: var(--paper); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.course-nav .nav-card nav a:hover { background: var(--lilac); color: var(--ink); }
.course-nav .nav-card nav a.is-active { background: var(--lilac); color: var(--ink); font-weight: 700; }
.course-nav .nav-card nav a.is-active .ix { background: var(--gradient); color: #fff; border-color: transparent; }
.crail__cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-top: 18px; height: 46px; border-radius: 999px; background: var(--gradient); color: #fff;
  font-weight: 600; font-size: 0.92rem; text-decoration: none; box-shadow: var(--sh-glow);
  transition: transform 220ms var(--ease);
}
.crail__cta:hover { transform: translateY(-2px); }

/* ============================================================ MODULES */
.modules { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 32px); }

.module {
  position: relative; scroll-margin-top: 92px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh);
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
}
.module::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--tone, var(--gradient));
}
.module:nth-child(odd) { background: linear-gradient(180deg, #fffdfa, #fdfbff); }
.module:nth-child(even) { background: linear-gradient(180deg, var(--lilac), #fdfaff); }

.module__head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: clamp(24px, 3vw, 36px); }
.module__num {
  flex: 0 0 auto; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; color: #fff;
  background: var(--tone, var(--gradient)); box-shadow: 0 12px 26px rgba(162,77,198,0.28);
  font-variant-numeric: tabular-nums;
}
.module__kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--label); margin-bottom: 8px; }
.module__title { font-size: clamp(1.7rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.module__intro { margin-top: 14px; color: var(--body); font-size: 1.06rem; line-height: 1.6; max-width: 60ch; }

.module__body { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.module__body--single { grid-template-columns: 1fr; }

.mcard { padding: 24px 24px; border-radius: var(--r); background: rgba(255,255,255,0.7); border: 1px solid var(--line-2); }
.module:nth-child(even) .mcard { background: rgba(255,255,255,0.82); }
.mcard h3 { font-size: 1.12rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.mcard p { margin-top: 10px; color: var(--body); font-size: 0.97rem; line-height: 1.58; }
.mcard__tag { display: inline-block; margin-bottom: 12px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }

/* highlighted callout cards */
.mcard--important, .mcard--note {
  grid-column: 1 / -1;
  position: relative;
  background: linear-gradient(135deg, rgba(91,79,229,0.10), rgba(233,75,168,0.10));
  border: 1px solid rgba(162,77,198,0.24);
}
.mcard--important .mcard__tag, .mcard--note .mcard__tag { color: var(--indigo); }
.mcard--important::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: var(--gradient);
}

/* steps (process modules) */
.msteps { display: grid; gap: 14px; }
.mstep { display: flex; gap: 20px; align-items: flex-start; padding: 22px 24px; border-radius: var(--r); background: rgba(255,255,255,0.7); border: 1px solid var(--line-2); }
.mstep__n { flex: 0 0 auto; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.mstep h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.mstep p { margin-top: 6px; color: var(--body); font-size: 0.97rem; line-height: 1.55; }

/* per-module accent tones (cycle) */
.module:nth-child(6n+1){ --tone: linear-gradient(150deg,#E94BA8,#f085b7); }
.module:nth-child(6n+2){ --tone: linear-gradient(150deg,#5B4FE5,#A24DC6); }
.module:nth-child(6n+3){ --tone: linear-gradient(150deg,#c277d8,#E94BA8); }
.module:nth-child(6n+4){ --tone: linear-gradient(150deg,#A24DC6,#c277d8); }
.module:nth-child(6n+5){ --tone: linear-gradient(150deg,#f085b7,#E94BA8); }
.module:nth-child(6n+6){ --tone: linear-gradient(150deg,#7d74dc,#5B4FE5); }

/* ============================================================ CLOSING */
.closing { padding: clamp(8px, 2vw, 16px) 0 clamp(56px, 8vw, 96px); }
.closing__card {
  position: relative; overflow: hidden; text-align: center;
  border-radius: var(--r-xl); padding: clamp(48px, 7vw, 88px) clamp(28px, 5vw, 64px);
  background: var(--gradient); color: #fff; box-shadow: var(--sh-glow);
}
.closing__card::after { content:""; position:absolute; inset:0; background-image:var(--grain); background-size:180px; opacity:0.12; mix-blend-mode:overlay; }
.closing__card h2 { position: relative; max-width: 22ch; margin: 0 auto; font-size: clamp(2rem,4vw,3rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; }
.closing__card p { position: relative; max-width: 52ch; margin: 18px auto 0; color: rgba(255,255,255,0.92); font-size: 1.06rem; line-height: 1.6; }
.closing__card .button { position: relative; margin-top: 30px; }

.foot { padding: 48px 0; text-align: center; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); }
.foot a { color: var(--violet); font-weight: 600; text-decoration: none; }

/* ============================================================ MOTION */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
[data-reveal][data-revealed="true"] { opacity: 1; transform: none; }
.progress-bar { position: fixed; inset: 0 0 auto 0; z-index: 100; height: 2px; background: transparent; }
.progress-bar__fill { width: 0; height: 100%; background: var(--gradient); }
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 48px; height: 48px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,250,0.92);
  color: var(--ink); box-shadow: var(--sh); cursor: pointer; font-size: 1.1rem; opacity: 0; pointer-events: none;
  backdrop-filter: blur(10px); transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.back-to-top[data-visible="true"] { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); }

/* ============================================================ RESPONSIVE */
@media (max-width: 960px) {
  .reader { grid-template-columns: 1fr; gap: 20px; }
  .crail { position: sticky; top: 70px; z-index: 30; }
  .crail__card { padding: 14px 16px; }
  .crail__title, .crail__progress, .crail__cta { display: none; }
  .course-nav .nav-card nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .course-nav .nav-card nav::-webkit-scrollbar { display: none; }
  .course-nav .nav-card nav a { white-space: nowrap; }
  .course-nav .nav-card nav a span:not(.ix) { display: none; }
  .course-nav .nav-card nav a .ix { width: 30px; height: 30px; }
  .module__body { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .topbar__nav .nav-link { display: none; }
  .chero__meta > div { flex: 1 1 45%; }
  .module__head { gap: 16px; }
  .module__num { width: 50px; height: 50px; font-size: 1.25rem; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ==================== PRINT FALLBACKS · 2026-07-01 ==================== */
@media print {
  .accent-text, .title-gradient, .grad-text {
    -webkit-text-fill-color: #4b3a9e !important; color: #4b3a9e !important; background: none !important;
  }
  .step__num, .proc__n, .mstep__n,
  .hero__stats dt, .hero__stats div:first-child dt, .chero__meta dt, .stats dt, .stats div:first-child dt {
    -webkit-text-fill-color: #15110d !important; color: #15110d !important; background: none !important;
  }
  .module__num {
    background: #4b3a9e !important; color: #fff !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .chero, .statement, .closing__card, .cta__card {
    background: #fff !important; color: #15110d !important; box-shadow: none !important;
  }
  .chero *, .statement *, .closing__card *, .cta__card * { color: #15110d !important; }
  .chero h1 .accent-text, .statement .grad-text, .closing__card .grad-text {
    -webkit-text-fill-color: #4b3a9e !important; color: #4b3a9e !important;
  }
  .crail, .back-to-top, .progress-bar { display: none !important; }
  .reader { grid-template-columns: 1fr !important; }
}
