/* Lemak. docs/BRAND.md holds the inks (§5) and the faces (§6). */

@font-face { font-family: "Source Serif 4"; src: url(fonts/SourceSerif4-4.004-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/SourceSerif4-4.004-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/SourceSerif4-4.004-Semibold.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url(fonts/BodoniModa-2.005-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url(fonts/BodoniModa-2.005-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

/* The fallback faces carry the metric overrides, measured against Georgia, so the swap to
   the web face moves no line. */
@font-face { font-family: "Text Fallback"; src: local("Georgia"); size-adjust: 104%; ascent-override: 99.6%; descent-override: 32.2%; line-gap-override: 0%; }
@font-face { font-family: "Text Fallback"; src: local("Georgia Italic"); font-style: italic; size-adjust: 94.1%; ascent-override: 110.1%; descent-override: 35.6%; line-gap-override: 0%; }
@font-face { font-family: "Text Fallback"; src: local("Georgia Bold"); font-weight: 600; size-adjust: 90.8%; ascent-override: 114.1%; descent-override: 36.9%; line-gap-override: 0%; }
@font-face { font-family: "Display Fallback"; src: local("Georgia"); size-adjust: 103.5%; ascent-override: 108.7%; descent-override: 38.6%; line-gap-override: 0%; }
@font-face { font-family: "Display Fallback"; src: local("Georgia Italic"); font-style: italic; size-adjust: 96.3%; ascent-override: 116.9%; descent-override: 41.6%; line-gap-override: 0%; }

:root {
  color-scheme: light dark;
  --brand-hue: 250;
  --paper: oklch(0.975 0.012 85);
  --paper-sunken: oklch(0.95 0.018 85);
  --underprint: oklch(0.90 0.035 80);
  --ink: oklch(0.28 0.06 var(--brand-hue));
  --ink-muted: oklch(0.46 0.05 var(--brand-hue));
  --ink-faint: oklch(0.52 0.04 var(--brand-hue));
  --rule: oklch(0.86 0.02 var(--brand-hue));
  --rule-strong: oklch(0.58 0.04 var(--brand-hue));
  --seal: oklch(0.50 0.19 30);

  --text: "Source Serif 4", "Text Fallback", "Songti TC", "Noto Serif CJK TC", "Noto Serif TC", serif;
  --display: "Bodoni Moda", "Display Fallback", "Songti TC", "Noto Serif CJK TC", "Noto Serif TC", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 40px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: oklch(0.19 0.025 250);
    --paper-sunken: oklch(0.23 0.025 250);
    --underprint: oklch(0.26 0.03 250);
    --ink: oklch(0.90 0.015 85);
    --ink-muted: oklch(0.74 0.02 85);
    --ink-faint: oklch(0.66 0.02 85);
    --rule: oklch(0.34 0.03 250);
    --rule-strong: oklch(0.56 0.03 250);
    --seal: oklch(0.70 0.15 30);
  }
}

:root[data-theme="dark"] {
  --paper: oklch(0.19 0.025 250);
  --paper-sunken: oklch(0.23 0.025 250);
  --underprint: oklch(0.26 0.03 250);
  --ink: oklch(0.90 0.015 85);
  --ink-muted: oklch(0.74 0.02 85);
  --ink-faint: oklch(0.66 0.02 85);
  --rule: oklch(0.34 0.03 250);
  --rule-strong: oklch(0.56 0.03 250);
  --seal: oklch(0.70 0.15 30);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  font-variant-numeric: tabular-nums lining-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
::selection { background: color-mix(in oklch, var(--ink) 16%, var(--paper)); color: var(--ink); }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--rule-strong); }
a:hover { text-decoration-thickness: 2px; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; }
svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 760px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 12px; }
.art { color: var(--ink); }

/* ---------- Header: the page's one piece of guilloche is the band under it ---------- */
.masthead::after {
  content: ""; display: block; height: 12px; background: var(--rule-strong); opacity: 0.55;
  -webkit-mask: url(guilloche/band.svg) center / auto 12px repeat-x;
  mask: url(guilloche/band.svg) center / auto 12px repeat-x;
}
.masthead .wrap { display: flex; align-items: center; gap: 32px; min-height: 84px; }
.brand { display: block; text-decoration: none; flex: none; }
.brand svg { width: 118px; height: 28px; }
.nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-muted); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
.nav a[aria-current="page"] { color: var(--ink); }
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.menu-label { display: none; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px;
  font: 600 15px/1 var(--text); letter-spacing: 0.01em;
  text-decoration: none; border: 1px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: var(--paper);
}
.button:hover { background: color-mix(in oklch, var(--ink) 86%, var(--paper)); text-decoration: none; }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.button.secondary:hover { border-color: var(--ink); }
.nav .button { min-height: 38px; padding: 0 18px; font-size: 14px; color: var(--paper); }
.nav .button:hover { color: var(--paper); }

