/* miklabs.com landing page — hand-written, no preprocessor, no framework,
   no external fonts, no CDN, no images. Self-contained + CSP-clean: the page
   ships zero inline <script> and only the same-origin /styles.css + /script.js.
   Miklabs is the platform's OWN page — deliberately minimal, expandable later.

   Layout lives in classes here (not inline style= attributes) so the CSP can
   stay tight and the markup stays readable. */

:root {
  --paper: #FBFCFD;       /* main background */
  --paper-2: #FFFFFF;     /* card surfaces */
  --alt: #F1F4F8;         /* alternating section background */
  --ink: #0B0E14;         /* headings, dark sections */
  --ink-2: #10141C;       /* footer (darker) */
  --ink-3: #4B5563;       /* secondary brand square, muted text */
  --muted: #4B5563;       /* body text */
  --muted-2: #6B7280;     /* fine print, eyebrows */
  --line: rgba(11, 14, 20, 0.10);
  --accent: #2563EB;      /* Signal blue — CTAs, links, highlights */
  --accent-ink: #FFFFFF;  /* text on the accent */

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container { width: min(960px, 92vw); margin-inline: auto; }

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* ── Buttons + links ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(11, 14, 20, 0.14); }
.btn-accent:hover { filter: brightness(0.94); }
.btn-lg { font-size: 1rem; padding: 14px 26px; }

.link-arrow {
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.link-arrow span { color: var(--accent); transition: transform .2s ease; }
.link-arrow:hover span { transform: translateX(3px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

/* ── Header / nav ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 253, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: clamp(56px, 9vw, 108px) 0 clamp(48px, 7vw, 84px); }
.hero-title {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 16ch;
  text-wrap: balance;
}
.hero-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.24rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 54ch;
  margin: 0 0 30px;
}
.hero-lede strong { color: var(--ink); font-weight: 650; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  margin-bottom: 22px;
}
.hero-meta { font-size: 0.88rem; color: var(--muted-2); margin: 0; }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section-alt { background: var(--alt); border-block: 1px solid var(--line); padding: clamp(60px, 9vw, 104px) 0; }
.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
}
.section-lede {
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: var(--muted);
  line-height: 1.65;
  max-width: 56ch;
  margin: 0 0 40px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
.card-title { font-size: 1.14rem; font-weight: 650; color: var(--ink); margin: 0 0 9px; }
.card-body { font-size: 0.98rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* ── Join / waitlist ─────────────────────────────────────────────────────── */
.section-join { padding: clamp(64px, 10vw, 120px) 0; }
.join-inner { max-width: 560px; }
.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.field { flex: 1 1 220px; min-width: 200px; }
.waitlist-form input {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid rgba(11, 14, 20, 0.18);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 1rem;
  color: var(--ink);
  font-family: inherit;
  outline: none;
}
.waitlist-form input:focus { border-color: var(--accent); }
.waitlist-form .btn { flex: 0 0 auto; }

.form-status { margin-top: 16px; font-size: 0.95rem; font-weight: 550; }
.form-status.is-error { color: #B4282F; }
.form-status.is-ok { color: #1F7A4D; }

.form-success {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  padding: 26px;
  text-align: center;
  margin-top: 8px;
}
.form-success-mark { font-size: 1.5rem; margin-bottom: 8px; color: var(--accent); }
.form-success-title { font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.form-success-body { font-size: 0.96rem; color: var(--muted); }

.fine-print { font-size: 0.88rem; color: var(--muted-2); margin-top: 18px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink-2); color: rgba(255, 255, 255, 0.62); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0;
}
.footer-name { color: #F3F5F8; }
.footer-meta { font-size: 0.86rem; color: rgba(255, 255, 255, 0.5); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .nav-cta { display: none; }  /* hero + join both surface the CTA */
  .waitlist-form .btn { flex: 1 1 100%; }
}

/* ── Honor reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
