/* microfulfill website — plain CSS, no build step (served by Cloudflare Pages). */

@font-face { font-family: 'Instrument Sans'; font-weight: 400; font-display: swap; src: url('/assets/fonts/instrument-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 500; font-display: swap; src: url('/assets/fonts/instrument-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-weight: 600; font-display: swap; src: url('/assets/fonts/instrument-sans-600.woff2') format('woff2'); }

:root {
    --paper: #fbfaf7;
    --sand: #f1eee7;
    --ink: #1a1b1e;
    --muted: #5c5e63;
    --rule: #dcd8ce;
    --green: #17503f;
    --green-soft: #e3ede8;
    --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.028em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 66px); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(29px, 3.4vw, 42px); }
h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--green); margin-bottom: 18px; }
.label::before { content: ''; width: 22px; height: 2px; background: currentColor; }
.lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 640px; margin-top: 20px; }

/* Links and buttons */
.button { display: inline-block; padding: 13px 22px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid var(--ink); transition: background .15s, border-color .15s; }
.button:hover { background: var(--green); border-color: var(--green); }
.button.small { padding: 8px 15px; font-size: 15px; }
.button.light { background: #fff; color: var(--ink); border-color: #fff; }
.button.light:hover { background: var(--green-soft); border-color: var(--green-soft); }
.more { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: var(--rule); transition: text-decoration-color .15s; }
.more:hover { text-decoration-color: var(--ink); }
.more::after { content: ' →'; white-space: nowrap; }
.actions { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 34px; }

/* Header */
header.site { position: sticky; top: 0; z-index: 10; background: rgba(251, 250, 247, .93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
header.site .wrap { display: flex; align-items: center; gap: 8px 34px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--green); }
header.site nav { display: flex; gap: 26px; font-size: 15.5px; margin-right: auto; }
header.site nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
header.site nav a:hover { color: var(--ink); }
header.site nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--green); }
.tools { display: flex; align-items: center; gap: 20px; font-size: 15.5px; }
.tools a:not(.button) { text-decoration: none; color: var(--muted); }
.tools a:not(.button):hover { color: var(--ink); }

