/* JustDukkan — design tokens derived from cursor.com structure (colors, type, containers) */

:root {
  --bg: #f7f7f4;
  --fg: #26251e;
  --fg-60: rgba(38, 37, 30, 0.6);
  --fg-40: rgba(38, 37, 30, 0.4);
  --border: rgba(38, 37, 30, 0.1);
  --border-strong: rgba(38, 37, 30, 0.2);
  --card: #f0efeb;
  --card-hover: #ebeae5;
  --accent: #34785c;
  --accent-bg: rgba(52, 120, 92, 0.1);
  --btn-bg: #26251e;
  --btn-fg: #f7f7f4;
  --hub-text: #ffffff;

  --font-sans: "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 52px;
  --container: 1800px;
  --prose: 680px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120b;
    --fg: #edecec;
    --fg-60: rgba(237, 236, 236, 0.6);
    --fg-40: rgba(237, 236, 236, 0.4);
    --border: rgba(237, 236, 236, 0.1);
    --border-strong: rgba(237, 236, 236, 0.2);
    --card: #1b1913;
    --card-hover: #201e18;
    --accent: #4fa37e;
    --accent-bg: rgba(79, 163, 126, 0.12);
    --btn-bg: #edecec;
    --btn-fg: #14120b;
    --hub-text: #14120b;
  }
}
:root[data-theme="dark"] {
  --bg: #14120b;
  --fg: #edecec;
  --fg-60: rgba(237, 236, 236, 0.6);
  --fg-40: rgba(237, 236, 236, 0.4);
  --border: rgba(237, 236, 236, 0.1);
  --border-strong: rgba(237, 236, 236, 0.2);
  --card: #1b1913;
  --card-hover: #201e18;
  --accent: #4fa37e;
  --accent-bg: rgba(79, 163, 126, 0.12);
  --btn-bg: #edecec;
  --btn-fg: #14120b;
  --hub-text: #14120b;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
ul { list-style: none; }
svg { display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 9vw, 180px);
}

/* ---------- Type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-wrap: balance;
}
h1.display { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2.display { font-size: clamp(1.7rem, 3.2vw, 2.25rem); }

.label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-60);
}

.lede {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--fg-60);
  max-width: var(--prose);
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.2em 0.72em;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { border-color: var(--border-strong); color: var(--fg); }
.btn-ghost:hover { background: var(--card); color: var(--fg); border-color: var(--fg-40); }
.btn-sm { padding: 0.5em 0.9em 0.52em; font-size: 0.875rem; }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; color: var(--fg); }
.brand:hover { color: var(--fg); }
.wordmark {
  display: block;
  width: 108px;
  height: 26px;
  background: currentColor;
  -webkit-mask: url("/assets/wordmark.png") no-repeat left center / contain;
  mask: url("/assets/wordmark.png") no-repeat left center / contain;
}
.nav-links { display: flex; align-items: center; gap: 32px; font-size: 0.95rem; color: var(--fg); }
.nav-links a:hover { color: var(--fg-60); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.lang {
  display: inline-flex;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-40);
}
.lang a { padding: 2px 4px; border-radius: var(--r-sm); }
.lang a:hover { color: var(--fg); }
.lang .active { color: var(--fg); font-weight: 600; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: transparent; color: var(--fg-60); cursor: pointer;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--fg-40); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-moon { display: block; }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--border); }
.section-head { max-width: var(--prose); margin-bottom: 48px; }
.section-head .label { display: block; margin-bottom: 16px; }
.section-head p { margin-top: 16px; color: var(--fg-60); font-size: 1.05rem; text-wrap: pretty; }

/* Hero */
.hero { padding: 120px 0 96px; }
.hero .label { display: block; margin-bottom: 24px; }
.hero h1 { max-width: 900px; }
.hero .lede { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Models bar */
.trust { padding: 36px 0; }
.trust .label { display: block; margin-bottom: 20px; }
.models { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.model {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-60);
  transition: color 0.15s ease;
}
.model:hover { color: var(--fg); }
.model-logo { display: inline-flex; }
.model-icon { width: 18px; height: 18px; fill: currentColor; }

/* Cards grid */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.card:hover { background: var(--card-hover); border-color: var(--border-strong); }
.card .num { font-size: 0.75rem; font-weight: 500; color: var(--accent); letter-spacing: 0.06em; }
.card h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; margin: 14px 0 10px; }
.card p { color: var(--fg-60); font-size: 0.95rem; }
.card ul { margin-top: 16px; display: grid; gap: 6px; font-size: 0.9rem; color: var(--fg-60); }
.card li { padding-left: 14px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 5px; height: 1px; background: var(--fg-40); }

