/* ==========================================================================
   AI Ghost Writer — marketing design system
   Shared by every public page (legal, contact, errors, and — from Phase 1 —
   the home page, feature pages and blog). No framework: tokens + components.
   ========================================================================== */

:root {
  /* Ink (dark surfaces) */
  --ink-950: #07061a;
  --ink-900: #0c0a24;
  --ink-800: #141136;
  --ink-700: #1e1a4a;
  --ink-600: #2c2766;

  /* Paper (reading surfaces) */
  --paper: #fbf8f2;
  --paper-2: #f3eee4;
  --paper-line: #e6dfd1;

  /* Text */
  --text-on-ink: #f4f1ff;
  --muted-on-ink: #a9a3cf;
  --faint-on-ink: #6f6a99;
  --text-on-paper: #1b1830;
  --muted-on-paper: #5b5672;

  /* Brand — "ink to gold" */
  --violet: #8b6cff;
  --violet-2: #6d4bff;
  --magenta: #ff5fa8;
  --gold: #ffc56b;
  --mint: #5ce0b8;
  --grad-brand: linear-gradient(100deg, #8b6cff 0%, #c86bff 38%, #ff5fa8 68%, #ffc56b 100%);
  --grad-brand-soft: linear-gradient(100deg, rgba(139,108,255,.18), rgba(255,95,168,.14), rgba(255,197,107,.12));

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Shape & depth */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  --shadow-soft: 0 1px 2px rgba(10, 8, 30, .06), 0 8px 24px rgba(10, 8, 30, .08);
  --shadow-lift: 0 2px 4px rgba(10, 8, 30, .08), 0 24px 60px -12px rgba(10, 8, 30, .28);
  --shadow-glow: 0 0 0 1px rgba(139,108,255,.35), 0 10px 40px -8px rgba(139,108,255,.55);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 72px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-on-ink);
  background: var(--ink-950);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(139,108,255,.35); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.mk-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.mk-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mk-skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: var(--r-sm); background: #fff; color: var(--ink-900); font-weight: 600; }
.mk-skip:focus { top: 16px; }

/* ---------- Type ---------- */
.mk-display, h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; margin: 0; font-optical-sizing: auto; }
.mk-italic { font-style: italic; font-weight: 400; }
.mk-grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  background-size: 200% 100%;
  animation: mk-sheen 8s ease-in-out infinite alternate;
}
@keyframes mk-sheen { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.mk-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-on-ink);
  padding: 7px 14px 7px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
}
.mk-eyebrow .mk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(92,224,184,.18); }

