/* Archka marketing site
   Look: LVDS studio style (paper + dot grid, hairlines, numbered sheets).
   Palette from the LVDS brand kit. No blue anywhere. Red only as a tiny accent. */

:root {
  --paper: #FAFAF9;
  --sheet: #FFFFFF;
  --ink: #222222;
  --grey: #5A5A5A;
  --line: #D6D3D1;
  --line-strong: #A8A29E;
  --dot: #DEDAD6;
  --band: #F2F2F2;
  --terra: #B85042;
  --terra-600: #A44337;
  --terra-700: #8A362C;
  --terra-50: #FDF4F2;
  --red: #E4032E;
  --mark: #FFFF99;

  --font: "Century Gothic", "URW Gothic", "Didact Gothic", "Questrial", "Avant Garde", sans-serif;
  --wrap: 1180px;
  --gutter: 16px;
  --radius: 4px;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 17px; } }

img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--terra-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--terra-50); color: var(--ink); }

mark { background: var(--mark); color: var(--ink); padding: 0 .3em; font-weight: 700; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 249, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(6px)) {
  .site-header { background: rgba(250, 250, 249, .82); backdrop-filter: blur(6px); }
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.12rem; letter-spacing: .01em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px; background: var(--terra);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-dot { width: 5px; height: 5px; background: var(--red); border-radius: 50%; display: inline-block; margin-left: 2px; transform: translateY(-8px); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav a { display: block; padding: 8px 10px; color: var(--grey); text-decoration: none; font-size: .92rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--terra); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font: inherit; font-size: .9rem; color: var(--ink); padding: 7px 12px; cursor: pointer;
}

@media (max-width: 879px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav li { border-top: 1px dashed var(--line); }
  .js .site-nav a { padding: 12px 2px; font-size: 1rem; }
  .js .site-nav .btn { margin-top: 12px; text-align: center; }
  html:not(.js) .header-row { flex-wrap: wrap; padding: 8px 0; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius); border: 1px solid var(--ink);
  font: inherit; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  background: var(--ink); color: #fff; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--terra-700); border-color: var(--terra-700); color: #fff; }
.btn-terra { background: var(--terra-600); border-color: var(--terra-600); }
.btn-terra:hover { background: var(--terra-700); border-color: var(--terra-700); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { background: var(--sheet); color: var(--ink); border-color: var(--ink); }
.site-nav .btn { padding: 8px 14px; color: #fff; font-size: .9rem; }
.site-nav .btn:hover { color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); margin: 0 0 12px;
}
.eyebrow b { color: var(--red); font-weight: 400; padding: 0 .35em; }
.lead { font-size: 1.12rem; color: var(--grey); max-width: 38em; }
@media (min-width: 720px) { .lead { font-size: 1.22rem; } }
.muted { color: var(--grey); }
.small { font-size: .86rem; }

/* Crop marks around a framed sheet */
.frame { position: relative; background: var(--sheet); border: 1px solid var(--line); }
.frame::before {
  content: ""; position: absolute; inset: -7px; pointer-events: none;
  --c: var(--line-strong);
  background:
    linear-gradient(var(--c), var(--c)) left top / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px 14px no-repeat;
}

/* Dimension line: |——— label ———| */
.dim {
  display: flex; align-items: center; gap: 10px; color: var(--grey);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong);
  height: 14px; margin: 0 0 14px;
}
.dim::before, .dim::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 56px; }
@media (min-width: 960px) { .hero { padding: 80px 0 88px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.02fr 1fr; gap: 56px; } }
.hero h1 { font-size: clamp(2.15rem, 7.5vw, 3.9rem); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--terra); }
.hero .lead { margin-bottom: 28px; }
.hero-note { margin-top: 18px; font-size: .86rem; color: var(--grey); }

