/* MiniDuck — shared styles */
:root {
  --ink: #1d2742;
  --ink-2: #44506b;
  --muted: #6b7690;
  --line: #e6e1d6;
  --bg: #fffaf1;
  --bg-2: #fff3dc;
  --card: #ffffff;
  --orange: #ff7a1a;
  --orange-d: #e2600a;
  --yellow: #ffc93c;
  --sky: #d9f1ff;
  --teal: #19a7a0;
  --ok: #2f9e5b;
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(29, 39, 66, .06), 0 8px 24px rgba(29, 39, 66, .07);
  --wrap: 1120px;
  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fredoka", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--orange-d); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); padding: .1em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section.tight { padding: 56px 0; }
.section.alt { background: var(--bg-2); }
.section.dark { background: var(--ink); color: #f5f1e8; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .lead, .section.dark p { color: #cfd5e4; }
.eyebrow {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--orange-d); margin-bottom: .6em;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* skip link */
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 241, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand b { font-family: var(--display); font-size: 1.3rem; font-weight: 700; }
.brand small { display: block; font-size: .7rem; color: var(--muted); line-height: 1; margin-top: 2px; letter-spacing: .04em; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); font-weight: 500; font-size: .95rem;
}
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-2); font-weight: 700; }
.nav-links .btn { margin-left: 8px; }
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 10px;
  width: 44px; height: 40px; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { margin: auto; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff !important; box-shadow: 0 4px 0 var(--orange-d); }
.btn-primary:hover { background: #ff8a33; }
.btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff !important; }
.btn-light { background: #fff; color: var(--ink) !important; }
.btn-sm { padding: 8px 16px; font-size: .92rem; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 72px; overflow: hidden; position: relative; }
.hero::before {
  content: ""; position: absolute; right: -10%; top: -20%; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, var(--yellow) 0%, rgba(255, 201, 60, 0) 65%); opacity: .35; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; position: relative; }
.hero h1 .hl { color: var(--orange); }
.hero .lead { margin-bottom: 1.6em; }
.hero-art { position: relative; max-width: 420px; justify-self: center; width: 100%; }
.hero-art svg { width: 100%; height: auto; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 18px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(47, 158, 91, .18); }
.page-hero { padding: 64px 0 40px; }
.page-hero .lead { margin-bottom: 0; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; order: -1; }
}