/* ---------- Buttons ---------- */
.mk-btn {
  --btn-pad-y: 13px; --btn-pad-x: 22px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--r-pill); border: 0; cursor: pointer;
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em; line-height: 1.2;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.mk-btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.mk-btn:hover svg.mk-arrow { transform: translateX(3px); }
.mk-btn-primary {
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%), linear-gradient(100deg, var(--violet-2), #b35cff 55%, var(--magenta));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 28px -8px rgba(139,108,255,.9), 0 0 0 1px rgba(255,255,255,.08);
}
.mk-btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 16px 40px -10px rgba(255,95,168,.8), 0 0 0 1px rgba(255,255,255,.14); }
.mk-btn-primary:active { transform: translateY(0); }
.mk-btn-ghost { color: var(--text-on-ink); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); }
.mk-btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.26); transform: translateY(-2px); }
.mk-btn-light { color: var(--ink-900); background: #fff; box-shadow: 0 8px 24px -10px rgba(255,255,255,.5); }
.mk-btn-light:hover { transform: translateY(-2px); }
.mk-btn-sm { --btn-pad-y: 9px; --btn-pad-x: 16px; font-size: 14px; }
.mk-btn-lg { --btn-pad-y: 16px; --btn-pad-x: 28px; font-size: 16px; }
.mk-btn[disabled], .mk-btn.is-loading { opacity: .7; pointer-events: none; }

/* ---------- Navigation ---------- */
.mk-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.mk-nav.is-scrolled {
  background: rgba(9, 7, 28, .9);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: rgba(255,255,255,.07);
}
.mk-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.mk-brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.mk-logo { height: 30px; width: auto; }
.mk-brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 14px rgba(139,108,255,.55)); }
.mk-brand-name b { font-weight: 700; }
.mk-brand-name span { color: var(--muted-on-ink); font-weight: 500; }
.mk-nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mk-nav-links a {
  display: inline-block; padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 500; color: var(--muted-on-ink);
  transition: color .2s, background .2s;
}
.mk-nav-links a:hover, .mk-nav-links a[aria-current="page"] { color: var(--text-on-ink); background: rgba(255,255,255,.06); }
.mk-nav-cta { display: flex; align-items: center; gap: 10px; }
.mk-nav-login { font-size: 15px; font-weight: 500; color: var(--muted-on-ink); padding: 8px 12px; transition: color .2s; }
.mk-nav-login:hover { color: #fff; }
.mk-nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); cursor: pointer; align-items: center; justify-content: center; }
.mk-nav-toggle span, .mk-nav-toggle span::before, .mk-nav-toggle span::after { display: block; width: 18px; height: 1.5px; background: #fff; border-radius: 2px; position: relative; transition: transform .3s var(--ease-out), opacity .2s; }
.mk-nav-toggle span::before, .mk-nav-toggle span::after { content: ""; position: absolute; left: 0; }
.mk-nav-toggle span::before { top: -6px; }
.mk-nav-toggle span::after { top: 6px; }
.mk-nav.is-open .mk-nav-toggle span { background: transparent; }
.mk-nav.is-open .mk-nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.mk-nav.is-open .mk-nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .mk-nav-toggle { display: inline-flex; }
  .mk-nav-links, .mk-nav-cta .mk-nav-login { display: none; }
  .mk-nav.is-open { background: #0a0820; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mk-nav.is-open .mk-nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    padding: 12px var(--gutter) 24px;
    background: #0a0820; border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  }
  .mk-nav.is-open .mk-nav-links a { padding: 14px 12px; font-size: 17px; }
  .mk-nav.is-open .mk-nav-links .mk-nav-mobile-only { display: block; }
}
.mk-nav-mobile-only { display: none; }

/* ---------- Aurora backdrop (hero / error / CTA surfaces) ---------- */
.mk-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.mk-aurora::before { /* dotted grid, faded toward the edges */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}
.mk-aurora::after { /* film grain */
  content: ""; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.35'/></svg>");
  opacity: .12; mix-blend-mode: overlay;
}
.mk-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; }
.mk-blob-1 { width: 620px; height: 620px; left: -160px; top: -260px; background: radial-gradient(circle, #6d4bff 0%, transparent 65%); animation: mk-float-a 22s ease-in-out infinite; }
.mk-blob-2 { width: 520px; height: 520px; right: -140px; top: -180px; background: radial-gradient(circle, #ff5fa8 0%, transparent 65%); opacity: .42; animation: mk-float-b 26s ease-in-out infinite; }
.mk-blob-3 { width: 480px; height: 480px; left: 38%; top: 20%; background: radial-gradient(circle, #ffb24d 0%, transparent 65%); opacity: .22; animation: mk-float-c 30s ease-in-out infinite; }
@keyframes mk-float-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(120px, 80px) scale(1.12); } }
@keyframes mk-float-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-100px, 120px) scale(.92); } }
@keyframes mk-float-c { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-140px, -40px); } }

/* ---------- Page hero (interior pages) ---------- */
.mk-page-hero { position: relative; padding: calc(var(--nav-h) + clamp(56px, 9vw, 110px)) 0 clamp(88px, 12vw, 150px); isolation: isolate; }
.mk-page-hero .mk-container { position: relative; z-index: 1; }
.mk-page-hero h1 { font-size: clamp(44px, 7vw, 84px); margin: 22px 0 18px; max-width: 16ch; }
.mk-page-hero p.mk-lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted-on-ink); max-width: 60ch; margin: 0; }
.mk-hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: 14px; color: var(--faint-on-ink); }
.mk-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.mk-hero-meta svg { width: 16px; height: 16px; color: var(--violet); }
.mk-hero-fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; background: linear-gradient(180deg, transparent, var(--paper)); z-index: 0; pointer-events: none; }

