/* Matter Due marketing site — plain CSS, no build step.
   Colours and type are custom properties so a rebrand is one block. */

:root {
  --ink: #0f1a2b;
  --ink-soft: #4b5b71;
  --ink-faint: #8492a6;
  --line: #e3e8f1;
  --line-soft: #edf1f7;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --brand: #1f5fd6;
  --brand-hover: #184ec0;
  --brand-deep: #0f2c66;
  --brand-tint: #eaf1fe;
  --brand-tint-strong: #dbe8fd;
  --amber: #b0740c;
  --amber-tint: #fbf1de;
  --critical: #c0392b;
  --critical-tint: #fdecea;
  --ok: #1f8a4c;
  --ok-tint: #e9f7ee;
  --radius: 12px;
  --radius-lg: 20px;
  --wrap: 1120px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 43, .06);
  --shadow-md: 0 10px 28px -8px rgba(15, 26, 43, .16);
  --shadow-lg: 0 24px 60px -16px rgba(15, 26, 43, .28);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

h1, h2, h3 { line-height: 1.18; color: var(--ink); font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.1rem); margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem); margin: 0 0 .6rem; }
h3 { font-size: 1.15rem; margin: 1.2rem 0 .4rem; }

p { margin: 0 0 1rem; }
a { color: var(--brand); }

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

/* ---- section heads ---- */
.section-head { max-width: 62ch; margin: 0 0 2.2rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .7rem;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.section-head h2 { margin-bottom: .5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

/* ---- header ---- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-head.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -22px rgba(15, 26, 43, .4);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.brand {
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.12rem;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand img { width: 26px; height: 26px; display: block; }
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .96rem;
  font-weight: 500;
  padding: 4px 0;
  transition: color .15s ease;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: right .22s var(--ease);
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a:not(.btn):hover::after { right: 0; }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav a[aria-current="page"]::after { right: 0; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- buttons ---- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s ease, border-color .18s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-hover));
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(31, 95, 214, .55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(31, 95, 214, .62); }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%);
}
.btn-primary:hover::after { transition: transform .7s var(--ease); transform: translateX(120%); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--bg); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.btn-invert { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }
.btn-invert:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .5); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }

/* ---- hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  isolation: isolate;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(20px);
  opacity: .55;
  animation: blobDrift 16s ease-in-out infinite;
}
.hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle at 30% 30%, #bcd4fb, transparent 70%);
  top: -220px; right: -160px;
}
.hero::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 60% 40%, #dfe9fd, transparent 70%);
  bottom: -220px; left: -140px;
  animation-delay: -8s;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  border: 1px solid var(--brand-tint-strong);
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-copy .kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulseDot 2.2s ease-in-out infinite; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 50ch; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .92rem; color: var(--ink-faint); }
.hero-note svg { flex: none; color: var(--ok); }

.hero-art { position: relative; }
.board-mock { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(15, 26, 43, .22)); }
.board-mock .sheen {
  animation: sheen 5s ease-in-out infinite;
}
.board-mock .pulse-dot { animation: pulseDot 1.8s ease-in-out infinite; transform-origin: center; }
.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  animation: floatY 6s ease-in-out infinite;
}
.float-chip svg { flex: none; }
.chip-sent { top: 6%; right: -6%; animation-delay: -1s; }
.chip-sent svg { color: var(--ok); }
.chip-channels { bottom: 4%; left: -8%; animation-delay: -3.4s; }
.chip-channels svg { color: var(--brand); }

/* ---- sections ---- */
section { padding: 88px 0; }
section.tight { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
section.center { text-align: center; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-soft); }
.card .step {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 3px 10px;
  border-radius: 999px;
}
.card h3 { margin-top: .8rem; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); }

.icon-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.icon-badge.amber { background: var(--amber-tint); color: var(--amber); }
.icon-badge.ok { background: var(--ok-tint); color: var(--ok); }

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

ul.plain { padding-left: 1.2em; }
ul.plain li { margin: .35em 0; }

.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); }
.check-list svg { flex: none; margin-top: 3px; color: var(--ok); }
.check-list strong { color: var(--ink); }

