/* ecomfaktory: paper and ink with one green accent (#02D29E). */
:root {
  --paper: #f5f3ee;
  --card: #fbfaf7;
  --ink: #171613;
  --muted: #5f5c54;
  --line: #d9d5ca;
  --accent: #02D29E;
  --accent-text: #007A5A;  /* green for text on paper: #02D29E alone is too light to read */
  --accent-ink: #171613;
  --code-bg: #ebe8df;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --card: #1b1a15;
    --ink: #f1eee6;
    --muted: #a5a194;
    --line: #34322a;
    --accent: #02D29E;
    --accent-text: #02D29E;
    --accent-ink: #14130f;
    --code-bg: #24221b;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--accent-text); }
img, svg { max-width: 100%; }

.wrap { width: min(1080px, 100% - 3rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 3rem); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; flex-wrap: wrap; }
.nav { display: flex; gap: 1.6rem; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.lead { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--muted); max-width: 40rem; }
.stack > * + * { margin-top: 1.1rem; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5rem); }
.hero h1 { max-width: 14ch; margin-top: 1rem; }
.hero .lead { margin-top: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }
.button { display: inline-block; padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem; text-decoration: none; border: 1.5px solid var(--ink); }
.button.primary { background: var(--ink); color: var(--paper); }
.button.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent-text); }

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.principles h3 { margin-bottom: 0.5rem; }
.principles p { color: var(--muted); }
.principles .num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-text); display: block; margin-bottom: 0.9rem; }

/* App plates */
.plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.plate { background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 6px 6px 0 var(--ink); }
.plate.later { border-style: dashed; border-color: var(--line); box-shadow: none; background: transparent; color: var(--muted); }
.plate .meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.badge { padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid currentColor; }
.badge.soon { color: var(--accent-text); }
.badge.live { color: var(--accent-text); }
.plate p { color: var(--muted); }
.plate a.more { font-weight: 600; margin-top: auto; }

/* Content pages */
.page-head { padding-block: clamp(3rem, 7vw, 5rem) 2rem; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-top: 0.8rem; }
.page-head .lead { margin-top: 1.2rem; }
.prose { padding-bottom: 5rem; }
.prose h2 { font-size: 1.55rem; margin-top: 3rem; margin-bottom: 0.9rem; }
.prose h3 { margin-top: 1.8rem; margin-bottom: 0.5rem; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; margin: 0.8rem 0; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--accent); }
.updated { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem 2.2rem; margin-top: 2rem; }
.features h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.features p { color: var(--muted); font-size: 1rem; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 2rem; }
.tier { border: 1.5px solid var(--line); background: var(--card); border-radius: 6px; padding: 1.6rem; }
.tier.pro { border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.tier .price { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; margin: 0.4rem 0 0.2rem; }
.tier .price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier ul { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.tier li { padding-left: 1.4rem; position: relative; margin: 0.55rem 0; font-size: 1rem; }
.tier li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.6rem; height: 0.6rem; background: var(--accent); }

.note { background: var(--code-bg); border-left: 4px solid var(--accent); padding: 1rem 1.2rem; border-radius: 0 6px 6px 0; margin: 1.6rem 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.4rem 3rem; color: var(--muted); font-size: 0.93rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); }

@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; gap: 1.6rem; }
  .plate { box-shadow: 4px 4px 0 var(--ink); }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .plate { transition: background 0.15s, color 0.15s, border-color 0.15s; }
}

.promo { display: block; width: 100%; max-width: 960px; margin-top: 1.4rem; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 8px 8px 0 var(--ink); background: #000; aspect-ratio: 16 / 9; }

/* Logo lockup: a factory roofline over the wordmark. */
.brand { width: max-content; display: inline-flex; flex-direction: column; gap: 0.28rem; align-items: stretch; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.03em; line-height: 1; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand .roof { display: block; width: 0; min-width: 100%; height: auto; fill: var(--accent); }