/* robot animation */
.md-eye { transform-origin: center; transform-box: fill-box; animation: blink 5s infinite; }
.md-float { animation: float 4s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .md-eye, .md-float { animation: none; }
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; color: var(--ink); }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--bg-2); margin-bottom: 16px; font-size: 1.6rem;
}
.card.orange .icon { background: #ffe4cf; }
.card.yellow .icon { background: #fff0c2; }
.card.sky .icon { background: var(--sky); }
.card ul { padding-left: 1.2em; margin: .4em 0 0; }
.card li { margin-bottom: .3em; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease; }
.card-link:hover { transform: translateY(-3px); color: inherit; box-shadow: 0 2px 4px rgba(29,39,66,.06), 0 16px 32px rgba(29,39,66,.1); }
.card-link .more { color: var(--orange-d); font-weight: 700; margin-top: 12px; display: inline-block; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg-2); color: var(--ink-2); }
.pill.done { background: #dcf3e5; color: #1f7a45; }
.pill.now { background: #ffe4cf; color: var(--orange-d); }
.pill.next { background: #eef0f5; color: var(--muted); }

.note {
  border-left: 4px solid var(--yellow); background: #fffbea; padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink-2); font-size: .95rem;
}
.note strong { color: var(--ink); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 700; background: #fffdf8; }

/* ---------- architecture stack ---------- */
.stack { display: grid; gap: 10px; }
.layer {
  border-radius: var(--radius-s); padding: 14px 18px; display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: center;
  border: 1px solid var(--line); background: #fff;
}
.layer b { font-family: var(--display); }
.layer span { color: var(--ink-2); font-size: .93rem; }
.layer.l1 { background: #ffe4cf; border-color: #ffd0ad; }
.layer.l2 { background: #fff0c2; border-color: #ffe08a; }
.layer.l3 { background: var(--sky); border-color: #b9e3fb; }
.layer.l4 { background: #e2f6ec; border-color: #c2ead5; }
.layer.l5 { background: #eceef5; border-color: #dadfeb; }
.layer.safety { background: var(--ink); color: #fff; border-color: var(--ink); }
.layer.safety span { color: #cfd5e4; }
.arrow { text-align: center; color: var(--muted); font-size: .8rem; line-height: 1; }
@media (max-width: 640px) { .layer { grid-template-columns: 1fr; gap: 2px; } }

pre.code {
  background: var(--ink); color: #e9edf7; padding: 20px 22px; border-radius: var(--radius); overflow-x: auto;
  font-family: var(--mono); font-size: .88rem; line-height: 1.6; margin: 0;
}
pre.code .k { color: #ffc93c; }
pre.code .s { color: #8fe3b0; }
pre.code .n { color: #7fd4ff; }

/* ---------- steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; position: relative; padding: 14px 18px 14px 62px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-s);
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--orange); color: #fff; font-weight: 700; display: grid; place-items: center; font-family: var(--display);
}

/* ---------- roadmap ---------- */
.roadmap { display: grid; gap: 14px; }
.phase {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.phase .wk { font-family: var(--display); font-weight: 700; color: var(--orange-d); }
.phase h3 { margin-bottom: .2em; }
.phase p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.phase .deliver { margin-top: 6px; font-size: .88rem; color: var(--muted); }
.phase.is-now { border: 2px solid var(--orange); box-shadow: 0 0 0 5px rgba(255, 122, 26, .1); }
@media (max-width: 640px) { .phase { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- updates feed ---------- */
.feed { display: grid; gap: 18px; }
.update {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; position: relative;
}
.update-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .86rem; color: var(--muted); margin-bottom: 8px; }
.update h3 { font-size: 1.25rem; }
.update .body p:last-child { margin-bottom: 0; }
.update .body ul { padding-left: 1.2em; margin: 0 0 1em; }
.update-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.update-tags span { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button {
  font: inherit; font-size: .9rem; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; color: var(--ink-2);
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- funding ---------- */
.meter { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.meter-top b { font-family: var(--display); font-size: 2rem; }
.bar { height: 14px; border-radius: 999px; background: #f1ece1; overflow: hidden; margin: 14px 0 10px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: inherit; width: 0; transition: width 1s ease; }

.range-row { display: grid; grid-template-columns: 200px 1fr 130px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.range-row:last-child { border-bottom: 0; }
.range-row .label { font-weight: 600; font-size: .93rem; }
.range-row .val { text-align: right; font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--ink-2); }
.range-track { position: relative; height: 12px; background: #f1ece1; border-radius: 999px; }
.range-track .lo { position: absolute; left: 0; top: 0; bottom: 0; background: var(--orange); border-radius: 999px; }
.range-track .hi { position: absolute; left: 0; top: 0; bottom: 0; background: #ffd2ad; border-radius: 999px; }
.legend { display: flex; gap: 18px; font-size: .85rem; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
@media (max-width: 640px) { .range-row { grid-template-columns: 1fr; gap: 6px; } .range-row .val { text-align: left; } }

.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tier { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.tier .amt { font-family: var(--display); font-size: 1.9rem; font-weight: 700; }
.tier .what { font-weight: 700; margin: 4px 0 6px; }
.tier p { color: var(--ink-2); font-size: .92rem; flex: 1; }
.tier.featured { border-color: var(--orange); background: #fffaf4; }
@media (max-width: 960px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiers { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.3rem; line-height: 1; color: var(--orange-d); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--orange); color: #fff; border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  position: relative; overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--yellow); opacity: .35; }
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { margin: 0; color: #fff3e8; max-width: 38em; }
.cta-band .btn-row { position: relative; z-index: 1; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 32px 24px; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #cfd5e4; padding: 56px 0 28px; margin-top: 0; font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--yellow); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h4 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.foot-brand img { width: 36px; height: 36px; }
.foot-brand b { color: #fff; font-family: var(--display); font-size: 1.2rem; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .84rem; color: #9aa4bd; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

.nav-links .btn-primary[aria-current="page"], .nav-links .btn-primary:hover { background: var(--orange); color: #fff; }
.nav-links .btn-primary { padding: 8px 18px; }

.nav-links a.lang-switch { border: 1.5px solid var(--line); font-weight: 700; font-size: .82rem; padding: 6px 12px; margin-left: 4px; }
.nav-links a.lang-switch:hover { border-color: var(--ink); background: transparent; }
@media (max-width: 860px) { .nav-links a.lang-switch { margin: 6px 0 0; text-align: center; } }

.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }

/* Inline-code styling must not leak into code blocks */
pre.code code { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }

/* Card icons (inline SVG, colour follows the card accent) */
.card .icon { color: var(--orange-d); }
.card.yellow .icon { color: #b7791f; }
.card.sky .icon { color: #1f7fb8; }
.card .icon svg { width: 26px; height: 26px; }

/* ---------- contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form .req { color: var(--orange-d); margin-left: 2px; }
.contact-form .opt { font-weight: 400; color: var(--muted); }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: #fff; width: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 11px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 122, 26, .15);
}
.contact-form.validated :invalid { border-color: #d14343; }
.contact-form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-2); }
.contact-form label.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--orange); flex: none; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: -6px 0 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-actions .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #1f7a45; }
.form-status.err { color: #b42318; }
.steps.compact li { padding: 10px 14px 10px 54px; font-size: .95rem; }
.steps.compact li::before { width: 26px; height: 26px; top: 10px; left: 14px; font-size: .85rem; }
.contact-form .lbl { display: block; }