/* ---------- Sheets (numbered sections) ---------- */
.sheet { padding: 56px 0; border-top: 1px solid var(--line); }
@media (min-width: 960px) { .sheet { padding: 88px 0; } }
.sheet-grid { display: grid; gap: 22px; }
@media (min-width: 960px) { .sheet-grid { grid-template-columns: 200px 1fr; gap: 48px; } }
.sheet-no {
  display: flex; align-items: baseline; gap: 12px; padding-top: 4px;
  border-top: 2px solid var(--ink); align-self: start;
}
.sheet-no span:first-child { font-size: 2.6rem; line-height: 1; color: var(--terra); letter-spacing: -.02em; }
.sheet-no span + span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }
@media (min-width: 960px) {
  .sheet-no { flex-direction: column; gap: 8px; position: sticky; top: 96px; }
  .sheet-no span:first-child { font-size: 3.4rem; }
}
.sheet h2 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); margin-bottom: 16px; }
.sheet-intro { max-width: 42em; margin-bottom: 36px; }
.sheet-intro p { color: var(--grey); }

/* ---------- Problem ---------- */
.trio { display: grid; gap: 0; border: 1px solid var(--line); background: var(--sheet); }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, 1fr); } }
.trio > div { padding: 24px; border-top: 1px solid var(--line); }
.trio > div:first-child { border-top: 0; }
@media (min-width: 760px) {
  .trio > div { border-top: 0; border-left: 1px solid var(--line); }
  .trio > div:first-child { border-left: 0; }
}
.trio h3 { font-size: 1.15rem; margin-bottom: 10px; }
.trio p { color: var(--grey); font-size: .95rem; }
.tag-no { font-size: .72rem; letter-spacing: .14em; color: var(--terra); text-transform: uppercase; display: block; margin-bottom: 10px; }

.answer { margin-top: 28px; padding: 22px 24px; border-left: 2px solid var(--terra); background: var(--terra-50); }
.answer p { margin: 0; }

/* Origin note (the single LVDS mention) */
.origin { margin-top: 28px; display: grid; gap: 6px; padding: 20px 24px; border: 1px dashed var(--line-strong); }
.origin p { margin: 0; color: var(--grey); font-size: .95rem; }

/* ---------- Modules ---------- */
.modules { display: grid; gap: 16px; }
@media (min-width: 640px) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .modules { grid-template-columns: repeat(3, 1fr); } }
.module { padding: 24px; background: var(--sheet); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.module-head { display: flex; align-items: center; gap: 12px; }
.module-icon {
  width: 38px; height: 38px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--terra);
}
.module-icon svg { width: 20px; height: 20px; }
.module h3 { font-size: 1.12rem; }
.module p { color: var(--grey); font-size: .95rem; margin: 0; }
.module ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: .9rem; }
.module li { padding: 6px 0; border-top: 1px dotted var(--line-strong); }