/* ---------- Hero: type first ---------- */
.hero { padding: 112px 0 120px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: center; }
.hero h1 { font: 400 clamp(44px, 5.2vw, 70px)/1.04 var(--display); letter-spacing: -0.012em; }
.hero h1 span { display: block; }
.hero h1 em { font-style: italic; }
.hero .sub { margin-top: 28px; max-width: 30em; font-size: 19px; line-height: 1.55; color: var(--ink-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* The specimen: a payment drawn as a document, and marked as no money. */
.cert { position: relative; border: 1px solid var(--rule-strong); background: var(--paper-sunken); padding: 28px 30px 24px; overflow: hidden; }
.cert::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--rule); pointer-events: none; }
.cert-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.cert-title { font: 400 13px/1 var(--text); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-muted); }
.serial { font: 12px/1.4 var(--mono); color: var(--seal); }
.cert-amount { margin: 22px 0 18px; font: 600 36px/1.1 var(--text); }
.cert-amount span { font-weight: 400; font-size: 17px; color: var(--ink-muted); letter-spacing: 0.06em; }
.cert dl { display: grid; grid-template-columns: 1fr auto; font-size: 15px; }
.cert dt, .cert dd { padding: 7px 0; border-top: 1px solid var(--rule); }
.cert dt { color: var(--ink-muted); }
.cert dd { text-align: right; }
.cert .net { font-weight: 600; }
.stamps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; list-style: none; padding: 0; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.overprint {
  position: absolute; left: 42%; top: 61%; translate: -50% -50%; rotate: -8deg; pointer-events: none;
  white-space: nowrap;
  font: 600 12px/1 var(--text); letter-spacing: 0.2em; color: var(--seal);
  border: 1.5px solid var(--seal); padding: 7px 10px 6px;
}

/* ---------- Sections ---------- */
.sec { padding: 112px 0 0; }
.sec-head { display: grid; grid-template-columns: 4fr 8fr; gap: 72px; margin-bottom: 48px; padding-top: 20px; border-top: 1px solid var(--ink); }
.sec h2, .page-head h1 { font: 400 clamp(30px, 3.2vw, 40px)/1.15 var(--display); letter-spacing: -0.005em; text-wrap: balance; }
.lede { max-width: 38em; color: var(--ink-muted); font-size: 18px; }
.sec-head .lede { padding-top: 6px; }
h3 { font: 600 17px/1.35 var(--text); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 32px; list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 16px; border-top: 1px solid var(--rule); }
.steps h3::before { content: counter(step) "  "; white-space: pre; font-weight: 400; color: var(--ink-faint); }
.steps p { margin-top: 10px; font-size: 16px; color: var(--ink-muted); }

