/* ============================================================
   KastingX — Marketing UI kit styles (kit-scoped, not tokens)
   Helpers for hero treatments, portrait placeholders, grain,
   protection gradients. Relies on design-system tokens.
   ============================================================ */

.mk {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--carbon);
}
.mk *, .mk *::before, .mk *::after { box-sizing: border-box; }

/* ---- Page rhythm ---- */
.mk-wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.mk-wrap--narrow { max-width: 820px; }
.mk-section { padding: 96px 0; }
.mk-section--tight { padding: 64px 0; }

/* ---- Eyebrow signature device ---- */
.mk-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); margin: 0;
}
.mk-eyebrow::before { content: ""; width: 28px; height: 1.5px; background: var(--brand); }
.mk-eyebrow--center { justify-content: center; }
.mk-eyebrow--center::after { content: ""; width: 28px; height: 1.5px; background: var(--brand); }

/* ---- Display headings ---- */
.mk-h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.015em; color: var(--text-strong); margin: 0; }
.mk-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.05; letter-spacing: -0.01em; color: var(--text-strong); margin: 0; }
.mk-h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; color: var(--text-strong); margin: 0; }
.mk-italic { font-style: italic; font-weight: 500; color: var(--brand); }
.mk-lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--text-muted); margin: 0; font-weight: 400; }

/* ---- Grain + vignette overlays ---- */
.mk-grain { position: relative; }
.mk-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; mix-blend-mode: overlay;
  background-image: 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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.mk-vignette { position: relative; }
.mk-vignette::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(6,6,8,0.65) 100%);
}

/* ---- Portrait placeholder (sober, on-brand) ---- */
.mk-portrait {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);
  background:
    radial-gradient(80% 60% at 50% 22%, rgba(201,168,106,0.10), transparent 60%),
    linear-gradient(165deg, var(--graphite-600), var(--graphite-900) 70%);
  display: grid; place-items: center; isolation: isolate;
}
.mk-portrait__mono {
  font-family: var(--font-display); font-weight: 600; line-height: 1;
  font-size: clamp(3rem, 8vw, 5.4rem); color: rgba(245,243,238,0.10);
  user-select: none; letter-spacing: 0.02em;
}
.mk-portrait__grad {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(6,6,8,0.86) 4%, rgba(6,6,8,0.20) 38%, transparent 60%);
}
.mk-portrait__top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.mk-portrait__meta { position: absolute; left: 14px; right: 14px; bottom: 13px; z-index: 2; pointer-events: none; }
.mk-portrait__grad { pointer-events: none; }
.mk-portrait__slot { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; border: none; pointer-events: none; }
.mk-portrait__slot.is-on { pointer-events: auto; }

/* ---- Trust pill ---- */
.mk-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; font-size: 12px; letter-spacing: .03em;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(245,243,238,0.06); color: var(--text-body);
  border: 1px solid var(--border-subtle); backdrop-filter: blur(6px);
}
.mk-pill svg, .mk-pill i { width: 14px; height: 14px; }
.mk-pill--gold { color: var(--brand); border-color: rgba(201,168,106,0.4); background: rgba(201,168,106,0.08); }
.mk-pill--green { color: var(--success); }
.mk-pill--green svg, .mk-pill--green i { color: var(--success); }

/* ---- Hairline divider ---- */
.mk-rule { height: 1px; background: var(--border-subtle); border: none; margin: 0; }

/* ---- Cards ---- */
.mk-card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm), var(--shadow-sheen);
}
.mk-card--pad { padding: 28px; }

/* ---- Feature/number list ---- */
.mk-num {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--brand);
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  border: 1px solid rgba(201,168,106,0.4); display: grid; place-items: center;
}

/* ---- Two-column split that collapses on tablet ---- */
.mk-2col { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .mk-2col { grid-template-columns: 1fr; gap: 34px; } }

/* ---- Generic grids ---- */
.mk-grid { display: grid; gap: 22px; }
.mk-grid--2 { grid-template-columns: repeat(2, 1fr); }
.mk-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mk-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Entrance ----
   Transform-only rise. Content is ALWAYS visible (base opacity:1);
   the animation only nudges position, so if the document timeline is
   ever paused (offscreen iframe, print, reduced-motion) nothing can
   get stuck hidden. Opacity fade is layered via a separate, safe rule. */
@keyframes mkRise { from { transform: translateY(18px); } to { transform: none; } }
@keyframes mkFade { from { opacity: 0.001; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .mk-rise { animation: mkRise var(--dur-slow) var(--ease-out) both; }
}

/* ---- Responsive ---- */
.mk-show-mobile { display: none !important; }
@media (max-width: 900px) {
  .mk-section { padding: 64px 0; }
  .mk-grid--3, .mk-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .mk-hide-mobile { display: none !important; }
  .mk-show-mobile { display: flex !important; }
  .mk-foot-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
}
@media (max-width: 560px) {
  .mk-wrap { padding: 0 18px; }
  .mk-grid--2, .mk-grid--3, .mk-grid--4 { grid-template-columns: 1fr; }
  .mk-section { padding: 52px 0; }
  .mk-form-2, .mk-form-3 { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
  .mk-catalog-layout { grid-template-columns: 1fr !important; }
  .mk-filter-rail { position: static !important; }
}

/* ---- Article prose (Blog / Journal) ---- */
.mk-prose p { font-size: 16px; line-height: 1.75; color: var(--text-body); margin: 0 0 18px; }
.mk-prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; color: var(--text-strong); margin: 34px 0 12px; }
.mk-prose blockquote { margin: 26px 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--brand); font-family: var(--font-display); font-style: italic; font-size: 1.4rem; line-height: 1.4; color: var(--text-strong); }

/* ---- Mobile frame showcase (for the dsCard / mobile views) ---- */
.mk-phone {
  width: 390px; max-width: 100%; border-radius: 44px; padding: 12px;
  background: #000; border: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
}
.mk-phone__screen { border-radius: 33px; overflow: hidden; background: var(--carbon); height: 780px; overflow-y: auto; position: relative; }
.mk-phone__screen::-webkit-scrollbar { width: 0; }
