/* Munin Labs — site styles */

:root {
  --bg: #0b1220;
  --bg-alt: #0f1829;
  --surface: #131e33;
  --surface-2: #182541;
  --border: #243452;
  --text: #e6eaf2;
  --text-muted: #9aa7bd;
  --accent: #f5a524;
  --accent-strong: #ffb84d;
  --accent-ink: #1a1200;
  --ok: #3ddc97;
  --warn: #f5a524;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 8px;
  --max: 1160px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.small { font-size: 0.875rem; }
.muted { color: var(--text-muted); }
.narrow { max-width: 42rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.lede { font-size: 1.15rem; color: var(--text-muted); }

.skip-link {
  position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem;
  background: var(--accent); color: var(--accent-ink); z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s, background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }
.text-link { font-weight: 600; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
.brand strong { font-weight: 800; }
.brand.small { font-size: 0.95rem; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }
.site-nav .btn { color: var(--accent-ink); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 0.5rem; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.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 {
  position: relative; overflow: hidden;
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(245, 165, 36, 0.14), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(61, 220, 151, 0.08), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero-grid > *, .split > *, .founder > * { min-width: 0; }
.hero-copy .lede { max-width: 36rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0; }
.hero-points { list-style: none; display: grid; gap: 0.5rem; color: var(--text-muted); font-size: 0.95rem; }
.hero-points li { padding-left: 1.6rem; position: relative; }
.hero-points li::before {
  content: ''; position: absolute; left: 0; top: 0.45em; width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--accent); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2l-3.5-3.5L4 14.2l5 5 11-11-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
}
.panel-head { display: flex; align-items: center; gap: 6px; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.panel-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.panel-title { margin-left: 0.6rem; font-family: var(--mono); font-size: 0.75rem; color: var(--text-muted); }
.panel-body { margin: 0; padding: 1.1rem 1.2rem; font-family: var(--mono); font-size: 0.78rem; line-height: 1.8; overflow-x: auto; color: var(--text); }
.c-muted { color: var(--text-muted); }
.c-ok { color: var(--ok); font-weight: 600; }
.c-warn { color: var(--warn); font-weight: 600; }

/* Strip */
.strip { border-block: 1px solid var(--border); background: var(--bg-alt); padding: 1rem 0; }
.strip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.strip-row ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-weight: 600; color: var(--text); }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(245, 165, 36, 0.5); transform: translateY(-2px); }
.card-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(245, 165, 36, 0.12); color: var(--accent); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0.4rem 0 0; }
.card-tag { color: var(--accent); font-weight: 600; margin: 0; font-size: 0.95rem; }
.card > p:not(.card-tag) { color: var(--text-muted); }
.card .text-link { margin-top: auto; padding-top: 0.5rem; }

.checks { list-style: none; display: grid; gap: 0.5rem; }
.checks li { position: relative; padding-left: 1.6rem; font-size: 0.95rem; }
.checks li::before {
  content: ''; position: absolute; left: 0; top: 0.35em; width: 1rem; height: 1rem; border-radius: 50%;
  background: rgba(61, 220, 151, 0.15);
  box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.5);
}
.checks li::after {
  content: ''; position: absolute; left: 0.32rem; top: 0.55em; width: 0.28rem; height: 0.5rem;
  border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 1.25rem; }
.steps li { position: relative; padding-left: 3.5rem; counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0.1rem;
  font-family: var(--mono); font-weight: 700; color: var(--accent); font-size: 1.1rem;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { color: var(--text-muted); margin: 0; }

/* Founder */
.founder { display: grid; grid-template-columns: 180px 1fr; gap: 2.5rem; align-items: start; }
.founder-mark img { width: 140px; height: 140px; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5)); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.price-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.price-card > p { color: var(--text-muted); }
.price-card.featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(245, 165, 36, 0.08), transparent 60%), var(--surface); }
.badge {
  position: absolute; top: -0.8rem; left: 1.5rem; background: var(--accent); color: var(--accent-ink);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.7rem; border-radius: 999px; margin: 0;
}
.pricing-principles { margin-top: 2.5rem; padding: 2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pricing-principles ul { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; margin-bottom: 1.5rem; color: var(--text-muted); }
.pricing-principles strong { color: var(--text); }
.pricing-principles p { margin: 0; }

/* Forms */
.form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; display: grid; gap: 1.1rem;
}
.form-row { display: grid; gap: 1rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form label, .form fieldset { display: grid; gap: 0.35rem; min-width: 0; }
.form label > span, .form legend { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); padding: 0; }
.form em { color: var(--accent); font-style: normal; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.65rem 0.8rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.2);
}
.form input[aria-invalid="true"], .form select[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: var(--danger); }
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239aa7bd'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.6rem center; background-size: 18px; padding-right: 2rem; }
.form input[type="date"] { color-scheme: dark; }
.field-error { font-size: 0.8rem; color: var(--danger); margin: 0; }
.chip-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.chip { position: relative; display: inline-flex !important; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.form label.chip > span {
  display: inline-block; padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid var(--border);
  font-size: 0.9rem; font-weight: 500; color: var(--text); background: var(--bg); transition: all 0.15s;
}
.form label.chip > input:checked + span { background: rgba(245, 165, 36, 0.15); border-color: var(--accent); color: var(--accent-strong); }
.form label.chip > input:focus-visible + span { box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.3); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.form-status.ok { color: var(--ok); }
.form-status.error { color: var(--danger); }
.form-success { text-align: center; padding: 2rem 1rem; display: grid; gap: 0.75rem; justify-items: center; }
.form-success .tick {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(61, 220, 151, 0.15); color: var(--ok); font-size: 1.6rem; font-weight: 700;
}
.form-success h3 { margin: 0; }
.form-success p { margin: 0; color: var(--text-muted); max-width: 30rem; }

/* Contact */
.contact-details { display: grid; gap: 1rem; margin: 1.5rem 0 0; }
.contact-details dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 600; }
.contact-details dd { margin: 0; font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; background: var(--bg); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-row p { margin: 0; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { color: var(--text-muted); font-size: 0.875rem; }
.footer-nav a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .split, .founder { grid-template-columns: 1fr; }
  .cards, .pricing-grid { grid-template-columns: 1fr; }
  .pricing-principles ul { grid-template-columns: 1fr; }
  .founder-mark { display: none; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 0.5rem 1rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 0.75rem; border-bottom: 0; }
  .form-row.two, .form-row.three { grid-template-columns: 1fr; }
  .form { padding: 1.25rem; }
  .panel-body { font-size: 0.72rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

/* Free OCR page */
.hero-compact { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.hero-compact .hero-points { margin-top: 1.5rem; }
.ocr-section { padding-top: 0; }
.ocr-app { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.5rem; align-items: start; }
.ocr-app > * { min-width: 0; }
.ocr-input { display: grid; gap: 1rem; }
.dropzone {
  display: grid; justify-items: center; gap: 0.35rem; text-align: center; cursor: pointer;
  padding: 2.5rem 1.5rem; border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text-muted); transition: border-color 0.15s, background 0.15s;
}
.dropzone svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 0.5rem; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-over { border-color: var(--accent); background: var(--surface-2); outline: none; }
.dropzone.is-busy { cursor: progress; opacity: 0.7; }
.dropzone-title { margin: 0; font-weight: 600; color: var(--text); font-size: 1.05rem; }
.dropzone-hint { margin: 0; font-size: 0.875rem; }
.preview {
  display: grid; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.preview img { width: 100%; max-height: 320px; object-fit: contain; border-radius: var(--radius-sm); background: #fff; }
.preview p { margin: 0; overflow-wrap: anywhere; }
.progress { display: grid; gap: 0.4rem; }
.progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.progress p { margin: 0; }
.ocr-notes p { margin: 0 0 0.35rem; }
.ocr-output {
  display: grid; gap: 0.75rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.toolbar-title { margin: 0; font-size: 1.05rem; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.result {
  width: 100%; min-height: 420px; resize: vertical; font: 0.9rem/1.6 var(--mono); color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.9rem 1rem;
}
.result:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.2); }
.result-meta { margin: 0; min-height: 1.2em; }
@media (max-width: 960px) {
  .ocr-app { grid-template-columns: 1fr; }
  .result { min-height: 300px; }
}
