/* Cuvatrix public website. Brand: Cuvatrix_Brand_Identity_v1.0.0 (Deep Verdigris, Annealed Copper as a single
   precise accent, Mineral White, IBM Plex Sans). Tokens follow the Cuvatrix app so the two read as one product. */

@font-face {
    font-family: "Plex Sans";
    src: url("../fonts/plex-sans-latin.woff2") format("woff2");
    font-weight: 100 700; font-style: normal; font-display: swap;
}

:root {
    --verdigris: #143a35;        /* Deep Verdigris: base */
    --verdigris-2: #1d7a6b;      /* links and focus, from the app */
    --verdigris-deep: #0d2a26;
    --mineral: #f4f1e9;          /* Mineral White: the page */
    --surface: #ffffff;
    --surface-2: #faf8f3;
    --ink: #1d2c29;
    --ink-2: #44534f;
    --ink-3: #61706c;
    --rule: #e0dbcf;
    --rule-strong: #c5bdad;
    --on-dark: #e9f2ef;
    --on-dark-2: #a9c7bf;
    --copper: #d88952;           /* Annealed Copper: the accent node, never body text */
    --copper-text: #96491e;      /* copper for figures (AA on white and Mineral White) */
    --copper-tint: #f5e6da;
    --patina: #dcede8;
    --font: "Plex Sans", "Segoe UI", system-ui, sans-serif;
    --measure: 68ch;
    --gutter: clamp(16px, 4vw, 40px);
    --wide: 1180px;
    --radius: 10px;
    --focus: 0 0 0 3px rgba(29, 122, 107, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0; background: var(--mineral); color: var(--ink);
    font: 400 1.0625rem/1.6 var(--font); font-feature-settings: "kern";
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--verdigris-2); text-underline-offset: .18em; }
a:hover { color: var(--verdigris); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.num, table { font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--verdigris); margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.35rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.2rem; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: .92rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem .8rem; z-index: 10; }
.skip:focus { left: 8px; }

/* ── header ──────────────────────────────────────────────────────────── */
.site-head { background: var(--mineral); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { flex: none; display: inline-flex; padding: 6px 0; }
.brand img { width: 150px; }
.nav { display: flex; gap: .25rem; margin: 0 auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; padding: .55rem .8rem; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--verdigris); background: var(--surface-2); }
.head-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem 1.1rem;
    border-radius: 8px; font-weight: 500; text-decoration: none; border: 1px solid transparent; cursor: pointer;
    font: inherit; font-weight: 500; line-height: 1.2;
}
.button.primary { background: var(--verdigris); color: #fff; }
.button.primary:hover { background: var(--verdigris-deep); color: #fff; }
.button.quiet { color: var(--verdigris); border-color: var(--rule-strong); background: var(--surface); }
.button.quiet:hover { border-color: var(--verdigris); color: var(--verdigris); }
.button.on-dark { background: var(--mineral); color: var(--verdigris); }
.button.on-dark:hover { background: #fff; }
.button.ghost-dark { color: var(--on-dark); border-color: rgba(233, 242, 239, .45); }
.button.ghost-dark:hover { border-color: var(--on-dark); color: #fff; }

/* The menu on narrow screens: a disclosure, so it works without a script. Sign in stays beside it. */
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; min-height: 44px; min-width: 44px; display: grid; place-items: center;
    border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); color: var(--verdigris); font-weight: 500; padding: 0 .8rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface);
    border: 1px solid var(--rule); border-radius: var(--radius); padding: .5rem; display: grid; }
.menu-panel a { padding: .7rem .8rem; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.menu-panel a:hover { background: var(--surface-2); }

@media (max-width: 860px) {
    .nav, .head-actions .button.primary { display: none; }
    .menu { display: block; }
    .site-head .wrap { gap: .75rem; }
    .head-actions { margin-left: auto; }
    .brand img { width: 128px; }
}

/* ── sections ────────────────────────────────────────────────────────── */
main section { padding: clamp(56px, 8vw, 104px) 0; }
main section + section { border-top: 1px solid var(--rule); }
.section-intro { max-width: 760px; margin-bottom: 2.5rem; }
.dark { background: var(--verdigris); color: var(--on-dark); border-top: none !important; }
.dark h2, .dark h3 { color: #fff; }
.dark p { color: var(--on-dark-2); }
.dark a { color: #fff; }

/* hero: the message, then the product's own question */
.hero { padding-top: clamp(40px, 6vw, 80px) !important; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.25rem; }
.existing { font-size: .98rem; color: var(--ink-2); margin: 0; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ── the matrix: the one bold element ─────────────────────────────────── */
figure { margin: 0; }
.assay { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(16px, 2.4vw, 28px); }
.assay-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; margin-bottom: 1rem; }
.assay-head b { color: var(--verdigris); font-weight: 600; }
.tag { display: inline-block; font-size: .8rem; font-weight: 500; color: var(--ink-2); background: var(--surface-2);
    border: 1px solid var(--rule); border-radius: 6px; padding: .1rem .5rem; white-space: nowrap; }
.matrix { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 4px; font-size: .9rem; }
.matrix .h { color: var(--ink-3); font-weight: 500; padding: .2rem .4rem; text-align: center; font-size: .8rem; }
.matrix .r { color: var(--verdigris); font-weight: 600; padding: .45rem .6rem .45rem 0; text-align: right; }
.matrix .c { border-radius: 4px; padding: .45rem .4rem; text-align: center; color: var(--verdigris); position: relative; }
.c.s1 { background: #e7f0ed; } .c.s2 { background: #d5e7e1; } .c.s3 { background: #c0dbd2; }
.c.s4 { background: #a7cdc1; } .c.s5 { background: #8cbdae; color: #08231f; } .c.s6 { background: #6eab99; color: #fff; }
/* The settlement point: where an invoice's average grade lands. The copper node of the mark. */
.c.hit { outline: 2px solid var(--verdigris); outline-offset: -2px; font-weight: 600; }
.c.hit::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--copper);
    left: 5px; top: 5px; }
.assay-foot { margin-top: 1rem; font-size: .9rem; color: var(--ink-2); }

/* two groupings, side by side */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px); margin-top: 2rem; }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } }
.grouping { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem; }
.grouping.better { border-color: var(--verdigris); }
.grouping h3 { margin-bottom: .25rem; }
.grouping .how { color: var(--ink-3); font-size: .95rem; margin-bottom: 1rem; }
.invoice { border-top: 1px dashed var(--rule-strong); padding: .8rem 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; }
.invoice .trucks { display: flex; flex-wrap: wrap; gap: .3rem; grid-column: 1 / -1; }
.truck { font-size: .8rem; font-weight: 500; border-radius: 4px; padding: .1rem .45rem; background: var(--surface-2); border: 1px solid var(--rule); color: var(--ink-2); }
.invoice .avg { color: var(--ink-2); font-size: .95rem; }
.invoice .value { text-align: right; font-weight: 600; color: var(--ink); }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--verdigris); padding-top: .8rem; margin-top: .2rem; }
.total b { font-size: 1.35rem; color: var(--verdigris); }
.gain { margin-top: 1.25rem; font-size: 1.05rem; }
.gain b { color: var(--copper-text); }

