/* Mkweli product hub — rebrand: black + rust, light & dark themes */

:root {
  /* Brand */
  --brand-orange: #b7522d;
  --brand-orange-soft: #d46a42;
  --brand-black: #121212;
  --brand-ink: #1a1a1a;

  /* Light theme (default for logo readability with black mark) */
  --bg: #f4f4f2;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #ebebe8;
  --line: rgba(18, 18, 18, 0.1);
  --line-strong: rgba(18, 18, 18, 0.16);
  --text: #121212;
  --text-soft: #3d3d3d;
  --muted: #6b6b6b;
  --accent: var(--brand-orange);
  --accent-2: var(--brand-orange-soft);
  --on-accent: #ffffff;
  --header-bg: rgba(244, 244, 242, 0.9);
  --footer-bg: #121212;
  --footer-text: #e8e8e8;
  --footer-muted: #a3a3a3;
  --shadow: 0 16px 40px rgba(18, 18, 18, 0.08);
  --hero-glow: rgba(183, 82, 45, 0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --container: 1120px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-elevated: #161a22;
    --bg-card: #1a1f2a;
    --bg-soft: #222836;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f2f2f0;
    --text-soft: #c4c4c0;
    --muted: #8f8f8a;
    --accent: #d46a42;
    --accent-2: #e07d58;
    --on-accent: #121212;
    --header-bg: rgba(15, 17, 21, 0.9);
    --footer-bg: #0a0c10;
    --footer-text: #e8e8e8;
    --footer-muted: #9a9a95;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    --hero-glow: rgba(212, 106, 66, 0.14);
  }
}

/* Manual theme override via data-theme on html */
html[data-theme="light"] {
  --bg: #f4f4f2;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #ebebe8;
  --line: rgba(18, 18, 18, 0.1);
  --line-strong: rgba(18, 18, 18, 0.16);
  --text: #121212;
  --text-soft: #3d3d3d;
  --muted: #6b6b6b;
  --accent: #b7522d;
  --accent-2: #d46a42;
  --on-accent: #ffffff;
  --header-bg: rgba(244, 244, 242, 0.9);
  --footer-bg: #121212;
  --footer-text: #e8e8e8;
  --footer-muted: #a3a3a3;
  --shadow: 0 16px 40px rgba(18, 18, 18, 0.08);
  --hero-glow: rgba(183, 82, 45, 0.12);
}
html[data-theme="dark"] {
  --bg: #0f1115;
  --bg-elevated: #161a22;
  --bg-card: #1a1f2a;
  --bg-soft: #222836;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f0;
  --text-soft: #c4c4c0;
  --muted: #8f8f8a;
  --accent: #d46a42;
  --accent-2: #e07d58;
  --on-accent: #121212;
  --header-bg: rgba(15, 17, 21, 0.9);
  --footer-bg: #0a0c10;
  --footer-text: #e8e8e8;
  --footer-muted: #9a9a95;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --hero-glow: rgba(212, 106, 66, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light dark; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-soft); }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
.container.narrow { max-width: 720px; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-orange);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Dual-theme logo: black mark on light, white mark on dark */
.logo-light { display: block; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .logo-light { display: none; }
  html:not([data-theme="light"]) .logo-dark { display: block; }
}
html[data-theme="dark"] .logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: block; }
html[data-theme="light"] .logo-light { display: block; }
html[data-theme="light"] .logo-dark { display: none; }