/* Language menu (a <details>, so it works without JavaScript; more languages just add links) */
.lang { position: relative; }
.lang summary { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; color: var(--muted); cursor: pointer; list-style: none; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ''; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.lang summary:hover, .lang[open] summary { color: var(--ink); }
.lang summary svg { width: 17px; height: 17px; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: -8px; z-index: 20; min-width: 150px; padding: 5px; background: #fff; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 8px 24px rgba(26, 27, 30, .1); }
.tools .lang-menu a { display: block; padding: 7px 10px; border-radius: 5px; color: var(--ink); }
.tools .lang-menu a:hover { background: rgba(26, 27, 30, .06); }
.tools .lang-menu a[aria-current] { font-weight: 600; }

/* Hero */
.hero { padding: 84px 0 0; }
.hero h1 { max-width: 900px; }
.hero .lead { font-size: 21px; max-width: 620px; }
.hero.page { padding-bottom: 0; }
.hero.page .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: 56px; align-items: center; }
.hero.page h1 { font-size: clamp(36px, 4.4vw, 54px); }
.hero.page figure { margin-right: -120px; }

/* Two entrances on the home page */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 64px; }
.door { display: flex; flex-direction: column; text-decoration: none; background: var(--sand); border-radius: 10px; padding: 34px 34px 0; overflow: hidden; transition: background .2s; }
.door:hover { background: #ebe7de; }
.door small { font-size: 15px; color: var(--muted); }
.door h2 { font-size: 28px; margin: 6px 0 10px; }
.door p { color: var(--muted); font-size: 16.5px; max-width: 440px; }
.door .more { align-self: flex-start; margin: 18px 0 30px; font-size: 16px; }
.door img { border: 1px solid var(--rule); border-bottom: 0; border-radius: 8px 8px 0 0; box-shadow: 0 -2px 24px rgba(26, 27, 30, .07); transition: transform .3s; }
.door:hover img { transform: translateY(-6px); }
.door .crop { height: 300px; overflow: hidden; margin: auto -90px 0 0; padding-top: 8px; }

/* Sections */
section { padding: 108px 0; }
section.sand { background: var(--sand); }
section.tight { padding-top: 0; }
.intro { max-width: 760px; margin-bottom: 56px; }

/* Three statements, separated by rules */
.statements { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.statements > div { padding: 26px 32px 0 0; }
.statements > div + div { padding-left: 32px; border-left: 1px solid var(--rule); }
.statements h3 { margin-bottom: 10px; }
.statements p { color: var(--muted); font-size: 16.5px; }

/* Who does what */
.lanes { width: 100%; border-collapse: collapse; font-size: 16.5px; }
.lanes th, .lanes td { text-align: left; vertical-align: top; padding: 20px 28px 20px 0; border-bottom: 1px solid var(--rule); }
.lanes thead th { font-size: 14.5px; font-weight: 600; color: var(--muted); padding-bottom: 12px; border-bottom-color: var(--ink); }
.lanes tbody th { width: 24%; font-weight: 600; font-size: 18px; letter-spacing: -0.015em; white-space: nowrap; }
.lanes tbody th span { display: inline-block; width: 30px; color: var(--green); font-variant-numeric: tabular-nums; }
.lanes td { width: 38%; color: #3c3e42; }
.lanes tr:last-child th, .lanes tr:last-child td { border-bottom: 0; }

/* Screenshot figures */
figure { margin: 0; }
.shot img { width: 100%; border: 1px solid var(--rule); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(26, 27, 30, .04), 0 18px 44px -18px rgba(26, 27, 30, .2); }
.shot figcaption { margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.shot { position: relative; }
.shot .phone { position: absolute; right: -18px; bottom: 14px; width: 23%; border: 5px solid var(--ink); border-radius: 22px; box-shadow: 0 18px 40px -12px rgba(26, 27, 30, .45); }

/* Feature rows */
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: center; }
.feature + .feature { margin-top: 112px; }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .text { order: 2; }
.feature h2, .feature h3 { font-size: clamp(26px, 2.6vw, 32px); letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 16px; }
.feature .text > p { color: var(--muted); }
.feature .text > p + p { margin-top: 14px; }
.who { display: inline-block; font-size: 13.5px; font-weight: 600; padding: 3px 10px; border-radius: 4px; background: var(--green-soft); color: var(--green); margin-bottom: 16px; }
.who.provider { background: #ece6d8; color: #5f4a1c; }
.points { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.points li { padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.points b { font-weight: 600; }

/* Short text-only features in columns */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 48px; }
.columns.two { grid-template-columns: repeat(2, 1fr); }
.columns h3 { font-size: 19px; margin-bottom: 8px; padding-top: 18px; border-top: 1px solid var(--ink); }
.columns p { color: var(--muted); font-size: 16px; }

/* Fee example */
.fees { display: grid; grid-template-columns: 4fr 3fr 4fr; gap: 56px; align-items: start; }
.ledger { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.ledger caption { text-align: left; font-weight: 600; font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.ledger td { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.ledger td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 16px; }
.ledger small { display: block; color: var(--muted); font-size: 14px; }

/* Code */
.api { display: grid; grid-template-columns: 5fr 6fr; gap: 72px; align-items: center; }
pre { margin: 0; padding: 26px 28px; border-radius: 8px; background: var(--ink); color: #e8e6df; font: 14px/1.75 var(--mono); overflow-x: auto; }
pre .c { color: #8d8f94; }
pre .v { color: #9fd3bd; }
code { font-family: var(--mono); font-size: .88em; }
.events { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 24px; }
.events code { padding: 3px 9px; border: 1px solid var(--rule); border-radius: 4px; background: #fff; font-size: 13px; }

/* Dark band */
.band { background: var(--green); color: #fff; padding: 84px 0; }
.band .wrap { display: grid; grid-template-columns: 7fr 4fr; gap: 56px; align-items: end; }
.band p { color: #cfe0d9; font-size: 19px; max-width: 600px; margin-top: 18px; }
.band .side { justify-self: end; }

/* Questions */
.faq { display: grid; grid-template-columns: 4fr 7fr; gap: 72px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-size: 24px; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); }

/* Closing */
.closing { padding: 112px 0; border-top: 1px solid var(--rule); }
.closing h2 { font-size: clamp(32px, 4.4vw, 54px); max-width: 780px; }

/* Footer */
footer.site { border-top: 1px solid var(--rule); padding: 44px 0 52px; font-size: 15px; color: var(--muted); }
footer.site .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
footer.site b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 10px; }
footer.site a { display: block; text-decoration: none; padding: 3px 0; }
footer.site a:hover { color: var(--ink); }
footer.site .brand { display: flex; padding: 0; color: var(--ink); margin-bottom: 10px; }

@media (max-width: 980px) {
    section { padding: 76px 0; }
    .hero { padding-top: 56px; }
    .hero.page .wrap, .feature, .api, .faq, .band .wrap, .fees { grid-template-columns: 1fr; gap: 36px; }
    .hero.page figure { margin-right: 0; }
    .feature.flip .text { order: 0; }
    .feature + .feature { margin-top: 80px; }
    .band .side { justify-self: start; }
    .columns { grid-template-columns: 1fr 1fr; }
    header.site nav { order: 3; width: 100%; margin: 0; padding-bottom: 10px; overflow-x: auto; white-space: nowrap; }
    header.site .wrap { justify-content: space-between; padding-top: 10px; }
}

@media (max-width: 700px) {
    body { font-size: 16px; }
    .wrap { padding: 0 20px; }
    .doors, .statements, .columns, .columns.two { grid-template-columns: 1fr; }
    .door { padding: 26px 26px 0; }
    .door .crop { height: 210px; margin-right: -60px; }
    .statements > div, .statements > div + div { padding: 22px 0; border-left: 0; }
    .statements > div + div { border-top: 1px solid var(--rule); }
    .lanes, .lanes tbody, .lanes tr, .lanes th, .lanes td { display: block; width: 100%; }
    .lanes thead { display: none; }
    .lanes tbody th { border-bottom: 0; padding: 24px 0 6px; }
    .lanes td { border-bottom: 0; padding: 4px 0 4px 30px; }
    .lanes td::before { content: attr(data-who) ': '; font-weight: 600; color: var(--ink); }
    .lanes tr { border-bottom: 1px solid var(--rule); padding-bottom: 20px; }
    .shot .phone { display: none; }
    footer.site .wrap { grid-template-columns: 1fr 1fr; }
    .tools .login { display: none; }
}