/* ── workflow: a real sequence, numbered ──────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
    background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; counter-reset: step; }
.steps li { background: var(--surface); padding: 1.5rem 1.4rem 1.6rem; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 6px;
    background: var(--verdigris); color: #fff; font-weight: 600; margin-bottom: .9rem; font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--ink-2); margin: 0; font-size: .98rem; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* ── proof sheet ──────────────────────────────────────────────────────── */
.proof { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.proof th, .proof td { text-align: left; padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.proof th { width: 30%; color: var(--verdigris); font-weight: 600; }
.proof td { color: var(--ink-2); }
.proof tr:last-child th, .proof tr:last-child td { border-bottom: none; }
@media (max-width: 640px) { .proof th, .proof td { display: block; width: auto; } .proof th { border-bottom: none; padding-bottom: .2rem; } }

/* controls list on dark */
.controls { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.controls li { padding: .9rem 0; border-bottom: 1px solid rgba(233, 242, 239, .16); color: var(--on-dark); }
.controls li b { color: #fff; font-weight: 600; }
@media (max-width: 760px) { .controls { grid-template-columns: 1fr; } }

/* the final access panel */
.access .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: end; }
.access h2 { max-width: 20ch; }
.access-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; }
@media (max-width: 860px) { .access .wrap { grid-template-columns: 1fr; } .access-actions { justify-content: flex-start; } }

/* inner pages */
.page-head { padding: clamp(40px, 6vw, 72px) 0 0 !important; border-top: none !important; }
.prose h2 { margin-top: 2.2rem; font-size: 1.45rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--measure); }
.prose li { margin: .3rem 0; }
.draft { display: inline-block; background: var(--copper-tint); color: var(--copper-text); border-radius: 6px; padding: .2rem .6rem;
    font-size: .9rem; font-weight: 500; margin-bottom: 1.2rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.2rem; }
.card h3 { margin-bottom: .4rem; }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); }
.notice { align-self: start; border-left: 3px solid var(--copper); background: var(--surface); padding: .9rem 1.1rem; border-radius: 0 8px 8px 0; color: var(--ink-2); max-width: var(--measure); }

/* ── footer ──────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--rule); padding: 1.75rem 0 2.25rem; font-size: .95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--verdigris); text-decoration: underline; }
.site-foot .mark { width: 24px; }
.foot-left { display: flex; align-items: center; gap: .75rem; color: var(--ink-3); }
.prose-list { padding-left: 1.2rem; max-width: var(--measure); color: var(--ink-2); }
.prose-list li { margin: .3rem 0; }

/* real product screens (demonstration data) */
.screen { margin: 0; }
.screen img { width: 100%; height: auto; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); }
.screen figcaption { margin-top: .6rem; font-size: .9rem; color: var(--ink-3); max-width: var(--measure); }
/* A screen at full width under its words: smaller, the app's own text can't be read. */
.screen-row > div { max-width: 720px; margin-bottom: 1.1rem; }
.screen-row + .screen-row { margin-top: clamp(48px, 7vw, 88px); }
.screen-row h3 { font-size: 1.35rem; }
.screen-row p { color: var(--ink-2); margin-bottom: 0; }
.two-col > .card { align-self: start; }

/* No inline style anywhere: the content security policy (style-src 'self') blocks them. */
.matrix .mrow { display: contents; }
.after { margin-top: 1.5rem; }
.screen.spaced { margin-top: 2.5rem; }
.notice .tight-head { margin: 0 0 .6rem; }
.notice .tight { margin: 0; }