/* ---------- Paper (reading) surfaces ---------- */
.mk-paper { background: var(--paper); color: var(--text-on-paper); position: relative; }
.mk-paper ::selection { background: rgba(139,108,255,.25); color: var(--text-on-paper); }

/* ---------- Document layout (legal) ---------- */
.mk-doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: 0 0 clamp(80px, 10vw, 140px); margin-top: -64px; position: relative; z-index: 2; }
.mk-toc { position: sticky; top: calc(var(--nav-h) + 28px); align-self: start; max-height: calc(100vh - var(--nav-h) - 56px); overflow: auto; padding: 22px 8px 22px 22px; border-radius: var(--r-lg); background: rgba(255,255,255,.7); border: 1px solid var(--paper-line); backdrop-filter: blur(10px); box-shadow: var(--shadow-soft); }
.mk-toc-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-on-paper); margin: 0 0 12px; }
.mk-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.mk-toc li { counter-increment: toc; }
.mk-toc a { display: flex; gap: 10px; padding: 7px 12px 7px 0; font-size: 14px; line-height: 1.4; color: var(--muted-on-paper); border-left: 2px solid transparent; padding-left: 12px; margin-left: -14px; transition: color .2s, border-color .2s; }
.mk-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: 11px; padding-top: 2px; color: #b3acc4; }
.mk-toc a:hover { color: var(--text-on-paper); }
.mk-toc a.is-active { color: var(--violet-2); border-left-color: var(--violet-2); font-weight: 500; }
.mk-toc a.is-active::before { color: var(--violet-2); }

.mk-article { background: #fff; border: 1px solid var(--paper-line); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 64px); box-shadow: var(--shadow-lift); min-width: 0; }
.mk-article-summary { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 0 0 44px; }
.mk-summary-card { padding: 18px 18px 16px; border-radius: var(--r-md); background: linear-gradient(160deg, #faf7ff, #fff6f9); border: 1px solid #ece6f7; }
.mk-summary-card svg { width: 22px; height: 22px; color: var(--violet-2); margin-bottom: 10px; }
.mk-summary-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.mk-summary-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted-on-paper); }
.mk-article section { padding-top: 8px; }
.mk-article section + section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--paper-line); }
.mk-article h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 0 0 16px; color: var(--text-on-paper); display: flex; align-items: baseline; gap: 14px; }
.mk-article h2 .mk-num { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--violet-2); letter-spacing: .05em; }
.mk-article h3 { font-size: 19px; margin: 26px 0 8px; font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; }
.mk-article p, .mk-article li { color: #3b3752; font-size: 16.5px; }
.mk-article p { margin: 0 0 14px; }
.mk-article ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
.mk-article ul li { position: relative; padding-left: 24px; margin-bottom: 8px; }
.mk-article ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--grad-brand); }
.mk-article a { color: var(--violet-2); text-decoration: underline; text-decoration-color: rgba(109,75,255,.35); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.mk-article a:hover { text-decoration-color: currentColor; }
.mk-article strong { color: var(--text-on-paper); font-weight: 600; }
.mk-callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r-md); background: #f6f3ff; border: 1px solid #e4dcff; margin: 18px 0; }
.mk-callout svg { width: 22px; height: 22px; flex: none; color: var(--violet-2); margin-top: 2px; }
.mk-callout p { margin: 0; font-size: 15.5px; }
.mk-table-wrap { overflow-x: auto; margin: 10px 0 18px; border: 1px solid var(--paper-line); border-radius: var(--r-md); }
.mk-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mk-table th, .mk-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--paper-line); vertical-align: top; color: #3b3752; }
.mk-table th { font-weight: 600; color: var(--text-on-paper); background: var(--paper); font-size: 13px; letter-spacing: .02em; }
.mk-table tr:last-child td { border-bottom: 0; }
.mk-updated { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted-on-paper); margin-bottom: 26px; font-family: var(--font-mono); }

@media (max-width: 960px) {
  .mk-doc { grid-template-columns: 1fr; }
  .mk-toc { position: relative; top: 0; max-height: none; }
}

/* ---------- Reading progress ---------- */
.mk-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150; background: transparent; pointer-events: none; }
.mk-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad-brand); box-shadow: 0 0 12px rgba(255,95,168,.6); }