/* Wordmark image (full logo) */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
}
.brand-lockup:hover { color: var(--text); }
.brand-mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-wordmark {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.brand-text-fallback {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-transform: lowercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.875rem; }
.btn-lg { padding: 0.9rem 1.4rem; font-size: 1rem; }
.btn-primary {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 10px 28px rgba(183, 82, 45, 0.28);
}
.btn-primary:hover { background: var(--brand-orange-soft); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-accent {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 10px 28px rgba(183, 82, 45, 0.3);
}
.btn-accent:hover { background: var(--brand-orange-soft); color: #fff; }

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-left: auto;
}
.nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.55rem; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-elevated);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(ellipse 70% 50% at 85% 0%, var(--hero-glow), transparent 55%),
    var(--bg);
}
.hero-inner { max-width: 48rem; }
.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hero-logo-full {
  height: clamp(40px, 6vw, 56px);
  width: auto;
  max-width: min(280px, 70vw);
  object-fit: contain;
}
.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-orange);
  margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-orange);
}
.lead {
  font-size: 1.15rem;
  max-width: 40rem;
  margin-bottom: 1.75rem;
}
.lead strong { color: var(--text); }
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.hero-meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  max-width: 36rem;
}
.hero-meta li { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-meta strong { font-size: 0.95rem; color: var(--text); }
.hero-meta span { font-size: 0.84rem; color: var(--muted); }

.strip {
  border-block: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 0.95rem 0;
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.strip .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-elevated); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-orange);
  margin-bottom: 0.75rem;
}
.section-tag.on-dark { color: #f0a07a; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.product-visual {
  background: var(--bg-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.85rem 0;
}
.product-visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.product-visual-soft {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(183,82,45,0.18), transparent 50%),
    var(--bg-soft);
}
.product-placeholder {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
}
.placeholder-mark {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--text);
  letter-spacing: 0.04em;
}
.product-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.product-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  border: 1px solid var(--line);
}
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}
.badge-live { background: rgba(183, 82, 45, 0.12); color: var(--brand-orange); }
.badge-demo { background: rgba(18, 18, 18, 0.08); color: var(--text-soft); }
.badge-pilot { background: rgba(183, 82, 45, 0.18); color: var(--brand-orange); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .badge-demo { background: rgba(255,255,255,0.08); }
}
html[data-theme="dark"] .badge-demo { background: rgba(255,255,255,0.08); }
.product-desc { font-size: 0.95rem; margin-bottom: 0.65rem; flex: 1; }
.product-tags { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.85rem; }
.text-link {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--brand-orange);
}
.text-link:hover { text-decoration: underline; color: var(--accent-2); }
.text-link.muted { color: var(--muted); font-weight: 600; }
.text-link.muted:hover { color: var(--text-soft); }
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.pillar {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.pillar p { margin: 0; font-size: 0.95rem; }

.who-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.lead-sm { font-size: 1.08rem; }
.who-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.who-list li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--text-soft);
  font-size: 0.98rem;
}
.who-list strong { color: var(--text); }

.section-contact { padding-top: 2rem; }
.contact-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  background: linear-gradient(135deg, #1a120e 0%, #121212 50%, #2a1810 100%);
  border: 1px solid rgba(183, 82, 45, 0.35);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}
.contact-card h2 { color: #fff; }
.contact-card p { color: rgba(255,255,255,0.78); }
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
}
.contact-actions .btn { width: 100%; }

.page-about h1 { margin-top: 0.35rem; }
.simple-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 1rem 0 0;
}
.simple-list li {
  color: var(--text-soft);
  padding-left: 1rem;
  position: relative;
}
.simple-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--brand-orange);
  font-weight: 700;
}
.steps-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-soft);
}
.steps-list strong { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 1.4rem;
  background: var(--footer-bg);
  color: var(--footer-text);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p {
  color: var(--footer-muted);
  font-size: 0.92rem;
  max-width: 22rem;
  margin: 0.75rem 0 0;
}
.footer-brand .brand-text-fallback { color: #fff; }
.site-footer h4 {
  font-family: var(--font);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--footer-muted);
  margin-bottom: 0.85rem;
}
.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.site-footer a {
  color: var(--footer-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.site-footer a:hover { color: #f0a07a; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.15rem;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--footer-muted);
}
.back-top {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--footer-muted);
}
.back-top:hover { color: #fff; }

/* Footer always dark: use light logos */
.site-footer .logo-light { display: none !important; }
.site-footer .logo-dark { display: block !important; }

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .product-grid,
  .pillar-grid,
  .who-grid,
  .contact-card,
  .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0;
    display: none;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.85rem 0.75rem; border-radius: 10px; }
  .nav a:hover { background: var(--bg-soft); }
  .nav-toggle { display: flex; }
  .nav-actions .btn { display: none; }
}

@media (max-width: 560px) {
  .section { padding: 3.25rem 0; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
}

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