/* Expertise list */
.expertise-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
}
.expertise-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px 12px;
  padding: 22px 8px;
  border-bottom: 1px solid var(--border);
}
.expertise-list li:nth-child(odd) { border-right: 1px solid var(--border); padding-right: 32px; }
.expertise-list li:nth-child(even) { padding-left: 32px; }
.expertise-list .num { font-size: 0.75rem; font-weight: 500; color: var(--fg-40); padding-top: 3px; }
.expertise-list strong { display: block; font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.expertise-list p { grid-column: 2; color: var(--fg-60); font-size: 0.92rem; margin-top: 2px; }

/* Demo (interactive orchestrator) */
.demo {
  max-width: 1040px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--card);
  overflow: hidden;
  font-size: 0.85rem;
}
.demo-titlebar {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem; font-weight: 500; color: var(--fg-60);
}
.demo-dots { display: inline-flex; gap: 6px; }
.demo-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-40); opacity: 0.5; }
.demo-title { flex: 1; text-align: center; padding-right: 60px; }
.demo-body { display: grid; grid-template-columns: 200px 1fr 200px; height: 460px; }
.demo-body > * { min-width: 0; }
.demo-side, .demo-rail { padding: 16px 14px; }
.demo-side { border-right: 1px solid var(--border); }
.demo-rail { border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px; }
.demo-main { padding: 16px 20px; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.demo-h { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-40); margin-bottom: 10px; display: block; }
.demo-runs { display: grid; gap: 4px; }
.demo-run {
  display: grid; grid-template-columns: 14px 1fr; gap: 8px; align-items: start;
  padding: 8px 8px; border-radius: var(--r-md); cursor: pointer;
  transition: background 0.15s ease;
}
.demo-run:hover { background: var(--card-hover); }
.demo-run.is-active { background: var(--bg); }
.demo-run strong { display: block; font-weight: 500; font-size: 0.85rem; letter-spacing: -0.01em; }
.demo-run small { display: block; font-size: 0.72rem; color: var(--fg-60); margin-top: 2px; }
.demo-status { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--fg-40); margin-top: 5px; }
.demo-status.is-running { border-color: var(--accent); border-top-color: transparent; animation: demo-spin 0.9s linear infinite; }
.demo-status.is-waiting { border-color: #c9a227; background: #c9a227; }
.demo-status.is-done { border-color: var(--accent); background: var(--accent); }
@keyframes demo-spin { to { transform: rotate(360deg); } }
.demo-request { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); margin-bottom: 14px; }
.demo-request .demo-h { margin-bottom: 4px; }
.demo-request p { font-size: 0.9rem; line-height: 1.45; }
.demo-timeline { display: grid; gap: 8px; align-content: start; flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
.demo-step { display: grid; gap: 4px; padding: 8px 10px 8px 14px; border-left: 2px solid var(--border-strong); animation: demo-in 0.3s ease; }
@keyframes demo-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.demo-who { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-60); }
.demo-hub, .demo-done { border-left-color: var(--accent); }
.demo-hub .demo-who, .demo-done .demo-who { color: var(--accent); }
.demo-done > span:last-child { font-weight: 500; }
.demo-done.is-rejected { border-left-color: var(--fg-40); }
.demo-tool code { font-family: var(--font-mono); font-size: 0.76rem; color: var(--fg); word-break: break-all; }
.demo-out { font-family: var(--font-mono); font-size: 0.74rem; color: var(--fg-60); }
.demo-tool.is-done .demo-out { color: var(--fg); }
.demo-human { border-left-color: #c9a227; background: rgba(201, 162, 39, 0.06); border-radius: 0 var(--r-md) var(--r-md) 0; }
.demo-human .demo-who { color: #b08a1c; }
.demo-actions { display: flex; gap: 8px; margin-top: 6px; }
.demo-btn { font: inherit; font-size: 0.78rem; font-weight: 500; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); cursor: pointer; }
.demo-btn:hover { border-color: var(--fg-40); }
.demo-yes { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.demo-yes:hover { background: var(--accent); color: #fff; }
.demo-decided { font-size: 0.78rem; font-weight: 500; color: var(--fg-60); }
.demo-spokes { display: grid; gap: 6px; }
.demo-spoke { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--fg-60); padding: 4px 0; }
.demo-spoke i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--fg-40); flex: none; transition: all 0.2s ease; }
.demo-spoke.is-hub { color: var(--fg); font-weight: 500; }
.demo-spoke.is-used i { border-color: var(--accent); }
.demo-spoke.is-active { color: var(--fg); }
.demo-spoke.is-active i { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.demo-meter strong { font-size: 1.5rem; letter-spacing: -0.02em; font-weight: 500; display: block; margin-top: -4px; }
.demo-replay { margin-top: auto; font: inherit; font-size: 0.78rem; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border-strong); background: transparent; color: var(--fg-60); cursor: pointer; }
.demo-replay:hover { color: var(--fg); border-color: var(--fg-40); }
.diagram-caption { max-width: 1040px; margin-top: 20px; font-size: 0.9rem; color: var(--fg-60); text-align: center; text-wrap: pretty; }