/* ---------- Cards / glass ---------- */
.mk-glass { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08); }
.mk-glow-border { position: relative; }
.mk-glow-border::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(139,108,255,.8), rgba(255,95,168,.35) 40%, rgba(255,255,255,.05) 70%, rgba(255,197,107,.5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

/* ---------- Forms ---------- */
.mk-field { position: relative; margin-bottom: 16px; }
.mk-field input, .mk-field textarea, .mk-field select {
  width: 100%; padding: 24px 16px 10px; border-radius: 14px;
  background: rgba(7,6,26,.55); border: 1px solid rgba(255,255,255,.12);
  color: var(--text-on-ink); font-size: 16px; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s, background .2s; appearance: none;
}
.mk-field textarea { min-height: 150px; resize: vertical; }
.mk-field label { position: absolute; left: 17px; top: 17px; font-size: 16px; color: var(--faint-on-ink); pointer-events: none; transition: transform .2s var(--ease-out), font-size .2s, color .2s, top .2s; }
.mk-field input:focus, .mk-field textarea:focus, .mk-field select:focus { outline: none; border-color: rgba(139,108,255,.8); box-shadow: 0 0 0 4px rgba(139,108,255,.18); background: rgba(7,6,26,.75); }
.mk-field input:focus + label, .mk-field input:not(:placeholder-shown) + label,
.mk-field textarea:focus + label, .mk-field textarea:not(:placeholder-shown) + label,
.mk-field select + label { top: 8px; font-size: 12px; color: var(--muted-on-ink); letter-spacing: .01em; }
.mk-field select { padding-right: 44px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'><path d='M1 1.5l5 5 5-5' stroke='%23a9a3cf' stroke-width='1.6' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 18px center; }
.mk-field select option { background: var(--ink-800); color: #fff; }
.mk-field.has-error input, .mk-field.has-error textarea { border-color: #ff6b8a; }
.mk-field-error { display: block; font-size: 13px; color: #ff8fa6; margin-top: 6px; padding-left: 4px; }
.mk-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .mk-form-row { grid-template-columns: 1fr; } }
.mk-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.mk-form-note { font-size: 13px; color: var(--faint-on-ink); margin: 14px 0 0; }
.mk-form-note a { color: var(--muted-on-ink); text-decoration: underline; text-underline-offset: 3px; }
.mk-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; font-size: 15px; margin-bottom: 18px; }
.mk-alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.mk-alert-error { background: rgba(255,107,138,.1); border: 1px solid rgba(255,107,138,.35); color: #ffc2cf; }

/* ---------- Contact ---------- */
.mk-contact { position: relative; padding: calc(var(--nav-h) + clamp(48px, 8vw, 96px)) 0 clamp(80px, 10vw, 130px); isolation: isolate; min-height: 100vh; }
.mk-contact .mk-container { position: relative; z-index: 1; }
.mk-contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.mk-contact h1 { font-size: clamp(44px, 6.4vw, 78px); margin: 22px 0 20px; }
.mk-contact .mk-lede { font-size: 19px; color: var(--muted-on-ink); max-width: 46ch; margin: 0 0 36px; }
.mk-channels { display: grid; gap: 12px; }
.mk-channel { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-md); background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); transition: background .25s, border-color .25s, transform .35s var(--ease-out); }
a.mk-channel:hover { background: rgba(255,255,255,.07); border-color: rgba(139,108,255,.45); transform: translateX(4px); }
.mk-channel-icon { width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center; background: var(--grad-brand-soft); border: 1px solid rgba(255,255,255,.1); }
.mk-channel-icon svg { width: 21px; height: 21px; color: #d9cfff; }
.mk-channel small { display: block; font-size: 13px; color: var(--faint-on-ink); margin-bottom: 1px; }
.mk-channel strong { font-weight: 600; font-size: 16px; }
.mk-contact-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--r-xl); }
.mk-contact-card h2 { font-size: 28px; margin: 0 0 6px; }
.mk-contact-card > p { color: var(--muted-on-ink); margin: 0 0 26px; font-size: 15.5px; }
.mk-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; border: 0; padding: 0; }
.mk-topics legend { font-size: 13px; color: var(--faint-on-ink); margin-bottom: 10px; padding: 0; }
.mk-topic input { position: absolute; opacity: 0; pointer-events: none; }
.mk-topic span { display: inline-block; padding: 8px 14px; border-radius: var(--r-pill); font-size: 14px; border: 1px solid rgba(255,255,255,.14); color: var(--muted-on-ink); cursor: pointer; transition: all .2s; user-select: none; }
.mk-topic input:checked + span { color: #fff; border-color: transparent; background: linear-gradient(100deg, rgba(109,75,255,.85), rgba(255,95,168,.75)); box-shadow: 0 6px 20px -8px rgba(255,95,168,.8); }
.mk-topic input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.mk-success { text-align: center; padding: 30px 8px 12px; }
.mk-success-icon { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(92,224,184,.35), rgba(92,224,184,.08)); border: 1px solid rgba(92,224,184,.4); animation: mk-pop .7s var(--ease-out) both; }
.mk-success-icon svg { width: 38px; height: 38px; color: var(--mint); }
.mk-success-icon path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: mk-draw .6s .35s var(--ease-out) forwards; }
.mk-success h2 { font-size: 32px; margin-bottom: 10px; }
.mk-success p { color: var(--muted-on-ink); margin: 0 auto 26px; max-width: 38ch; }
@keyframes mk-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes mk-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 900px) { .mk-contact-grid { grid-template-columns: 1fr; } }

