/* ═══════════════════════════════════════════════════
   ACWA Design System
   ═══════════════════════════════════════════════════ */

:root {
  /* Core palette */
  --ink: #0b1220;
  --ink-light: #1a2744;
  --ink-mid: #243352;
  --muted: #7c8ba5;
  --sand: #e9ddc8;
  --gold: #c9a24e;
  --gold-soft: rgba(201, 162, 78, 0.15);
  --gold-glow: rgba(201, 162, 78, 0.25);
  --paper: #f7f3ea;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-dark: rgba(16, 24, 42, 0.65);
  --line: rgba(255, 255, 255, 0.08);
  --line-light: rgba(16, 33, 50, 0.12);
  --emerald: #0f6657;
  --alert: #8f2d2d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius: 1rem;
  --radius-lg: 1.5rem;

  /* Layout */
  --container: min(1200px, 90vw);
  --section-pad: clamp(4rem, 10vw, 8rem) 0;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: #e8ecf2;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; }

img { max-width: 100%; display: block; }

.site-shell { min-height: 100vh; overflow-x: hidden; }

/* ── Grid canvas ── */
.grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Navigation
   ═══════════════════════════════════════════════════ */

.mk-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: rgba(11, 18, 32, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
}

.mk-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.9rem;
}

.mk-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mk-nav__logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: block;
  flex-shrink: 0;
}

.mk-nav__logo-text-brand {
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  transform: translateY(-1px);
}

.mk-nav__logo-wordmark {
  display: block;
  width: 136px;
  max-width: min(34vw, 136px);
  height: 42px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.mk-nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.mk-nav__link {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.mk-nav__link:hover {
  color: #fff;
}

.mk-nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}

.mk-nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Buttons
   ═══════════════════════════════════════════════════ */

.mk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.mk-btn--primary {
  background: linear-gradient(135deg, var(--gold), #a07830);
  color: var(--ink);
  box-shadow: 0 4px 24px rgba(201, 162, 78, 0.25);
}

.mk-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 162, 78, 0.4);
}

.mk-btn--accent {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 78, 0.4);
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
}

.mk-btn--accent:hover {
  background: rgba(201, 162, 78, 0.1);
  border-color: var(--gold);
}

.mk-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mk-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.mk-btn--lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.mk-btn--full {
  width: 100%;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Hero
   ═══════════════════════════════════════════════════ */

.mk-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 10rem clamp(1.5rem, 4vw, 3rem) 6rem;
  min-height: 100vh;
}

.mk-hero__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.mk-hero__title {
  font-family: "Fraunces", serif;
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1.5rem;
}

.mk-hero__title-accent {
  background: linear-gradient(135deg, var(--gold), #e6c76f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mk-hero__sub {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: 2.5rem;
}

.mk-hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Flow diagram ── */

.mk-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mk-flow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2.5rem 2rem;
  background: rgba(16, 24, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(24px);
  width: 100%;
  max-width: 380px;
}

.mk-flow__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  width: 100%;
}

.mk-flow__node--public {
  background: rgba(201, 162, 78, 0.06);
  border: 1px solid rgba(201, 162, 78, 0.15);
}

.mk-flow__node--corp {
  background: rgba(15, 102, 87, 0.08);
  border: 1px solid rgba(15, 102, 87, 0.2);
}

.mk-flow__icon {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.mk-flow__node--public .mk-flow__icon {
  background: rgba(201, 162, 78, 0.12);
  color: var(--gold);
}

.mk-flow__node--corp .mk-flow__icon {
  background: rgba(15, 102, 87, 0.15);
  color: #2eb89c;
}

.mk-flow__node strong {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.mk-flow__node span {
  font-size: 0.82rem;
  color: var(--muted);
}

.mk-flow__connector {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0;
}

.mk-flow__line {
  width: 2px;
  height: 3rem;
  background: linear-gradient(180deg, rgba(201, 162, 78, 0.4), rgba(15, 102, 87, 0.4));
  position: relative;
}

.mk-flow__pulse {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
  animation: flowPulse 2.5s ease-in-out infinite;
}

@keyframes flowPulse {
  0%   { top: 0; opacity: 1; }
  100% { top: 3rem; opacity: 0.3; }
}

.mk-flow__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
}

.mk-flow__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(15, 102, 87, 0.1);
  border: 1px solid rgba(15, 102, 87, 0.2);
  color: #2eb89c;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Metrics Ribbon
   ═══════════════════════════════════════════════════ */

.mk-metrics {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(16, 24, 42, 0.4);
}

.mk-metrics__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 3.5rem clamp(1.5rem, 4vw, 3rem);
  gap: 2rem;
}

.mk-metric {
  text-align: center;
}