/* One record, two views */
.views { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; }
.panel-title h3 { font-size: 15px; }
.specimen { color: var(--seal); font: 600 11.5px/1 var(--text); letter-spacing: 0.2em; text-transform: uppercase; }
.tabs { display: flex; gap: 20px; margin: 0 0 4px; padding: 0; list-style: none; font-size: 14px; color: var(--ink-muted); border-bottom: 1px solid var(--rule); }
.tabs li { padding: 8px 0; }
.tabs [aria-current] { color: var(--ink); border-bottom: 2px solid var(--ink); margin-bottom: -1px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 600; font-size: 13px; color: var(--ink-muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.views > * { min-width: 0; }
td .mono { color: var(--ink-faint); }
.journal td, .journal th { padding-right: 0; }
.journal tbody td:first-child { padding-right: 14px; }
.journal tfoot td { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); font-weight: 600; }
.note { margin-top: 16px; font-size: 15px; color: var(--ink-muted); }

/* Capabilities */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 28px 32px 32px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.card:not(:nth-child(3n + 1)) { padding-left: 32px; border-left: 1px solid var(--rule); }
.card p { font-size: 16px; color: var(--ink-muted); }
.card .more { margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.2em; }
.card:hover .more { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

/* Controls */
.band { background: var(--paper-sunken); margin-top: 112px; padding: 96px 0 104px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band .sec { padding-top: 0; }
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 48px; list-style: none; padding: 0; }
.controls p { margin-top: 8px; font-size: 16px; color: var(--ink-muted); }

/* How a price is built */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.flow li { padding: 24px 28px 28px 0; }
.flow li + li { padding-left: 28px; border-left: 1px solid var(--rule); }
.flow .label { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.flow .figure { margin-top: 8px; font: 600 28px/1.2 var(--text); }
.flow .figure span { font-weight: 400; font-size: 16px; color: var(--ink-muted); }
.flow p:last-child { margin-top: 10px; font-size: 15px; color: var(--ink-muted); }
.caption { margin-top: 20px; font-size: 15px; color: var(--ink-muted); max-width: 52em; }

/* The name: the one block that carries the crest */
.about { display: grid; grid-template-columns: 4fr 8fr; gap: 72px; align-items: start; }
.about .crest { width: 180px; height: 228px; }
.about p + p { margin-top: 18px; }
.about .text { max-width: 36em; }

/* Where it stands */
.stand th[scope="row"] { width: 180px; font-weight: 600; }
.stand td, .stand th { padding: 16px 16px 16px 0; }

.notes { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.notes li { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.notes time { color: var(--ink-muted); font-size: 15px; }
.notes p { color: var(--ink-muted); font-size: 16px; }

/* Close */
.close { padding: 136px 0 24px; }
.close-inner { border-top: 1px solid var(--ink); padding-top: 40px; display: grid; grid-template-columns: 7fr 5fr; gap: 72px; align-items: end; }
.close h2 { font: 400 clamp(32px, 3.6vw, 46px)/1.12 var(--display); text-wrap: balance; }
.close .contact { margin-top: 16px; color: var(--ink-muted); max-width: 32em; }
.close .actions { margin-top: 0; justify-content: flex-end; }

/* Footer */
.foot { margin-top: 112px; padding: 48px 0 40px; border-top: 1px solid var(--rule); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 4fr repeat(4, 2fr); gap: 32px; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.foot-brand .mark { width: 28px; height: 28px; }
.foot-brand .word { width: 92px; height: 22px; }
.foot h2 { font: 600 13px/1.4 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.foot ul { list-style: none; padding: 0; margin-top: 12px; }
.foot li + li { margin-top: 6px; }
.foot li a { text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--ink-muted); font-size: 14px; }

/* Pricing */
.page-head { padding: 104px 0 0; }
.page-head h1 { font-size: clamp(40px, 4.6vw, 60px); max-width: 16ch; }
.page-head .lede { margin-top: 24px; }
.parts { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.parts li { padding: 24px 32px 28px 0; }
.parts li + li { padding-left: 32px; border-left: 1px solid var(--rule); }
.parts p { margin-top: 10px; color: var(--ink-muted); font-size: 16px; }

/* Book a demo: a plain form, no script. */
.demo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 32px; margin: 48px 0 112px; max-width: 760px; }
.demo .full { grid-column: 1 / -1; }
.demo label, .demo legend { display: block; font-weight: 600; font-size: 15px; }
.demo .hint { display: block; font-weight: 400; color: var(--ink-muted); font-size: 14px; }
.demo input, .demo select, .demo textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; min-height: 44px;
  font: 16px/1.4 var(--text); color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule-strong); border-radius: 2px;
}
.demo textarea { min-height: 140px; resize: vertical; }
.demo fieldset { margin: 0; padding: 0; border: 0; }
.demo .checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; margin-top: 8px; }
.demo .check { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; }
.demo .check input { width: 20px; min-height: 20px; height: 20px; margin: 0; flex: none; }
.demo .note { color: var(--ink-muted); font-size: 15px; }
.demo .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Motion: one, the specimen mark landing ---------- */
@media (prefers-reduced-motion: no-preference) {
  .overprint { animation: impression 140ms cubic-bezier(0.2, 0.8, 0.3, 1) 600ms both; }
}
@keyframes impression { from { opacity: 0; scale: 1.06; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Narrow ---------- */
@media (max-width: 1080px) {
  .hero-grid, .views, .close-inner { grid-template-columns: 1fr; gap: 48px; }
  .close .actions { justify-content: flex-start; }
  .cert { max-width: 520px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li:nth-child(3) { border-left: 0; padding-left: 0; }
  .flow li:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 940px) {
  .masthead .wrap { flex-wrap: wrap; gap: 0 16px; min-height: 68px; }
  .menu-label { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-size: 15px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.2em; }
  .menu-toggle:focus-visible + .menu-label { outline: 2px solid var(--seal); outline-offset: 2px; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 16px; padding: 4px 0 20px; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 11px 0; font-size: 17px; border-bottom: 1px solid var(--rule); }
  .sec-head, .about { grid-template-columns: 1fr; gap: 20px; }
  .cards, .controls { grid-template-columns: repeat(2, 1fr); }
  .card:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .card:nth-child(2n) { padding-left: 28px; border-left: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 42px; }
  .hero .sub { font-size: 17px; }
  .actions .button { width: 100%; }
  .cert { padding: 22px 18px 20px; }
  .cert-head { flex-direction: column; gap: 6px; }
  .serial { word-break: break-all; }
  .journal table { font-size: 14px; }
  .cert-amount { font-size: 30px; }
  .overprint { left: auto; right: 10px; top: 128px; translate: none; font-size: 11px; letter-spacing: 0.14em; }
  .sec { padding-top: 80px; }
  .steps, .cards, .controls, .flow, .parts, .demo, .demo .checks { grid-template-columns: 1fr; }
  .card, .card:nth-child(2n), .card:not(:nth-child(3n + 1)) { padding: 22px 0 24px; border-left: 0; }
  .flow li, .flow li + li, .parts li, .parts li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .flow li:last-child, .parts li:last-child { border-bottom: 0; }
  .band { margin-top: 80px; padding: 64px 0 72px; }
  .stand th[scope="row"] { width: 108px; }
  .notes li { grid-template-columns: 1fr; gap: 2px; }
  .about .crest { width: 160px; height: 203px; }
  .close { padding-top: 96px; }
  .page-head { padding-top: 64px; }
}
