/* Shared design system for secondary pages (legal, blog).
   Mirrors the tokens and core components defined inline in index.html. */

:root {
  --violet: #7C3AED;
  --violet-ink: #4C1D95;
  --violet-soft: #F1E9FE;
  --violet-soft-2: #E9DCFC;
  --cream: #FBF7F1;
  --cream-2: #F3ECE1;
  --white: #FFFFFF;
  --ink: #2A2438;
  --ink-2: #554F68;
  --muted: #8B849A;
  --error: #B91C1C;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(42,36,56,.06);
  --shadow-md: 0 12px 28px -8px rgba(124,58,237,.18), 0 2px 8px rgba(42,36,56,.05);
  --shadow-lg: 0 24px 48px -16px rgba(124,58,237,.22), 0 4px 12px rgba(42,36,56,.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1 { font-weight: 800; font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.12; letter-spacing: -0.015em; margin: 40px 0 16px; }
h3 { font-weight: 700; font-size: 1.15rem; margin: 24px 0 8px; }
p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.7; }
ul, ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-2); line-height: 1.7; }
li { margin-bottom: 6px; }
a { color: var(--violet-ink); text-decoration: none; border-bottom: 1.5px solid var(--violet-soft-2); }
a:hover { border-bottom-color: var(--violet); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 680px) { .wrap { padding: 0 20px; } }
.prose { max-width: 68ch; margin: 0 auto; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border: 1px solid var(--cream-2);
  border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink);
  font-family: inherit; font-size: .98rem; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background-color .18s, color .18s, border-color .18s, transform .18s ease-out, box-shadow .18s ease-out;
  text-decoration: none; border-bottom: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--violet-soft-2); }
.btn.solid { background: var(--violet); border-color: var(--violet); color: white; box-shadow: var(--shadow-md); }
.btn.solid:hover { background: var(--violet-ink); border-color: var(--violet-ink); color: white; }
.btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Nav */
.masthead { position: sticky; top: 0; z-index: 50; background: rgba(251,247,241,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--cream-2); }
.masthead-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; max-width: 1200px; margin: 0 auto; padding: 14px 40px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); border-bottom: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--violet); color: var(--white); font-weight: 800; font-size: .85rem; }
.nav-links { display: flex; justify-content: center; gap: 8px; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--ink-2); border-bottom: none; padding: 8px 12px; border-radius: 999px; transition: background-color .15s, color .15s; }
.masthead-inner .btn.solid { padding: 10px 20px; font-size: .92rem; border-width: 0; line-height: 20px; min-height: 44px; }
.nav-links a:hover, .nav-links a.active { color: var(--violet-ink); background: var(--violet-soft); }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--cream-2); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; position: relative; justify-self: end; box-shadow: var(--shadow-sm); }
.nav-toggle-bars { position: absolute; left: 13px; right: 13px; top: 21px; height: 1.5px; border-radius: 2px; background: var(--ink); }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: var(--ink); }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.mobile-nav { display: none; background: var(--cream); border-bottom: 1px solid var(--cream-2); }
.mobile-nav[hidden] { display: none; }
.mobile-nav-inner { display: flex; flex-direction: column; padding: 8px 20px 24px; gap: 4px; }
.mobile-nav a { display: block; padding: 14px 16px; font-size: 1.05rem; font-weight: 500; color: var(--ink); border-radius: var(--radius-sm); border-bottom: none; }
.mobile-nav a:hover { background: var(--violet-soft); color: var(--violet-ink); }
.mobile-nav .btn.solid { margin-top: 16px; justify-content: center; }

@media (max-width: 900px) {
  .masthead-inner { grid-template-columns: auto auto; padding: 10px 20px; gap: 16px; }
  .nav-links { display: none; }
  .masthead-inner > a.btn.solid { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav.open { display: block; }
}

/* Page header band */
.page-header { padding: 64px 0 48px; }
.page-header .eyebrow { display: inline-block; font-weight: 600; font-size: .85rem; color: var(--violet-ink); background: var(--violet-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; border-bottom: none; }

section { padding: 0 0 80px; }

/* Footer */
footer { background: var(--ink); color: var(--cream); padding: 64px 0 28px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; margin-top: 24px; }
.colophon { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 56px; margin-bottom: 48px; }
.colophon-brand { font-weight: 800; font-size: 1.7rem; line-height: 1; }
.colophon-tag { margin-top: 16px; font-size: .95rem; color: rgba(251,247,241,.72); max-width: 36ch; line-height: 1.5; }
footer h4 { font-size: .8rem; font-weight: 700; color: rgba(251,247,241,.6); margin: 0 0 18px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer ul li { padding: 6px 0; }
footer ul li a { color: var(--cream); font-size: .96rem; border-bottom: 1px solid transparent; }
footer ul li a:hover { border-bottom-color: var(--violet); }
.colo-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(251,247,241,.15); font-weight: 500; font-size: .82rem; color: rgba(251,247,241,.5); flex-wrap: wrap; }
@media (max-width: 820px) { .colophon { grid-template-columns: 1fr; gap: 36px; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
