/* Mlinzi site design system.
   Roles: --red is for the primary action and the keyhole accent only.
   --ink for text and dark blocks, --paper for the base, --tint for
   alternate sections (a tint of charcoal). No gradients, no shadows. */

:root {
  --ink: #1D1D1D;
  --ink-soft: #454442;
  --muted: #5E5C5A;
  --red: #AF0D19;
  --red-dark: #8C0A14;
  --paper: #FFFFFF;
  --tint: #F4F3F2;
  --line: #E2DFDD;
  --keyhole-ratio: 9 / 16;        /* app screenshot slots */
  --shot-ratio: 4 / 3;            /* screen mockup / illustrative slots */
  --logo-ratio: 1 / 1;            /* logo mark slot */
  --photo-ratio: 3 / 2;           /* photo / map slots */
  --maxw: 1120px;
  --pad: 20px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 70ch; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--paper); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 12px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; height: 100%; text-decoration: none; }
.brand-logo {
  height: 100%;
  width: auto;
  max-height: 46px;
  display: block;
  object-fit: contain;
}
.brand-logo-footer { max-height: 56px; }

.menu-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; background: none; border: 1px solid var(--line);
  border-radius: 6px; cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; stroke: var(--ink); }

.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 64px;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 8px var(--pad) 20px;
}
.site-nav.open { display: block; }
.site-nav a.nav-link {
  display: block; padding: 13px 4px; min-height: 44px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.site-nav a.nav-link:hover { color: var(--red); }
.site-nav a.nav-link.active { color: var(--red); }
.nav-actions { display: flex; gap: 10px; padding-top: 14px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; text-align: center;
}
.btn-red { background: var(--red); color: var(--paper); }
.btn-red:hover { background: var(--red-dark); color: var(--paper); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { color: var(--red); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- keyhole signature ---------- */

.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.kicker svg { width: 14px; height: 19px; flex: none; }

/* ---------- sections ---------- */

.section { padding: 56px 0; }
.section-tint { background: var(--tint); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink p, .section-ink li { color: #D9D7D5; }
.section-ink .kicker { color: #B9B6B3; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.lede { font-size: 1.12rem; color: var(--ink-soft); }
.section-ink .lede { color: #D9D7D5; }

/* ---------- hero ---------- */

.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 36px; }
.hero h1 span { color: var(--red); }
.hero-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.hero-note { font-size: .85rem; color: var(--muted); margin-top: 12px; }

.phone-frame {
  border: 2px solid var(--ink); border-radius: 28px;
  aspect-ratio: var(--keyhole-ratio);
  max-width: 300px; margin: 0 auto; width: 100%;
  background: var(--tint); overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-notch { height: 18px; background: var(--ink); flex: none; }
.phone-screen { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.mock-row { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .78rem; }
.mock-row b { display: block; font-size: .82rem; }
.mock-badge {
  display: inline-block; background: var(--red); color: var(--paper);
  font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 20px;
}
.mock-btn {
  background: var(--red); color: var(--paper); border-radius: 8px;
  text-align: center; font-weight: 700; font-size: .85rem; padding: 11px;
  margin-top: auto;
}
.shot-caption { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 10px; }

/* ---------- problem / answer strip ---------- */

.pairs { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pair { display: grid; }
.pair + .pair { border-top: 1px solid var(--line); }
.pair-problem, .pair-answer { padding: 20px; }
.pair-problem { background: var(--ink); color: var(--paper); font-weight: 700; display: flex; gap: 12px; align-items: flex-start; }
.pair-problem svg { width: 20px; height: 20px; flex: none; margin-top: 3px; }
.pair-answer { color: var(--ink-soft); }

/* ---------- steps ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.step-key {
  width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.step-key svg { width: 16px; height: 22px; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- feature cards / rows ---------- */

.cards { display: grid; gap: 14px; }
.card {
  border: 1px solid var(--line); border-radius: 12px; padding: 22px;
  background: var(--paper);
}
.card-icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--ink);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.card-icon svg { width: 22px; height: 22px; stroke: var(--paper); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

.feature-row { display: grid; gap: 24px; padding: 40px 0; border-top: 1px solid var(--line); }
.feature-row:first-of-type { border-top: 0; }
.shot {
  aspect-ratio: var(--shot-ratio); border: 1px solid var(--line);
  border-radius: 12px; background: var(--tint);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 24px; color: var(--muted);
}
.shot svg { width: 40px; height: 54px; opacity: .5; }
.shot .shot-name { font-size: .8rem; font-weight: 600; }

/* ---------- stat band ---------- */

.stats { display: grid; gap: 0; border-top: 1px solid #3A3938; }
.stat { padding: 24px 0; border-bottom: 1px solid #3A3938; }
.stat b { display: block; font-size: 2.4rem; font-weight: 800; color: var(--paper); line-height: 1; margin-bottom: 6px; }
.stat span { color: #B9B6B3; font-size: .95rem; }

/* ---------- audience cards / checklists ---------- */

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.check-list svg { width: 20px; height: 20px; flex: none; margin-top: 3px; stroke: var(--red); }

.quote-block {
  border-left: 4px solid var(--red); padding: 8px 0 8px 20px; margin: 0 0 24px;
}
.quote-block p { font-size: 1.05rem; color: var(--ink); margin-bottom: 8px; }
.quote-block cite { font-style: normal; font-size: .85rem; color: var(--muted); font-weight: 600; }
.sample-flag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 7px; margin-left: 8px; vertical-align: middle;
}

/* ---------- faq ---------- */

.faq-search { margin-bottom: 24px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0;
  font-weight: 700; position: relative; min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 16px;
  font-size: 1.4rem; font-weight: 400; color: var(--red); line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 0 20px; color: var(--ink-soft); }
.faq-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---------- forms ---------- */

.form-shell { max-width: 640px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid #C9C6C3; border-radius: 6px; background: var(--paper);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(175, 13, 25, .25); outline-offset: 0;
  border-color: var(--red);
}
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.field .error-text { font-size: .85rem; color: var(--red); font-weight: 600; margin-top: 5px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field-2col { display: grid; gap: 20px; }
.consent { display: flex; gap: 10px; font-size: .88rem; color: var(--ink-soft); align-items: flex-start; }
.consent input { width: 20px; height: 20px; min-height: 0; margin-top: 3px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: 8px; padding: 16px 18px; margin-bottom: 24px;
  background: var(--tint); font-weight: 600;
}
.alert ul { margin: 8px 0 0; padding-left: 20px; font-weight: 400; }
.alert-success { border-left-color: var(--red); }
.form-success {
  border: 2px solid var(--ink); border-radius: 12px; padding: 28px;
  text-align: center;
}
.form-success .step-key { margin: 0 auto 16px; border-color: var(--red); }

/* ---------- tables / definition ---------- */

.def-list { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.def-row { display: grid; padding: 14px 16px; gap: 2px; }
.def-row + .def-row { border-top: 1px solid var(--line); }
.def-row dt { font-weight: 700; font-size: .85rem; color: var(--muted); }
.def-row dd { margin: 0; }

.slot { color: var(--muted); font-style: italic; }

/* ---------- download ---------- */

.store-row { display: flex; flex-direction: column; gap: 12px; }
.store-badge {
  border: 1px solid var(--line); border-radius: 10px; padding: 18px;
  display: flex; align-items: center; gap: 14px; background: var(--tint);
}
.store-badge svg { width: 34px; height: 34px; flex: none; }
.warn {
  border: 1px solid var(--line); border-left: 4px solid var(--ink);
  background: var(--tint); border-radius: 8px; padding: 16px 18px;
}

/* ---------- floating contact stack ---------- */

.float-stack {
  position: fixed; right: 14px; bottom: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
}
.float-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper); background: var(--ink);
}
.float-btn svg { width: 24px; height: 24px; stroke: var(--paper); fill: none; }
.float-btn.wa { background: var(--red); }
.float-btn.wa svg { fill: var(--paper); stroke: none; }

/* ---------- PWA install sheet ---------- */

.pwa-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 98;
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border-top: 2px solid var(--ink);
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom));
}
.pwa-sheet[hidden] { display: none; }
.pwa-sheet-icon { width: 44px; height: 44px; flex: none; }
.pwa-sheet-body { flex: 1; min-width: 0; }
.pwa-sheet-title { margin: 0 0 2px; font-weight: 800; font-size: 1rem; }
.pwa-sheet-text { margin: 0; font-size: .85rem; color: var(--ink-soft); }
.pwa-sheet-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.pwa-dismiss {
  background: none; border: 0; font: inherit; font-size: .82rem;
  color: var(--muted); padding: 8px 4px; min-height: 44px; cursor: pointer;
}
.pwa-dismiss:hover { color: var(--red); }

@media (min-width: 640px) {
  .pwa-sheet {
    left: auto; right: 24px; bottom: 24px; max-width: 430px;
    border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  }
}

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: #D9D7D5; padding: 48px 0 32px; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { color: #F0A9AE; }
.footer-grid { display: grid; gap: 28px; }
.footer-col h4 { color: var(--paper); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.footer-col a { display: block; padding: 6px 0; color: #D9D7D5; font-size: .95rem; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-base { border-top: 1px solid #3A3938; margin-top: 32px; padding-top: 20px; font-size: .82rem; color: #9C9A97; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.footer-brand { display: inline-flex; }

/* ---------- misc ---------- */

.tag { display: inline-block; background: var(--tint); border: 1px solid var(--line); border-radius: 20px; padding: 5px 14px; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.divider-keyhole { display: flex; align-items: center; gap: 14px; margin: 0; }
.divider-keyhole::before, .divider-keyhole::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.divider-keyhole svg { width: 14px; height: 19px; flex: none; }

.submissions { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sub-row { padding: 16px; border-top: 1px solid var(--line); }
.sub-row:first-child { border-top: 0; }
.sub-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sub-type { font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--red); }
.sub-time { font-size: .8rem; color: var(--muted); }
.sub-fields { margin: 0; font-size: .9rem; }
.sub-fields b { display: inline-block; min-width: 130px; color: var(--muted); font-weight: 600; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }

.changelog-entry { border-top: 1px solid var(--line); padding: 28px 0; }
.changelog-entry:first-of-type { border-top: 0; }
.changelog-entry .ver { font-weight: 800; font-size: 1.1rem; }
.changelog-entry .date { color: var(--muted); font-size: .85rem; margin-left: 8px; }
.changelog-entry ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-soft); }

.legal-body h2 { font-size: 1.25rem; margin-top: 36px; }
.legal-body p, .legal-body li { max-width: 70ch; color: var(--ink-soft); }
.legal-body ul { padding-left: 22px; }
.legal-note { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; }

.map-slot {
  aspect-ratio: var(--photo-ratio); background: var(--tint);
  border: 1px solid var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .85rem; text-align: center; padding: 16px;
}

/* ---------- breakpoints ---------- */

@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .field-2col { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); border: 0; gap: 32px; }
  .stat { border: 0; padding: 0; }
  .store-row { flex-direction: row; }
  .store-badge { flex: 1; }
}

@media (min-width: 900px) {
  .float-stack { bottom: 24px; right: 24px; }
  .menu-toggle { display: none; }
  .site-nav {
    display: flex; position: static; padding: 0; border: 0;
    align-items: center; gap: 4px; flex: 1; justify-content: flex-end;
  }
  .site-nav a.nav-link {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: 0 12px; border: 0; font-size: .95rem;
  }
  .nav-actions { padding: 0 0 0 12px; align-items: center; }
  .hero-grid { grid-template-columns: 1.2fr .8fr; align-items: center; gap: 56px; }
  .hero { padding: 80px 0; }
  .section { padding: 80px 0; }
  .pair { grid-template-columns: 1fr 1.4fr; }
  .pair + .pair { border-top: 1px solid var(--line); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .feature-row { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .feature-row.flip .shot { order: -1; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .two-col-wide { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
  .sticky-rail { position: sticky; top: 96px; }
}

@media (min-width: 1280px) {
  :root { --pad: 24px; }
  body { font-size: 18px; }
}