/* ---------- App mock (pure CSS, decorative) ---------- */
.mock {
  --b500: #B85042; --b600: #A44337; --b700: #8A362C; --b50: #FDF4F2;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  font-size: 12px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(34, 34, 34, .35);
}
.theme-graphite { --b500: #57534E; --b600: #44403C; --b700: #292524; --b50: #F5F5F4; }
.theme-sage { --b500: #5F8358; --b600: #4B6A45; --b700: #3C5438; --b50: #F3F6F2; }

.mock-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }
.mock-url { margin-left: 8px; flex: 1; min-width: 0; padding: 3px 10px; border-radius: 20px; background: var(--sheet); border: 1px solid var(--line); color: var(--grey); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mock-body { display: grid; grid-template-columns: 112px 1fr; min-height: 260px; }
.mock-side { border-right: 1px solid var(--line); padding: 12px 8px; background: #fff; }
.mock-logo { display: flex; align-items: center; gap: 6px; margin: 0 4px 12px; font-size: 11px; }
.mock-logo b { width: 20px; height: 20px; border-radius: 5px; background: var(--b500); color: #fff; display: grid; place-items: center; font-size: 10px; }
.mock-nav { list-style: none; margin: 0; padding: 0; }
.mock-nav li { padding: 5px 7px; border-radius: 5px; color: var(--grey); margin-bottom: 2px; }
.mock-nav li.on { background: var(--b50); color: var(--b700); }
.mock-main { padding: 12px; background: #FCFCFB; min-width: 0; }
.mock-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.mock-title strong { font-weight: 400; font-size: 13px; }
.mock-btn { background: var(--b600); color: #fff; padding: 4px 9px; border-radius: 5px; font-size: 11px; white-space: nowrap; }
.mock-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mock-col { background: var(--band); border-radius: 6px; padding: 6px; }
.mock-col > span { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin: 2px 2px 6px; }
.mock-card { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 7px; margin-bottom: 6px; }
.mock-card:last-child { margin-bottom: 0; }
.mock-card p { margin: 0 0 6px; font-size: 11.5px; }
.mock-meta { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: var(--grey); font-size: 10px; }
.mock-tag { background: var(--b50); color: var(--b700); padding: 1px 6px; border-radius: 10px; font-size: 10px; white-space: nowrap; }
.mock-avatar { width: 16px; height: 16px; border-radius: 50%; background: var(--b500); opacity: .75; flex: none; }
.mock-avatar.alt { background: var(--line-strong); }

@media (max-width: 520px) {
  .mock-body { grid-template-columns: 84px 1fr; }
  .mock-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-col:nth-child(3) { display: none; }
}

.hero-figure { margin: 0; }
.hero-figure figcaption { margin-top: 12px; font-size: .8rem; color: var(--grey); }

/* ---------- Client portal ---------- */
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; }
.checklist li { padding: 10px 0 10px 26px; border-top: 1px dotted var(--line-strong); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

.portal-card { padding: 20px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; font-size: .82rem; }
.seg span { padding: 6px 12px; border-left: 1px solid var(--line-strong); color: var(--grey); }
.seg span:first-child { border-left: 0; }
.seg span.on { background: var(--ink); color: #fff; }
.portal-rows { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.portal-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.portal-rows li span:last-child { color: var(--grey); font-size: .82rem; white-space: nowrap; }
.pill { display: inline-block; font-size: .72rem; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--grey); margin-left: 6px; vertical-align: 1px; }
.pill.client { border-color: var(--terra); color: var(--terra-700); }

/* ---------- Themes ---------- */
.themes { display: grid; gap: 20px; }
@media (min-width: 900px) { .themes { grid-template-columns: repeat(3, 1fr); } }
.theme-item figure { margin: 0; }
.theme-item .mock-body { grid-template-columns: 96px 1fr; min-height: 190px; }
.theme-item .mock-cols { grid-template-columns: 1fr; }
.theme-item .mock-col:nth-child(n+2) { display: none; }
.theme-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.theme-caption h3 { font-size: 1.15rem; }
.swatches { display: flex; gap: 4px; }
.swatches i { width: 18px; height: 18px; border-radius: 3px; display: block; border: 1px solid rgba(0, 0, 0, .06); }
.theme-hex { font-size: .78rem; color: var(--grey); margin-top: 4px; }

/* ---------- Data ownership ---------- */
.tenancy { margin: 0; padding: 22px 18px 20px; }
@media (min-width: 720px) { .tenancy { padding: 28px 26px 24px; } }
.tenancy-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tenant { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: 8px; }
.tenant-addr, .tenant-db { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; font-size: .86rem; background: #fff; overflow-wrap: anywhere; }
.tenant-db { border-style: dashed; color: var(--grey); display: flex; align-items: center; gap: 8px; }
.tenant-arrow { height: 1px; background: var(--ink); position: relative; }
.tenant-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; border-left: 6px solid var(--ink); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; }
.db-icon { width: 18px; height: 20px; flex: none; color: var(--terra); }
.db-icon path { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tenancy-backup { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-size: .76rem; color: var(--grey); letter-spacing: .06em; text-transform: uppercase; }
.tenancy-backup .db-icon { width: 20px; height: 20px; }
.tenancy .tenant-addr { overflow-wrap: normal; }
@media (max-width: 520px) {
  .tenant { grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 6px; }
  .tenancy .tenant-addr, .tenancy .tenant-db { font-size: .8rem; padding: 8px 9px; }
  .tenancy .db-icon { width: 15px; height: 17px; }
  .tenancy .dim, .flow .dim { font-size: .62rem; letter-spacing: .08em; gap: 6px; white-space: nowrap; }
}

.facts { display: grid; gap: 0; margin-top: 8px; }
.fact { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact-no { color: var(--terra); font-size: .9rem; padding-top: 2px; }
.fact h3 { font-size: 1.05rem; margin-bottom: 4px; }
.fact p { color: var(--grey); font-size: .95rem; margin: 0; }

/* ---------- Pricing ---------- */
.price-card { padding: 28px 24px; max-width: 640px; }
@media (min-width: 720px) { .price-card { padding: 40px; } }
.price-label { display: inline-block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--terra-700); border: 1px solid var(--terra); padding: 3px 10px; border-radius: 20px; margin-bottom: 18px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 6px; }
.price strong { font-weight: 400; font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1; letter-spacing: -.02em; }
.price span { color: var(--grey); }
.price-list { list-style: none; padding: 0; margin: 22px 0; }
.price-list li { padding: 10px 0 10px 26px; border-top: 1px dotted var(--line-strong); position: relative; }
.price-list li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.price-foot { font-size: .88rem; color: var(--grey); padding-top: 16px; border-top: 1px dashed var(--line-strong); }

/* ---------- Demo cards ---------- */
.demo-grid { display: grid; gap: 16px; }
@media (min-width: 820px) { .demo-grid { grid-template-columns: repeat(3, 1fr); } }
.demo-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.demo-card h3 { font-size: 1.3rem; }
.demo-role { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--terra-700); }
.cred { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; font-size: .92rem; margin: 0; }
.cred dt { grid-column: 1; color: var(--grey); font-size: .8rem; }
.cred dd { grid-column: 2; margin: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; overflow-wrap: anywhere; }
.copy-btn { grid-column: 3; font: inherit; font-size: .74rem; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 3px 8px; color: var(--grey); cursor: pointer; }
.copy-btn:hover { color: var(--ink); border-color: var(--ink); }
.demo-card p { color: var(--grey); font-size: .93rem; margin: 0; }
.demo-card .btn { margin-top: auto; }
.reset-note { margin-top: 18px; font-size: .88rem; color: var(--grey); display: flex; gap: 8px; align-items: baseline; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; flex: none; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--terra); line-height: 1.2;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 20px; color: var(--grey); max-width: 44em; }

/* ---------- CTA band ---------- */
.cta { padding: 56px 0; border-top: 1px solid var(--line); }
.cta-box { padding: 32px 24px; display: grid; gap: 20px; }
@media (min-width: 860px) { .cta-box { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 44px; } }
.cta h2 { font-size: clamp(1.6rem, 4.4vw, 2.3rem); margin-bottom: 10px; }
.contact-fallback { font-size: .9rem; color: var(--grey); }

/* ---------- Footer / title block ---------- */
.site-footer { border-top: 2px solid var(--ink); padding: 28px 0 40px; font-size: .86rem; color: var(--grey); background: rgba(250, 250, 249, .7); }
.title-block { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); background: var(--sheet); }
@media (min-width: 860px) { .title-block { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.title-block > div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.title-block small { display: block; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); margin-bottom: 4px; }
.title-block .tb-name { grid-column: 1 / -1; color: var(--ink); font-size: 1.05rem; }
@media (min-width: 860px) { .title-block .tb-name { grid-column: auto; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 18px 0 0; }
.footer-links a { color: var(--grey); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Plain pages (demo / legal) ---------- */
.page-head { padding: 48px 0 32px; }
@media (min-width: 960px) { .page-head { padding: 72px 0 40px; } }
.page-head h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: 14px; }

.draft-banner {
  background: var(--mark); border-bottom: 1px solid #E5E07A; color: var(--ink);
  padding: 12px 0; font-size: .95rem;
}
.draft-banner strong { font-weight: 700; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; padding-top: 14px; border-top: 1px dashed var(--line-strong); display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { color: var(--terra); font-size: 1rem; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .45em; }
.prose ul li::marker { color: var(--red); }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 8px 0 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px dotted var(--line-strong); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--ink); color: #fff; font-weight: 400; }
.legal-sheet { padding: 24px 20px 32px; margin-bottom: 64px; }
@media (min-width: 720px) { .legal-sheet { padding: 40px 48px 48px; } }
.legal-sheet .prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.role-sheet { display: grid; gap: 24px; padding: 24px 20px; margin-bottom: 28px; }
@media (min-width: 860px) { .role-sheet { grid-template-columns: 280px 1fr; gap: 40px; padding: 36px 40px; } }
.role-sheet h2 { font-size: 1.7rem; margin: 4px 0 14px; }
.two-col { display: grid; gap: 20px; }
@media (min-width: 640px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col h3 { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.two-col ul { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.two-col li { padding: 8px 0; border-top: 1px dotted var(--line-strong); }
.two-col .cannot li { color: var(--grey); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; padding: 20px 20px 20px 0; border-top: 1px solid var(--line); }
@media (min-width: 760px) { .steps li { padding-right: 28px; } }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; color: var(--terra); font-size: 1.6rem; margin-bottom: 6px; }
.steps li p { color: var(--grey); margin: 0; font-size: .95rem; }

/* ---------- Figure captions ---------- */
.fig-cap { margin-top: 14px; font-size: .82rem; color: var(--grey); max-width: 52em; }
.sub-title { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); margin: 0 0 14px; }

/* ---------- Roles diagram ---------- */
.roles-fig { margin: 0; }
.roles-grid { position: relative; }
.roles-lines { display: none; }
.roles-ring { list-style: none; margin: 0; padding: 0; }
.role-node { position: relative; z-index: 1; background: var(--sheet); border: 1px solid var(--line); padding: 14px 16px; }
.role-node h3 { font-size: 1.08rem; margin-bottom: 4px; }
.role-node p { margin: 0; font-size: .86rem; line-height: 1.5; color: var(--grey); }
.role-kind { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.role-node.is-dept { border-top: 2px solid var(--terra); }
.role-node.is-dept .role-kind { color: var(--terra-700); }
.role-admin { background: var(--ink); border-color: var(--ink); color: #fff; }
.role-admin p, .role-admin .role-kind { color: #D6D3D1; }

@media (max-width: 899px) {
  /* Phone / tablet: a vertical spine from Admin down to each role */
  .roles-ring { display: grid; gap: 10px; padding: 16px 0 0 26px; }
  .roles-ring .role-node::before { content: ""; position: absolute; left: -17px; top: 24px; width: 16px; height: 1px; background: var(--ink); transform-origin: left center; }
  .roles-ring .role-node::after { content: ""; position: absolute; left: -17px; top: -11px; bottom: -1px; width: 1px; background: var(--ink); transform-origin: top center; }
  .roles-ring .role-node:first-child::after { top: -17px; }
  .roles-ring .role-node:last-child::after { bottom: auto; height: 36px; }
}
@media (min-width: 900px) {
  .roles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 30px 20px; }
  .roles-lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; overflow: visible; }
  .roles-lines path { fill: none; stroke: var(--grey); stroke-width: .55; }
  .roles-ring { display: contents; }
  .role-admin { grid-column: 2 / span 2; grid-row: 2; align-self: center; text-align: center; padding: 18px 22px; }
  .roles-ring li:nth-child(1) { grid-column: 1; grid-row: 1; }
  .roles-ring li:nth-child(2) { grid-column: 2; grid-row: 1; }
  .roles-ring li:nth-child(3) { grid-column: 3; grid-row: 1; }
  .roles-ring li:nth-child(4) { grid-column: 4; grid-row: 1; }
  .roles-ring li:nth-child(5) { grid-column: 2; grid-row: 3; }
  .roles-ring li:nth-child(6) { grid-column: 3; grid-row: 3; }
}

/* ---------- Add-ons ---------- */
.addons { display: grid; gap: 16px; }
@media (min-width: 760px) { .addons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.addon { padding: 24px; background: var(--sheet); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.addon h3 { font-size: 1.15rem; }
.addon p { margin: 0; color: var(--grey); font-size: .95rem; }
.addon-tag { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--terra-700); }
.addon .addon-cover { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .78rem; line-height: 1.4; border: 1px solid var(--line-strong); border-radius: 20px; padding: 2px 10px; background: var(--paper); }
.addon .addon-foot { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-strong); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .85rem; }
.addon-foot b { font-weight: 400; color: var(--ink); }
.addon-tool { gap: 16px; }
@media (min-width: 760px) {
  .addon-tool { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .addon-tool > div { display: grid; gap: 8px; max-width: 34em; }
  .addon-tool .addon-foot { margin-top: 0; border-top: 0; padding-top: 0; flex-direction: column; align-items: flex-end; text-align: right; }
}
@media (max-width: 759px) { .addon-tool > div { display: grid; gap: 8px; } }

.caveat { margin: 20px 0 32px; padding: 16px 20px; border: 1px dashed var(--ink); background: var(--sheet); display: grid; gap: 6px; }
.caveat p { margin: 0; font-size: .93rem; }
.caveat-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); display: flex; align-items: center; gap: 8px; }
.caveat-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex: none; }

/* Add-on flow (timeline) */
.flow { margin: 0; padding: 22px 18px 20px; }
@media (min-width: 720px) { .flow { padding: 28px 28px 24px; } }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.flow-steps li { position: relative; padding-left: 62px; min-height: 44px; }
.flow-node { position: absolute; left: 0; top: 0; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: var(--sheet); display: grid; place-items: center; color: var(--terra); }
.flow-node svg { width: 22px; height: 22px; }
.flow-node path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.flow-no { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--terra-700); }
.flow-steps h3 { font-size: 1.1rem; margin: 2px 0 6px; }
.flow-steps p { margin: 0; font-size: .92rem; color: var(--grey); }
/* connector from each node to the next, with an arrowhead */
.flow-steps li:not(:last-child)::after { content: ""; position: absolute; left: 21.5px; top: 44px; bottom: -22px; width: 1px; background: var(--ink); transform-origin: top center; }
.flow-steps li:not(:last-child)::before { content: ""; position: absolute; left: 18.5px; bottom: -22px; border-top: 6px solid var(--ink); border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; }
@media (min-width: 760px) {
  .flow-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .flow-steps li { padding-left: 0; padding-top: 58px; }
  .flow-steps li:not(:last-child)::after { left: 44px; right: -24px; top: 22px; bottom: auto; width: auto; height: 1px; transform-origin: left center; }
  .flow-steps li:not(:last-child)::before { left: auto; right: -24px; bottom: auto; top: 18.5px; border-left: 6px solid var(--ink); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent; border-right: 0; }
}

/* ---------- Pricing allowances ---------- */
.allow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-strong); margin: 22px 0 0; background: var(--sheet); }
.allow > div { padding: 14px 10px 14px 12px; border-left: 1px solid var(--line); min-width: 0; }
.allow > div:first-child { border-left: 0; }
.allow small { display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.allow strong { display: block; font-weight: 400; font-size: clamp(1.45rem, 6vw, 2rem); line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; }
.allow-l { display: block; font-size: .78rem; line-height: 1.35; color: var(--grey); margin-top: 4px; }
.limit-note { margin: 0 0 22px; padding: 14px 16px; background: var(--terra-50); border-left: 2px solid var(--terra); font-size: .9rem; }
.limit-note p { margin: 0 0 .6em; }
.limit-note p:last-child { margin: 0; color: var(--grey); }
.price-list + .limit-note { margin-top: -6px; }

/* ---------- Department demo logins ---------- */
.dept-demo { margin-top: 16px; padding: 22px 24px; display: grid; gap: 14px 32px; align-items: center; }
@media (min-width: 820px) { .dept-demo { grid-template-columns: 1fr 1.1fr; } .dept-pass { grid-column: 2; } }
.dept-demo h3 { font-size: 1.3rem; margin: 6px 0 8px; }
.dept-demo p { color: var(--grey); font-size: .93rem; margin: 0; }
.dept-table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.dept-table th, .dept-table td { text-align: left; padding: 7px 4px; border-top: 1px dotted var(--line-strong); font-weight: 400; }
.dept-table thead th { border-top: 0; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.dept-table td { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .02em; }
.dept-demo .dept-pass { font-size: .86rem; }

/* ---------- Motion: infographics animate in when scrolled into view ----------
   site.js adds .motion to <html> only when the visitor has not asked for reduced
   motion; without it (or without JS) every figure shows its final state. */
@media screen and (prefers-reduced-motion: no-preference) {
  .motion [data-anim] .a-fade { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0s) + var(--dd, 0s)); }
  .motion [data-anim] .a-draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s cubic-bezier(.6, 0, .25, 1); transition-delay: calc(var(--d, 0s) + var(--dd, 0s) + .25s); }
  .motion [data-anim] .a-grow-x { transform: scaleX(0); transform-origin: left center; transition: transform .8s cubic-bezier(.6, 0, .25, 1); transition-delay: calc(var(--d, 0s) + .3s); }
  .motion [data-anim].is-in .a-fade { opacity: 1; transform: none; }
  .motion [data-anim].is-in .a-draw { stroke-dashoffset: 0; }
  .motion [data-anim].is-in .a-grow-x { transform: none; }

  /* connector lines draw out of each card / step */
  .motion .roles-ring .role-node::before { transform: scaleX(0); transition: transform .5s ease calc(var(--d, 0s) - .15s); }
  .motion .roles-ring .role-node::after { transform: scaleY(0); transition: transform .5s ease calc(var(--d, 0s) - .45s); }
  .motion .roles-fig.is-in .role-node::before, .motion .roles-fig.is-in .role-node::after { transform: none; }
  .motion .flow-steps li:not(:last-child)::after { transform: scaleY(0); transition: transform .7s cubic-bezier(.6, 0, .25, 1) calc(var(--d, 0s) + .45s); }
  .motion .flow-steps li:not(:last-child)::before { opacity: 0; transition: opacity .3s ease calc(var(--d, 0s) + 1s); }
  @media (min-width: 760px) { .motion .flow-steps li:not(:last-child)::after { transform: scaleX(0); } }
  .motion .flow.is-in .flow-steps li::after { transform: none; }
  .motion .flow.is-in .flow-steps li::before { opacity: 1; }

  /* a small red dot travels along each address-to-database line */
  .tenant-arrow::before { content: ""; position: absolute; top: -2px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: 0; }
  .motion .tenancy.is-in .tenant-arrow::before { animation: flow-dot 4.5s ease-in-out calc(var(--d, 0s) + 1.6s) infinite; }
}
@keyframes flow-dot {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  45% { left: calc(100% - 8px); opacity: 1; }
  55%, 100% { left: calc(100% - 8px); opacity: 0; }
}

@media print {
  body { background: #fff; }
  .site-header, .nav-toggle, .cta, .btn { display: none !important; }
  .frame::before { display: none; }
}
