/* Margily — public landing page. No external resources, no tracking. */

:root {
  --bg: #fbfbf9;
  --bg-alt: #f3f4f1;
  --surface: #ffffff;
  --text: #0b1220;
  --text-soft: #475467;
  --border: #e4e6e1;
  --accent: #0f766e;
  --accent-strong: #0b5f58;
  --accent-soft: #e6f2f0;
  --radius: 14px;
  --container: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 650;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 760px;
}

.center {
  text-align: center;
}

.muted {
  color: var(--text-soft);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--text);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(251, 251, 249, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero */

.hero {
  padding: 112px 0 104px;
  background:
    radial-gradient(800px 360px at 50% -80px, var(--accent-soft), transparent 70%),
    var(--bg);
}

.hero-inner {
  max-width: 860px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  margin-bottom: 24px;
}

.accent {
  color: var(--accent);
}

.lead {
  max-width: 660px;
  margin: 0 auto 36px;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0;
}

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--accent-strong);
}

.hero-note {
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* Sections */

.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.section-alt {
  background: var(--bg-alt);
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 20px;
}

.section-head {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-head p:last-child {
  color: var(--text-soft);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-icon {
  width: 26px;
  height: 26px;
  margin-bottom: 18px;
  color: var(--accent);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.section-foot {
  max-width: 720px;
  margin: 40px 0 0;
  color: var(--text-soft);
}

.stack {
  margin: 8px 0 14px;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Footer */

.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0 0 4px;
}

.footer-brand {
  font-weight: 700;
}

.footer-meta {
  text-align: right;
}

/* Responsive */

@media (max-width: 960px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding: 72px 0 64px;
  }

  .section {
    padding: 64px 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    text-align: left;
  }
}