.mk-metric__value {
  display: block;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.mk-metric__label {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Sections
   ═══════════════════════════════════════════════════ */

.mk-section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad);
}

.mk-section__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.mk-section__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.mk-section__title {
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 3rem;
  max-width: 28ch;
}

/* ── How it works: Steps ── */

.mk-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.mk-step {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, background 0.3s;
}

.mk-step:hover {
  border-color: rgba(201, 162, 78, 0.2);
  background: rgba(201, 162, 78, 0.04);
}

.mk-step__num {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(201, 162, 78, 0.2);
  line-height: 1;
  margin-bottom: 1rem;
}

.mk-step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.mk-step p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Value cards ── */

.mk-values {
  background: rgba(16, 24, 42, 0.3);
}

.mk-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.mk-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.35s ease, border-color 0.35s;
}

.mk-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
}

.mk-card__icon {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--gold-soft);
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.mk-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.mk-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Contact section
   ═══════════════════════════════════════════════════ */

.mk-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.mk-contact__copy p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 44ch;
}

.mk-contact__perks {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mk-contact__perks li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #c0c8d6;
}

.mk-contact__perks svg {
  color: var(--gold);
  flex-shrink: 0;
}

.mk-contact__form-wrap {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mk-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mk-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mk-form__group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.mk-form input,
.mk-form textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1rem;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.mk-form input::placeholder,
.mk-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.mk-form input:focus,
.mk-form textarea:focus {
  outline: none;
  border-color: rgba(201, 162, 78, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Footer
   ═══════════════════════════════════════════════════ */

.mk-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
}

.mk-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.mk-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.mk-footer__wordmark {
  display: block;
  width: 126px;
  height: auto;
  flex-shrink: 0;
}

.mk-footer__links {
  display: flex;
  gap: 1.5rem;
}

.mk-footer__links a {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}

.mk-footer__links a:hover { color: #fff; }

.mk-footer__legal {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Animations
   ═══════════════════════════════════════════════════ */

.anim-fade {
  opacity: 0;
  transform: translateY(30px);
}

.anim-split {
  opacity: 0;
  transform: translateY(40px);
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Flash messages (dark theme)
   ═══════════════════════════════════════════════════ */

.mk-contact .flash {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.mk-contact .flash.success {
  background: rgba(15, 102, 87, 0.15);
  color: #2eb89c;
  border: 1px solid rgba(15, 102, 87, 0.25);
}

.mk-contact .flash.error {
  background: rgba(143, 45, 45, 0.15);
  color: #e05555;
  border: 1px solid rgba(143, 45, 45, 0.25);
}

/* ═══════════════════════════════════════════════════
   MARKETING PAGE — Responsive
   ═══════════════════════════════════════════════════ */

@media (max-width: 960px) {
  .mk-hero {
    grid-template-columns: 1fr;
    padding-top: 7rem;
    min-height: auto;
  }

  .mk-hero__visual {
    order: -1;
  }

  .mk-flow { max-width: 340px; margin: 0 auto; }

  .mk-metrics__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .mk-steps {
    grid-template-columns: 1fr;
  }

  .mk-cards {
    grid-template-columns: 1fr;
  }

  .mk-contact__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .mk-nav__links {
    display: none;
  }

  .mk-nav__burger {
    display: flex;
  }

  .mk-nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: rgba(11, 18, 32, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
 }

  .mk-metrics__inner {
    grid-template-columns: 1fr 1fr;
    padding: 2rem 1.5rem;
  }

  .mk-hero__title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .mk-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════
   APPLICATION PAGES (demo, login) — Dark theme
   Unified with marketing visual identity
   ═══════════════════════════════════════════════════ */

/* ── Login page ── */

.dk-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.dk-login-card {
  width: min(100%, 28rem);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
}

.dk-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.dk-back-link:hover {
  color: #fff;
}

.dk-login-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dk-login-logo {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.8rem;
  flex-shrink: 0;
}

.dk-login-title {
  font-family: "Fraunces", serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

.dk-login-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ── Shared dark elements ── */

.dk-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.dk-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dk-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dk-form__group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.dk-form input,
.dk-form textarea,
.dk-settings-form input,
.dk-settings-form textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1rem;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.dk-form input::placeholder,
.dk-form textarea::placeholder,
.dk-settings-form input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.dk-form input:focus,
.dk-form textarea:focus,
.dk-settings-form input:focus {
  outline: none;
  border-color: rgba(201, 162, 78, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.dk-flash {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.dk-flash--success {
  background: rgba(15, 102, 87, 0.15);
  color: #2eb89c;
  border: 1px solid rgba(15, 102, 87, 0.25);
}

.dk-flash--error {
  background: rgba(143, 45, 45, 0.15);
  color: #e05555;
  border: 1px solid rgba(143, 45, 45, 0.25);
}

/* ── Demo navigation ── */

.dk-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dk-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4.9rem;
}

.dk-nav__meta {
  flex: 1;
}

.dk-nav__subtitle {
  font-size: 0.82rem;
  color: var(--muted);
  display: none;
}

@media (min-width: 768px) {
  .dk-nav__subtitle { display: inline; }
}

.dk-nav__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dk-nav__link {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}

.dk-nav__link:hover {
  color: #fff;
}

.dk-mode-switch {
  display: inline-flex;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.dk-mode-switch__item {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: all 0.2s;
}

.dk-mode-switch__item.active {
  background: linear-gradient(135deg, var(--gold), #a07830);
  color: var(--ink);
}

.dk-mode-switch__item:not(.active):hover {
  color: #fff;
}

.dk-logout-form {
  margin: 0;
}

/* ── Demo intro ── */

.dk-intro {
  position: relative;
  z-index: 1;
  padding: 4rem 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dk-intro__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.dk-intro__title {
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
  max-width: 20ch;
}

.dk-intro__desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.dk-intro__badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(201, 162, 78, 0.08);
  border: 1px solid rgba(201, 162, 78, 0.15);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ── Demo main area ── */

.dk-main {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem clamp(1.5rem, 4vw, 3rem) 4rem;
  display: grid;
  gap: 2rem;
}

/* ── Cards (table, settings) ── */

.dk-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.dk-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.dk-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.dk-card__title {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

/* ── Data table (dark) ── */

.dk-table-wrap {
  overflow-x: auto;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}

.dk-table {
  width: 100%;
  border-collapse: collapse;
}

.dk-table th,
.dk-table td {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.dk-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.dk-table th:hover {
  color: var(--gold);
}

.dk-table th[data-sort]::after {
  content: ' ⇅';
  opacity: 0.3;
  font-size: 0.72em;
}

.dk-table th[data-sort-dir="asc"]::after {
  content: ' ↑';
  opacity: 1;
  color: var(--gold);
}

.dk-table th[data-sort-dir="desc"]::after {
  content: ' ↓';
  opacity: 1;
  color: var(--gold);
}

.dk-table tbody tr {
  transition: background 0.15s;
}

.dk-table tbody tr.clickable {
  cursor: pointer;
}

.dk-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.dk-table td {
  font-size: 0.92rem;
  color: #c5cdd8;
}

/* Pill (dark variant) */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.pill { background: rgba(201, 162, 78, 0.12); color: var(--gold); }

/* Inline edit elements (dark) */
.input-inline,
.select-inline {
  min-width: 11rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 0.7rem;
  color: #fff;
  font-size: 0.9rem;
}

.input-inline:focus,
.select-inline:focus {
  outline: none;
  border-color: rgba(201, 162, 78, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.select-inline option {
  background: var(--ink);
  color: #fff;
}

/* Row action buttons (dark) */
.row-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.row-actions button {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.8rem;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}

.row-actions button:hover {
  background: rgba(143, 45, 45, 0.15);
  border-color: rgba(143, 45, 45, 0.3);
  color: #e05555;
}

/* Settings form (dark) */
.dk-settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 40rem;
}

/* ── Modal (dark) ── */

.dk-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  margin: auto;
}

.dk-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.dk-modal__card {
  width: min(92vw, 34rem);
  position: relative;
  background: rgba(16, 24, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
  padding: 2rem;
  backdrop-filter: blur(24px);
}

.dk-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.dk-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dk-modal__body .detail-grid {
  display: grid;
  gap: 0.5rem;
}

.dk-modal__body .detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #c5cdd8;
}

.dk-modal__body .detail-row strong {
  min-width: 10rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.dk-modal__body .notice {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(201, 162, 78, 0.1);
  border: 1px solid rgba(201, 162, 78, 0.2);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.88rem;
}

/* ── Reveal animation (used by both marketing + demo) ── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

/* ── Responsive (demo) ── */

@media (max-width: 960px) {
  .dk-intro__title {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .dk-nav__actions {
    gap: 0.6rem;
  }

  .dk-nav__link {
    display: none;
  }

  .dk-card {
    padding: 1rem;
  }

  .dk-table-wrap {
    margin: 0 -1rem;
    padding: 0 1rem;
  }
}

/* ── Legacy compatibility (flash on old templates) ── */

.flash {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.flash.success {
  background: rgba(15, 102, 87, 0.15);
  color: #2eb89c;
  border: 1px solid rgba(15, 102, 87, 0.25);
}

.flash.error {
  background: rgba(143, 45, 45, 0.15);
  color: #e05555;
  border: 1px solid rgba(143, 45, 45, 0.25);
}

