/* contrum brand (Brand Book 1.0): black and white, anthracite for surfaces,
   no accent colour, Space Grotesk + JetBrains Mono. Used by contrum.org and
   contrum.ai. */

@font-face {
  font-family: "Space Grotesk"; font-weight: 300 700; font-style: normal; font-display: swap;
  src: url("/shared/fonts/SpaceGrotesk-Variable.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-weight: 100 800; font-style: normal; font-display: swap;
  src: url("/shared/fonts/JetBrainsMono-Variable.woff2") format("woff2");
}

:root {
  --bg: #000000;
  --fg: #ffffff;
  --surface: #1a1a1a;
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .32);
  --focus: #ffffff;
  --btn-bg: #ffffff;
  --btn-fg: #000000;
  --btn-bg-hover: #e6e6e6;
  --ok: #ffffff;
  --error: #ff8a80; /* functional only: form errors must be distinguishable */
  --font-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-label: "JetBrains Mono", Menlo, Consolas, monospace;
  --max: 76rem;
}

h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; }
.label {
  font-family: var(--font-label); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
}

.notice { border-bottom: 1px solid var(--line); font-family: var(--font-label); font-size: .78rem; letter-spacing: .04em; }
.notice .wrap { padding: .6rem 0; }

.brand img { height: 1.75rem; width: auto; }

/* ---- hero ---- */
.hero { padding: clamp(4rem, 12vw, 9rem) 0 clamp(3.5rem, 9vw, 7rem); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .label { margin-bottom: 1.75rem; display: block; }
.hero h1 { font-size: clamp(2.6rem, 8.2vw, 6.6rem); line-height: 1; max-width: 13ch; }
.hero-sub { max-width: 40rem; margin: 2rem 0 2.5rem; font-size: clamp(1.1rem, 2vw, 1.35rem); }
.hero-oct {
  position: absolute; right: -8rem; top: 50%; translate: 0 -50%; width: 34rem; opacity: .07; pointer-events: none;
}
@media (max-width: 860px) { .hero-oct { width: 22rem; right: -9rem; } }

/* ---- sections ---- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: 1rem; margin-bottom: 3rem; max-width: 44rem; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.section-head p { font-size: 1.15rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--bg); padding: 2rem; display: grid; align-content: start; gap: 1rem; }
.card.surface { background: var(--surface); }
.card .num { font-family: var(--font-label); font-size: .85rem; }
.card h3 { font-size: 1.6rem; }
.card ul { display: grid; gap: .55rem; }
.card li { padding-left: 1.25rem; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .78em; width: .6rem; height: 1px; background: var(--fg); }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1000px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .service-grid { grid-template-columns: 1fr; } }
.service-grid .card { background: var(--bg); }
.service-grid .tag { font-family: var(--font-label); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line-strong); padding: .2rem .5rem; justify-self: start; }

.steps { display: grid; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 6rem 1fr 1.4fr; gap: 1.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.step .num { font-family: var(--font-label); }
.step h3 { font-size: 1.35rem; }
@media (max-width: 760px) { .step { grid-template-columns: 3rem 1fr; } .step p { grid-column: 2; } }

.status-line {
  font-family: var(--font-label); font-size: .85rem; border: 1px solid var(--line-strong);
  padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.5rem;
}
.status-line > span::before { content: "● "; }

.inverted { background: var(--fg); color: var(--bg); }
.inverted .btn-primary { --btn-bg: #000; --btn-fg: #fff; --btn-bg-hover: #222; }
.inverted .label { opacity: .8; }
.teaser { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .teaser { grid-template-columns: 1fr; } }
.teaser h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 1rem 0 1.25rem; }
.teaser ul { display: grid; gap: .8rem; font-family: var(--font-label); font-size: .9rem; }
.teaser li { border-bottom: 1px solid rgba(0, 0, 0, .2); padding-bottom: .8rem; }

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin: 1rem 0 1.25rem; }
.contact-lines { margin-top: 2rem; font-size: 1.15rem; }
.form-card { background: var(--surface); padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-card .field input, .form-card .field select, .form-card .field textarea { background: var(--bg); }

/* ---- footer ---- */
.site-footer { padding: 3.5rem 0 2.5rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.footer-top .lead { max-width: 26rem; margin-top: 1rem; }
.footer-top img { height: 1.5rem; width: auto; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 3rem; }
.footer-cols h3 { font-family: var(--font-label); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; margin-bottom: 1rem; }
.footer-cols ul { display: grid; gap: .5rem; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-family: var(--font-label); font-size: .78rem; }
.socials { display: flex; gap: .5rem; flex-wrap: wrap; }
.socials a { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-strong); }
.socials a:hover { background: var(--fg); color: var(--bg); }
.socials svg { width: 1.1rem; height: 1.1rem; }

/* ---- contrum.ai additions ---- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 1000px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-grid .card h3 { font-size: 1.3rem; }
.feature-grid svg { width: 1.6rem; height: 1.6rem; }

.demo { border: 1px solid var(--line-strong); background: var(--surface); }
.demo-tabs, .demo-steps { display: flex; flex-wrap: wrap; gap: .5rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.demo-tabs button, .demo-steps button {
  min-height: 2.75rem; padding: .5rem 1rem; border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
}
.demo-steps button { flex: 1 1 10rem; font-family: var(--font-label); font-size: .8rem; letter-spacing: .06em; }
.demo-tabs button[aria-selected="true"], .demo-steps button[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.demo-body { padding: clamp(1.25rem, 4vw, 2rem); min-height: 9.5rem; font-size: 1.15rem; line-height: 1.9; }
.demo-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding: .9rem 1rem; border-top: 1px solid var(--line); font-family: var(--font-label); font-size: .78rem; }
.chip { font-family: var(--font-label); font-size: .82em; border: 1px solid var(--fg); padding: .05em .4em; white-space: nowrap; }
.pii { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: .25em; }

.access-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 760px) { .access-grid { grid-template-columns: 1fr; } }
.access-grid .card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.access-grid h3 { font-size: 2rem; }
.access-grid .btn { justify-self: start; margin-top: .5rem; }
.brand-ai { gap: .6rem; }

/* contrum.ai FAQ */
.faq-list { display: grid; gap: .75rem; max-width: 52rem; }
.faq-item { border: 1px solid var(--line-strong); background: var(--surface); }
.faq-item summary { cursor: pointer; padding: 1.1rem 1.25rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-label); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 1.25rem 1.25rem; max-width: 46rem; }

/* contrum.ai preview screenshots */
.preview-grid { display: grid; gap: 2rem; }
.preview { margin: 0; }
.preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line-strong); }
.preview figcaption { margin-top: .75rem; font-size: .92rem; color: rgba(255, 255, 255, .78); max-width: 46rem; }