/* Outcomes */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.outcome { padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.outcome .from { font-size: 0.8rem; color: var(--fg-40); text-decoration: line-through; }
.outcome .to { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 12px; }
.outcome p { color: var(--fg-60); font-size: 0.92rem; }

/* Approach steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.step { padding: 28px 24px; border-right: 1px solid var(--border); background: var(--bg); }
.step:last-child { border-right: 0; }
.step .num { font-size: 0.75rem; font-weight: 500; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.step h3 { font-size: 1.1rem; font-weight: 600; margin: 14px 0 8px; letter-spacing: -0.01em; }
.step p { color: var(--fg-60); font-size: 0.92rem; }

/* CTA */
.cta { background: var(--card); }
.contact-primary { margin-top: 40px; max-width: 720px; }
.contact-h { display: block; font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-60); margin-bottom: 10px; }
.contact-primary .btn { margin-top: 4px; }
.contact-note { margin-top: 12px; color: var(--fg-60); font-size: 0.98rem; }
.contact-or { display: flex; align-items: center; gap: 16px; max-width: 1040px; margin: 40px 0 8px; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-40); }
.contact-or::before, .contact-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cal-inline { margin-top: 8px; min-height: 560px; max-width: 1040px; overflow: hidden; }
.cal-inline iframe { display: block; margin-bottom: -100px !important; }
.cta-email { margin-top: 20px; font-size: 0.9rem; color: var(--fg-60); }
.cta-email a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; font-size: 0.875rem; color: var(--fg-60); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 36px; }
.site-footer .wordmark { width: 84px; height: 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); gap: 24px 48px; }
.footer-h { display: block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-40); margin-bottom: 10px; }
.footer-grid p { line-height: 1.7; }
.footer-grid a:hover { color: var(--fg); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--fg-40); }

/* FAQ */
.faq { max-width: 820px; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; font-weight: 300; color: var(--fg-40); flex: none; transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p { padding: 0 0 22px; max-width: 720px; color: var(--fg-60); font-size: 0.98rem; line-height: 1.65; }

/* Articles (/insights) */
.article-hero { padding: 88px 0 40px; }
.article-hero .label { display: block; margin-bottom: 16px; }
.article-hero h1 { max-width: 900px; }
.article-hero .lede { margin-top: 20px; }
.article-meta { margin-top: 24px; font-size: 0.85rem; color: var(--fg-40); }
.article { padding: 24px 0 96px; }
.prose { max-width: 720px; font-size: 1.05rem; line-height: 1.7; }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; letter-spacing: -0.02em; margin: 48px 0 14px; line-height: 1.2; }
.prose h3 { font-weight: 600; font-size: 1.1rem; margin: 30px 0 8px; letter-spacing: -0.01em; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose ol { list-style: decimal; }
.prose ul { list-style: disc; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--fg-40); }
.prose strong { font-weight: 600; }
.prose code { font-family: var(--font-mono); font-size: 0.86em; background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.prose pre { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; overflow-x: auto; margin: 0 0 20px; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.8rem; line-height: 1.6; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 0.92rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 600; color: var(--fg); }
.prose td { color: var(--fg-60); }
.prose .callout { border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 22px; color: var(--fg-60); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.prose a:hover { color: var(--accent); }
.article-cta { margin-top: 56px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--card); max-width: 720px; }
.article-cta p { color: var(--fg-60); margin: 8px 0 18px; }
.breadcrumb { font-size: 0.85rem; color: var(--fg-40); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--fg); }

/* Insights list */
.insights-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.insight-card { display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; transition: background 0.15s ease, border-color 0.15s ease; }
.insight-card:hover { background: var(--card-hover); border-color: var(--border-strong); color: inherit; }
.insight-card .label { display: block; margin-bottom: 14px; }
.insight-card h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 10px; }
.insight-card p { color: var(--fg-60); font-size: 0.95rem; }
.insight-card .more { display: inline-block; margin-top: 16px; font-size: 0.9rem; font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4, .outcomes, .insights-list { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .demo-body { grid-template-columns: 180px 1fr; }
  .demo-rail { display: none; }
}

@media (max-width: 640px) {
  section { padding: 72px 0; }
  .hero { padding: 72px 0 64px; }
  .nav-links { display: none; }
  .grid-3, .grid-4, .outcomes, .steps, .expertise-list, .insights-list { grid-template-columns: 1fr; }
  .expertise-list li { padding: 18px 0 !important; border-right: 0 !important; }
  .step { border-right: 0; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: 0; }
  .card, .outcome { padding: 22px; }
  .demo-body { grid-template-columns: 1fr; height: auto; }
  .demo-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .demo-runs { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
  .demo-main { padding: 14px; }
  .demo-timeline { max-height: 360px; }
  .models { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
}
