/* Mimac — mimac.ai
   Hand-written. Dark by default; pages with body.auto follow the system
   appearance. System font stack only. */

:root {
  --bg: #0B0D12;
  --bg-2: #11141B;
  --bg-3: #171B25;
  --bg-4: #1E2330;
  --fg: #F2F4F8;
  --fg-2: #A9B1BF;
  --fg-3: #828A9A;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #4FD1FF;
  --accent-2: #86E1FF;
  --accent-ink: #052433;
  --accent-dim: rgba(79, 209, 255, 0.12);
  --ok: #5CE0A5;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --r: 14px;
  --r-lg: 22px;
  --wrap: 1120px;
  --font: -apple-system, "SF Pro Text", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

body { color-scheme: dark; }

@media (prefers-color-scheme: light) {
  body.auto {
    --bg: #FBFBFD;
    --bg-2: #F3F4F8;
    --bg-3: #EAECF2;
    --bg-4: #DFE2EA;
    --fg: #0B0D12;
    --fg-2: #4B5260;
    --fg-3: #626A7A;
    --line: rgba(10, 14, 24, 0.08);
    --line-2: rgba(10, 14, 24, 0.16);
    --accent: #0A6FA8;
    --accent-2: #085B8C;
    --accent-ink: #FFFFFF;
    --accent-dim: rgba(10, 111, 168, 0.1);
    --ok: #1B9E6A;
    --shadow: 0 30px 80px rgba(20, 30, 50, 0.18);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Links inside running text stay distinguishable without relying on colour alone. */
main a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
main a:not(.btn):hover { text-decoration-color: currentColor; }
main .aside ul a, main .dl-list a, main .swatches a { text-decoration: none; }
main .aside ul a:hover, main .dl-list a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.9rem); letter-spacing: -0.03em; line-height: 1.06; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
kbd { background: var(--bg-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 0.05em 0.45em; color: var(--fg); white-space: nowrap; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--fg-2); line-height: 1.5; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 760px; margin-inline: auto; }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1.1;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-2); text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--fg-3); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--fg); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a { color: var(--fg-2); font-weight: 500; font-size: 0.95rem; }
.menu a:hover { color: var(--fg); text-decoration: none; }
.menu a.btn { color: var(--accent-ink); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.25rem 1.25rem 1.25rem;
  }
  .nav-open .menu { display: flex; }
  .menu a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .menu a.btn { margin-top: 1rem; border-bottom: 0; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -10px;
    background: transparent; border: 0; cursor: pointer; color: var(--fg);
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease; position: relative;
  }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -7px; }
  .nav-toggle span::after { top: 7px; }
  .nav-open .nav-toggle span { background: transparent; }
  .nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 0; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: 40%; width: 140vw; max-width: 1800px; height: 80%;
  transform: translateX(-50%);
  background: radial-gradient(50% 45% at 50% 60%, rgba(79, 209, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.hero > .wrap { position: relative; }
.hero h1 { max-width: 15ch; margin: 0 auto 0.3em; }
.hero .lead { max-width: 58ch; margin: 0 auto 2rem; }
.cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.fine { margin: 1.1rem 0 0; color: var(--fg-3); font-size: 0.9rem; }
.fine b { color: var(--fg-2); font-weight: 500; }
.hero .device { margin: clamp(2.5rem, 6vw, 4.5rem) auto -2%; max-width: 1080px; }
.hero-fade { height: 120px; margin-top: -120px; position: relative; background: linear-gradient(to bottom, transparent, var(--bg) 85%); pointer-events: none; }

/* ---------- device frame ---------- */
.device { position: relative; width: 100%; aspect-ratio: 1600 / 1344; }
.device-screen {
  position: absolute; left: 8.625%; top: 6.101%; width: 82.75%; height: 73.921%;
  object-fit: cover; background: #0A0B0E;
}
.device-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.device-plain { border-radius: 4% / 5.3%; overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: #0A0B0E; }
.device-plain img, .device-plain video { width: 100%; height: 100%; object-fit: cover; }
.caption { margin-top: 0.9rem; font-size: 0.85rem; color: var(--fg-3); text-align: center; }

/* ---------- proof strip ---------- */
.proof { border-block: 1px solid var(--line); background: var(--bg-2); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2rem 0; }
.proof-grid > div { text-align: center; padding: 0.5rem; }
.proof b { display: block; font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700; letter-spacing: -0.035em; color: var(--fg); line-height: 1.1; }
.proof span { color: var(--fg-2); font-size: 0.9rem; }
@media (max-width: 700px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head .lead { margin: 0 auto; }
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; grid-template-columns: 1fr 1fr; }
.split .media { min-width: 0; }
.split-rev .media { order: -1; }
.split .copy h2 { max-width: 16ch; }
.split .copy .lead { margin-bottom: 0.5rem; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split .media, .split-rev .media { order: -1; }
  .split .copy h2 { max-width: none; }
}

.feature-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; color: var(--fg-2); align-items: start; }
.feature-list li strong { color: var(--fg); font-weight: 600; }
.feature-list svg { width: 22px; height: 22px; color: var(--accent); margin-top: 0.15rem; flex: none; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.75rem; }
.card > svg { width: 30px; height: 30px; color: var(--accent); }
.card h3 { margin-top: 1rem; font-size: 1.15rem; }
.card p { color: var(--fg-2); margin: 0; }
.card p + p { margin-top: 0.8em; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .cards-2 { grid-template-columns: 1fr; } }

.diagram { width: 100%; height: auto; }

/* ---------- comparison table ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); }
table.compare { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.9rem; }
.compare th, .compare td { padding: 0.85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); line-height: 1.4; }
.compare thead th { background: var(--bg-3); font-weight: 600; font-size: 0.85rem; color: var(--fg); white-space: nowrap; }
.compare tbody th { font-weight: 500; color: var(--fg); min-width: 190px; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare td { color: var(--fg-2); }
.compare .m { background: var(--accent-dim); color: var(--fg); }
.compare thead .m { color: var(--accent); }
.compare .y { color: var(--ok); font-weight: 600; }
.compare .n { color: var(--fg-3); }
.compare tbody tr { cursor: default; }
.compare tbody tr:hover > * { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.compare tbody tr:hover > .m { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.compare tbody tr.pinned > * { background: color-mix(in srgb, var(--fg) 9%, transparent); }
.compare tbody tr.pinned > .m { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.compare-4 { min-width: 640px; }
.compare-2 { min-width: 520px; }
.compare-2 tbody th { min-width: 170px; }
.footnote { margin-top: 1rem; font-size: 0.82rem; color: var(--fg-3); line-height: 1.5; }

/* ---------- pricing ---------- */
.price-card {
  max-width: 560px; margin-inline: auto; text-align: center;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow);
}
.price { font-size: clamp(3.2rem, 8vw, 4.8rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; margin: 0.4rem 0 0.2rem; }
.price sup { font-size: 0.42em; vertical-align: top; margin-top: 0.35em; display: inline-block; letter-spacing: -0.02em; }
.price-sub { color: var(--fg-2); margin: 0; }
.launch { display: inline-block; margin-top: 1rem; padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--accent-dim); color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.price-list { list-style: none; padding: 0; margin: 1.75rem 0; text-align: left; display: grid; gap: 0.65rem; color: var(--fg-2); }
.price-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.price-list svg { width: 20px; height: 20px; color: var(--ok); margin-top: 0.2rem; }
.price-list strong { color: var(--fg); font-weight: 600; }
.price-card .btn { width: 100%; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2.4rem 1.15rem 0; font-weight: 600; font-size: 1.05rem; position: relative; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 1.25rem; color: var(--fg-2); max-width: 68ch; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; color: var(--fg-2); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer h3 { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 0.9rem; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer a { color: var(--fg-2); }
.footer a:hover { color: var(--fg); }
.footer .brand { margin-bottom: 0.9rem; }
.footer-blurb { max-width: 34ch; color: var(--fg-3); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem; color: var(--fg-3); font-size: 0.85rem; }
.footer-bottom a { color: var(--fg-3); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- text pages ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); max-width: 20ch; }
.page-head .lead { max-width: 62ch; }
.crumbs { font-size: 0.85rem; color: var(--fg-3); margin: 0 0 1.25rem; }
.crumbs a { color: var(--fg-3); }
.crumbs a:hover { color: var(--fg); }
.crumbs span { margin: 0 0.4rem; }
.page-body { padding-bottom: clamp(3rem, 7vw, 6rem); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.75rem 0 0.75rem; }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
.prose p, .prose li { color: var(--fg-2); font-size: 1.04rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--fg-3); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose code { background: var(--bg-3); padding: 0.1em 0.4em; border-radius: 6px; color: var(--fg); }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.25rem; overflow-x: auto; font-size: 0.88rem; line-height: 1.55; color: var(--fg); }
.prose pre code { background: none; padding: 0; }
.prose .table-wrap { margin: 1.5rem 0; }
.prose table.compare { min-width: 560px; }
.prose img, .prose .device { margin: 2rem 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.steps > li { position: relative; padding-left: 3.2rem; margin-bottom: 1.75rem; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0.05rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent); font-weight: 700; font-size: 0.95rem;
  display: grid; place-items: center;
}
.steps > li > strong:first-child { display: block; color: var(--fg); font-size: 1.1rem; margin-bottom: 0.25rem; }
.steps p:last-child { margin-bottom: 0; }
.note { border-left: 3px solid var(--accent); background: var(--bg-2); padding: 1rem 1.25rem; border-radius: 0 var(--r) var(--r) 0; margin: 1.5rem 0; }
.note p { margin-bottom: 0.5em; }
.note p:last-child { margin: 0; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.aside .card { position: sticky; top: 84px; }
.aside .card .btn { width: 100%; margin-top: 1rem; }
.aside ul { padding-left: 1.1em; margin: 0.6rem 0 0; }
.aside li { margin-bottom: 0.4rem; font-size: 0.95rem; }
@media (max-width: 960px) { .layout-aside { grid-template-columns: 1fr; } .aside .card { position: static; } }
.shortcuts { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.shortcuts th, .shortcuts td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.shortcuts th { color: var(--fg-3); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.shortcuts td:first-child { white-space: nowrap; }
.dl-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.dl-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 0.95rem; flex-wrap: wrap; }
.dl-list span { color: var(--fg-3); }
.swatches { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1rem 0 0; padding: 0; list-style: none; }
.swatches li { display: flex; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.85rem; color: var(--fg-2); }
.swatches i { display: block; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); }
.logo-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem; display: grid; place-items: center; }
.logo-tile.light { background: #FBFBFD; }
.cta-band { text-align: center; padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--line); }
.cta-band h2 { margin-bottom: 0.6rem; }
.cta-band .cta { margin-top: 1.6rem; }
.hero-mini { text-align: left; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-mini h1 { margin: 0 0 0.35em; max-width: 18ch; }
.hero-mini .lead { margin: 0 0 1.75rem; max-width: 56ch; }
.hero-mini .cta { justify-content: flex-start; }
.hero-mini .device { margin: clamp(2rem, 5vw, 3.5rem) 0 0; }
.hash-target { scroll-margin-top: 80px; }

/* ---------- 404 ---------- */
.oops { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 0; }
.oops h1 { font-size: clamp(3rem, 12vw, 8rem); color: var(--accent); }

/* ---------- skip link ---------- */
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; border-radius: 0 0 8px 0; font-weight: 600; }
.skip:focus { left: 0; }