/* ---- reveal-on-scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.grid > .reveal:nth-child(1) { transition-delay: 0s; }
.grid > .reveal:nth-child(2) { transition-delay: .08s; }
.grid > .reveal:nth-child(3) { transition-delay: .16s; }
.grid > .reveal:nth-child(4) { transition-delay: .24s; }
.plans > .reveal:nth-child(2) { transition-delay: .08s; }
.plans > .reveal:nth-child(3) { transition-delay: .16s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .7s var(--ease) both; }
.fade-up-1 { animation-delay: .05s; }
.fade-up-2 { animation-delay: .15s; }
.fade-up-3 { animation-delay: .25s; }
.fade-up-4 { animation-delay: .35s; }

@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blobDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(24px, -18px) scale(1.06); } }
@keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .45; } }
@keyframes sheen { 0% { transform: translateX(-30%); opacity: 0; } 10% { opacity: .5; } 45% { transform: translateX(130%); opacity: 0; } 100% { transform: translateX(130%); opacity: 0; } }

/* ---- pricing ---- */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.billing-toggle span { font-size: .92rem; font-weight: 600; color: var(--ink-faint); padding: 0 4px; }
.billing-toggle span.is-active { color: var(--ink); }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer;
  transition: background-color .2s ease;
}
.switch .track::before {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::before { transform: translateX(18px); }
.save-badge {
  font-size: .78rem; font-weight: 700; color: var(--ok); background: var(--ok-tint);
  padding: 3px 9px; border-radius: 999px;
}

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; margin-top: 30px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  background: var(--bg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(135deg, var(--brand), #7ea6ee) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow-lg);
}
.plan.featured:hover { transform: translateY(-6px); }
.plan h3 { margin-top: 0; font-size: 1.25rem; }
.plan .price { font-size: 2.1rem; font-weight: 800; margin: .3em 0 0; letter-spacing: -.02em; }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--ink-soft); }
.plan .billing-annual { display: none; }
body.is-annual .plan .billing-monthly { display: none; }
body.is-annual .plan .billing-annual { display: inline; }
.plan .setup-fee { font-size: .92rem; color: var(--ink-soft); margin: .4rem 0 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0; flex: 1; }
.plan li { padding: 9px 0 9px 28px; position: relative; border-top: 1px solid var(--line-soft); font-size: .96rem; }
.plan li:first-child { border-top: none; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan li.no { color: var(--ink-faint); }
.plan li.no::before { content: "–"; color: var(--ink-faint); }
.plan .btn { width: 100%; margin-top: 4px; }

.tag {
  position: absolute; top: -13px; left: 30px;
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  color: #fff; font-size: .76rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 6px 16px -4px rgba(31, 95, 214, .5);
}

/* ---- notice / draft banners ---- */
.notice {
  border: 1px solid var(--line);
  background: var(--bg-alt);
  border-left: 4px solid var(--brand);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 0 0 28px;
  font-size: .95rem;
}
.notice.warn { border-left-color: var(--critical); background: var(--critical-tint); }

/* ---- legal / prose pages ---- */
.prose { padding: 56px 0 72px; }
.prose .wrap { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.05rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-alt); }

/* ---- CTA band ---- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--brand-deep), #16367e 60%, var(--brand));
  color: #fff;
  text-align: center;
  padding: 76px 0;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .12), transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(255, 255, 255, .1), transparent 50%);
}
.cta-band .wrap { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .78); max-width: 52ch; margin-inline: auto; }
.cta-band .cta-row { justify-content: center; margin-top: 26px; }

/* ---- footer ---- */
.site-foot {
  background: #0c1526;
  color: rgba(255, 255, 255, .65);
  padding: 56px 0 32px;
  font-size: .93rem;
}
.site-foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-foot .foot-h {
  display: block; color: rgba(255, 255, 255, .4); font-size: .76rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px;
}
.site-foot a { color: rgba(255, 255, 255, .72); text-decoration: none; display: block; padding: 4px 0; transition: color .15s ease; }
.site-foot a:hover { color: #fff; }
.site-foot .foot-brand { color: #fff; font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.site-foot .foot-brand img { width: 22px; height: 22px; }
.site-foot .legal-line {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem;
  color: rgba(255, 255, 255, .45);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 440px; margin: 0 auto; }
  .float-chip { display: none; }
  .site-foot .cols { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 10px 24px 18px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s var(--ease), opacity .2s ease;
  }
  .site-nav.is-open { max-height: 360px; opacity: 1; padding: 14px 24px 22px; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav a.btn { margin-top: 10px; text-align: center; border-bottom: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 640px) {
  .hero { padding: 56px 0 48px; }
  section { padding: 60px 0; }
  .cta-band { padding: 56px 0; }
  .plan.featured { transform: none; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
}

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