/* ---------- Error pages ---------- */
.mk-error { position: relative; min-height: 100vh; display: grid; place-items: center; padding: calc(var(--nav-h) + 40px) 0 80px; isolation: isolate; text-align: center; }
.mk-error .mk-container { position: relative; z-index: 1; }
.mk-error .mk-error-code { font-family: var(--font-display); font-weight: 300; font-style: italic; font-size: clamp(120px, 22vw, 260px); line-height: .9; letter-spacing: -0.06em; margin: 0 auto; max-width: none; background: linear-gradient(180deg, #fff 10%, rgba(255,255,255,.12) 95%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mk-error h1 { font-size: clamp(30px, 4.4vw, 52px); margin: 8px auto 16px; max-width: 18ch; }
.mk-error p { color: var(--muted-on-ink); font-size: 18px; max-width: 48ch; margin: 0 auto 34px; }
.mk-error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mk-typed { display: inline; border-right: 2px solid var(--gold); padding-right: 3px; animation: mk-caret 1s steps(1) infinite; }
@keyframes mk-caret { 50% { border-color: transparent; } }

/* The open book (404) */
.mk-book { position: relative; width: 240px; height: 150px; margin: 0 auto 26px; perspective: 1200px; }
.mk-book-half { position: absolute; top: 0; width: 50%; height: 100%; border-radius: 6px; background: linear-gradient(180deg, #fffdf8, #f1ebdf); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.mk-book-half.l { left: 0; transform-origin: right center; transform: rotateY(12deg); border-radius: 8px 2px 2px 8px; }
.mk-book-half.r { right: 0; transform-origin: left center; transform: rotateY(-12deg); border-radius: 2px 8px 8px 2px; }
.mk-book-half::after { content: ""; position: absolute; inset: 18px 16px; background: repeating-linear-gradient(180deg, rgba(27,24,48,.16) 0 2px, transparent 2px 12px); -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.mk-book-half.r::after { inset: 18px 16px 70px; }
.mk-book-page { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: left center; background: linear-gradient(90deg, #efe8da, #fffdf8); border-radius: 2px 8px 8px 2px; animation: mk-flip 5.5s var(--ease-out) infinite; backface-visibility: hidden; }
.mk-book-page:nth-child(4) { animation-delay: 1.6s; }
@keyframes mk-flip { 0%, 20% { transform: rotateY(-12deg); } 55%, 100% { transform: rotateY(-168deg); opacity: 0; } }
.mk-book-glow { position: absolute; left: 50%; bottom: -30px; width: 280px; height: 60px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(139,108,255,.55), transparent 70%); filter: blur(10px); }
.mk-book-sparks { position: absolute; inset: -40px; pointer-events: none; }
.mk-book-sparks i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); opacity: 0; animation: mk-spark 4s ease-in infinite; }
.mk-book-sparks i:nth-child(1) { left: 45%; top: 55%; }
.mk-book-sparks i:nth-child(2) { left: 55%; top: 50%; animation-delay: 1.1s; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.mk-book-sparks i:nth-child(3) { left: 50%; top: 60%; animation-delay: 2.3s; background: #c9b8ff; box-shadow: 0 0 10px #c9b8ff; }
.mk-book-sparks i:nth-child(4) { left: 40%; top: 58%; animation-delay: 3s; }
@keyframes mk-spark { 0% { transform: translate(0,0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx, 20px), -120px) scale(1.1); opacity: 0; } }
.mk-book-sparks i:nth-child(1) { --dx: -40px; } .mk-book-sparks i:nth-child(3) { --dx: 34px; } .mk-book-sparks i:nth-child(4) { --dx: -12px; }

.mk-error-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 44px; font-size: 14px; color: var(--faint-on-ink); }
.mk-error-links a { color: var(--muted-on-ink); transition: color .2s; }
.mk-error-links a:hover { color: #fff; }

/* ---------- CTA band ---------- */
.mk-cta { position: relative; isolation: isolate; overflow: hidden; margin: 0 auto; padding: clamp(48px, 7vw, 84px) clamp(24px, 5vw, 64px); border-radius: var(--r-xl); text-align: center; background: radial-gradient(120% 140% at 50% 0%, #2a1f78 0%, #150f3e 45%, #0c0a24 100%); border: 1px solid rgba(255,255,255,.1); }
.mk-cta h2 { font-size: clamp(32px, 4.6vw, 54px); max-width: 20ch; margin: 0 auto 14px; }
.mk-cta p { color: var(--muted-on-ink); margin: 0 auto 30px; max-width: 52ch; }
.mk-cta-wrap { background: var(--paper); padding: 0 0 clamp(64px, 8vw, 110px); }
.mk-cta .mk-aurora .mk-blob { opacity: .35; }

/* ---------- Footer ---------- */
.mk-footer { position: relative; background: var(--ink-950); padding: clamp(64px, 8vw, 96px) 0 36px; overflow: hidden; }
.mk-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(139,108,255,.6), rgba(255,95,168,.5), transparent); }
.mk-footer::after { content: ""; position: absolute; left: 50%; top: -220px; width: 900px; height: 360px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(109,75,255,.18), transparent 70%); pointer-events: none; }
.mk-footer-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px; }
.mk-footer-about p { color: var(--faint-on-ink); font-size: 15px; max-width: 34ch; margin: 18px 0 22px; }
.mk-footer h4 { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-on-ink); margin: 6px 0 18px; }
.mk-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mk-footer ul a { color: var(--faint-on-ink); font-size: 15px; transition: color .2s; }
.mk-footer ul a:hover { color: #fff; }
.mk-footer-bottom { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.07); font-size: 13.5px; color: var(--faint-on-ink); }
.mk-footer-bottom a:hover { color: #fff; }
.mk-footer-word { position: relative; z-index: 0; margin-top: 40px; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(64px, 14vw, 200px); line-height: .85; letter-spacing: -0.05em; text-align: center; white-space: nowrap; background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 85%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; user-select: none; }
@media (max-width: 860px) { .mk-footer-grid { grid-template-columns: 1fr 1fr; } .mk-footer-about { grid-column: 1 / -1; } }

/* ---------- Reveal on scroll ---------- */
.mk-reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
.mk-reveal.is-in { opacity: 1; transform: none; }
.no-js .mk-reveal { opacity: 1; transform: none; }
/* Above-the-fold content animates in on load with pure CSS, so it never
   waits on JS or an IntersectionObserver callback. */
.mk-page-hero .mk-reveal, .mk-contact .mk-reveal, .mk-error .mk-reveal, .hm-hero .mk-reveal {
  opacity: 1; transform: none; transition: none;
  animation: mk-rise .9s var(--ease-out) both; animation-delay: var(--d, 0s);
}
@keyframes mk-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .mk-reveal { opacity: 1; transform: none; }
}
