/* Emissary site. One stylesheet, system fonts, no JavaScript. */

:root {
  --green: #0f4a3c;
  --mint: #3dd6a0;
  --cream: #f7f4ee;
  --ink: #1c2421;

  --bg: var(--cream);
  --text: var(--ink);
  --muted: #55625c;
  --heading: var(--green);
  --link: #0f4a3c;
  --link-hover: #083026;
  --rule: #ddd8cc;
  --card: #fffdf9;
  --callout-bg: #def4ea;
  --callout-text: #0b3a2e;
  --btn-bg: var(--mint);
  --btn-text: #07281f;
  --btn-bg-hover: #2fc690;
  --header-bg: var(--green);
  --header-text: #f7f4ee;
  --email-bg: #ffffff;
  --code-bg: #ebe6da;
  --focus: #0f4a3c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1613;
    --text: #efebe2;
    --muted: #a3b1aa;
    --heading: #f7f4ee;
    --link: #3dd6a0;
    --link-hover: #7be8c4;
    --rule: #25352f;
    --card: #131f1b;
    --callout-bg: #12352b;
    --callout-text: #e3f6ee;
    --btn-bg: #3dd6a0;
    --btn-text: #07281f;
    --btn-bg-hover: #6ae3bb;
    --header-bg: #0f4a3c;
    --header-text: #f7f4ee;
    --email-bg: #131f1b;
    --code-bg: #1e2d28;
    --focus: #3dd6a0;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.4rem, 3.8vw, 1.7rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1.1em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* Layout containers */

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.wide {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 640px) {
  .wrap,
  .wide {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* Header */

.site-header {
  background: var(--header-bg);
  color: var(--header-text);
}

.site-header .wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--header-text);
  font-weight: 650;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand:hover {
  color: var(--header-text);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: block;
}

.site-header nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--header-text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  font-size: 1rem;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: #ffffff;
  border-bottom-color: var(--mint);
}

.site-header a:focus-visible {
  outline-color: #ffffff;
}

/* Footer */

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 2.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer .sep {
  margin: 0 0.45em;
}

/* Hero */

.hero {
  padding-top: clamp(2.5rem, 8vw, 4.5rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin: 0 0 1.25rem;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.status::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p.lead {
  font-size: 1.15rem;
  margin-bottom: 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cta-row p {
  margin: 0;
}

.button {
  display: inline-block;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 650;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  line-height: 1.3;
}

.button:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
}

.button.big {
  font-size: 1.15rem;
  padding: 1rem 1.6rem;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Sections */

.section {
  margin-top: clamp(3rem, 8vw, 4.5rem);
}

.section > .wrap > h2,
.section > .wide > h2 {
  margin-bottom: 1.25rem;
}

/* How it works */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.25rem 1.1rem 3.6rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--green);
  color: #f7f4ee;
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.75rem;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .steps li::before {
    background: var(--mint);
    color: #07281f;
  }
}

.steps h3 {
  margin-bottom: 0.3rem;
}

.steps p {
  margin: 0;
}

.tag {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  vertical-align: 0.12em;
  white-space: nowrap;
}

.callout {
  margin: 1.75rem 0 0;
  padding: 1.1rem 1.25rem;
  background: var(--callout-bg);
  color: var(--callout-text);
  border-left: 4px solid var(--mint);
  border-radius: 0 8px 8px 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Screenshots */

.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
}

.shots figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
}

.shots figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* FAQ */

.faq dt {
  color: var(--heading);
  font-weight: 650;
  margin-top: 1.4rem;
}

.faq dt:first-child {
  margin-top: 0;
}

.faq dd {
  margin: 0.25rem 0 0;
}

/* Closing CTA */

.closing {
  padding: 1.75rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.closing h2 {
  margin-bottom: 0.6rem;
}

.closing p:last-child {
  margin-bottom: 0;
}

.closing .button {
  margin-top: 0.4rem;
}

/* Inner pages */

.page {
  padding-top: clamp(2.25rem, 7vw, 3.75rem);
}

.page h1 {
  margin-bottom: 1.25rem;
}

.page h2 {
  margin: 2.25rem 0 0.75rem;
}

.page ul,
.page ol {
  padding-left: 1.4rem;
  margin: 0 0 1.1em;
}

.page li {
  margin-bottom: 0.4em;
}

.byline {
  margin: -0.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.email {
  margin: 1.4rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--email-bg);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  font-size: 1rem;
}

@media (prefers-color-scheme: dark) {
  .email {
    border-left-color: var(--mint);
  }
}

.email p:last-child,
.email ul:last-child {
  margin-bottom: 0;
}

.email ul {
  margin-bottom: 1.1em;
}

.closing-note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.signoff {
  margin-top: 2rem;
  color: var(--muted);
}

.page .button.big {
  margin: 0.5rem 0 1.5rem;
}
