/* =====================================================
   COIxist — Landing page sections ("Paper & Ink")
   Loaded after tokens.css, fonts.css and base.css.
   ===================================================== */

/* ─── HERO ─── */
.hero {
  padding: clamp(56px, 9vw, 128px) 0 clamp(40px, 6vw, 80px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

.hero h1 {
  font-size: clamp(42px, 6.2vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.028em;
  font-weight: 400;
  max-width: 12ch;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 6px;
}

.hero-aside p {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.45;
  color: var(--text-2);
  max-width: 34ch;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ─── PRODUCT ARTIFACT (HTML-rendered results sheet) ─── */
.artifact-wrap {
  margin-top: clamp(48px, 7vw, 104px);
  padding: clamp(16px, 2.5vw, 36px);
  background: var(--paper-2);
  border-radius: calc(var(--radius) + 6px);
}

.artifact {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(14, 17, 22, 0.03), 0 24px 60px -32px rgba(14, 17, 22, 0.25);
  font-size: 13.5px;
}

.artifact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12.5px;
}

.artifact-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.artifact-bar-left > * { white-space: nowrap; }

.artifact-bar-left strong {
  color: var(--text);
  font-weight: 500;
}

.artifact-bar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.artifact-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.artifact-main {
  padding: 24px 24px 20px;
  border-right: 1px solid var(--line);
}

.artifact-query {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.artifact-field span {
  display: block;
  color: var(--text-3);
  font-size: 11.5px;
  margin-bottom: 6px;
}

.artifact-field strong {
  font-weight: 500;
  font-size: 14px;
}

.artifact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.artifact-table th {
  text-align: left;
  font-weight: 400;
  color: var(--text-3);
  font-size: 11.5px;
  padding: 14px 0 10px;
}

.artifact-table td {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.artifact-table td:first-child { font-weight: 500; }
.artifact-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.artifact-table .src { color: var(--text-2); }

.risk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.risk::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.risk--high { color: var(--risk-high); }
.risk--medium { color: var(--risk-medium); }
.risk--low { color: var(--risk-low); }
.risk--none { color: var(--risk-none); }

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
}

.artifact-side {
  padding: 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.artifact-side h4 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.artifact-side p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.artifact-side .why {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.artifact-side .why strong {
  display: block;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 13px;
}

.artifact-side .audit {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.7;
  white-space: pre-line;
}

/* ─── PROOF ROW ─── */
.proof {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.proof-item {
  padding: 24px 24px 24px 0;
  border-right: 1px solid var(--line);
  margin-right: 24px;
}

.proof-item:last-child { border-right: 0; margin-right: 0; }

.proof-item strong {
  display: block;
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
}

.proof-item span {
  font-size: 14px;
  color: var(--text-3);
}

/* ─── GENERIC SECTION PIECES ─── */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section-head p {
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--text-2);
  line-height: 1.5;
  max-width: 44ch;
  text-wrap: pretty;
}

/* Column grids with hairline tops (Legora's text-card idiom) */
.cols {
  display: grid;
  gap: 0 clamp(24px, 3vw, 48px);
}

.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.col {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.col h3 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.col p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}

.col .more { margin-top: 6px; }

/* ─── PLATFORM GRID ─── */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
}

.feature-icon {
  width: 26px;
  height: 26px;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-icon svg { width: 100%; height: 100%; }

.feature h3 {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.feature p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-2);
}

/* ─── INK BANDS ─── */
.band {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: var(--section-y) 0;
}

.band h2 { color: var(--text-on-ink); }
.band p { color: var(--text-on-ink-2); }
.band .eyebrow { color: var(--text-on-ink-2); }

.band .col { border-top-color: var(--line-on-ink); }
.band .col h3 { color: var(--text-on-ink); }
.band .col p { color: var(--text-on-ink-2); }
.band .col-num { color: var(--text-on-ink-2); }
.band .more { color: var(--text-on-ink); }
.band .more:hover { color: #fff; }
.band .btn--text { color: var(--text-on-ink); border-color: var(--line-on-ink); }
.band .btn--text:hover { color: #fff; border-color: #fff; }

.stats {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}

.stats-intro h2 { margin-bottom: 20px; }

.stats-intro p {
  font-size: 16px;
  line-height: 1.55;
  max-width: 40ch;
}

.stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line-on-ink);
}

.stat:last-child { border-bottom: 1px solid var(--line-on-ink); }

.stat-value {
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.stat-value.mono {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -0.02em;
  padding-top: 0.45em;
}

.stat p {
  font-size: 14px;
  line-height: 1.5;
  padding-top: 6px;
}

/* ─── INTEGRATIONS ─── */
.int-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 48px);
}

.int-group {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.int-group h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 14px;
  letter-spacing: 0;
}

.int-group ul { list-style: none; }

.int-group li {
  font-size: 17px;
  line-height: 1.3;
  padding: 7px 0;
  letter-spacing: -0.005em;
}

.int-group li small {
  display: block;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 1px;
}

.int-note a { text-decoration: underline; text-underline-offset: 3px; color: var(--text-2); }
.int-note a:hover { color: var(--accent); }

.int-note {
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-3);
  max-width: 70ch;
  line-height: 1.5;
}

/* ─── FAQ ─── */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--text-3);
  transition: transform 240ms var(--ease);
}

.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }

.faq-answer {
  padding: 0 0 24px;
  max-width: 62ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.faq-answer a { text-decoration: underline; text-underline-offset: 3px; }
.faq-answer code { font-family: var(--font-mono); font-size: 0.9em; }

/* ─── CLOSING CARD + FORM ─── */
.closing { padding: 0 0 var(--section-y); }

.closing-card {
  background: var(--accent);
  color: #fff;
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(32px, 5vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}

.closing-card h2 { color: #fff; margin-bottom: 20px; }

.closing-card .lede {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.55;
  max-width: 40ch;
}

.closing-card .lede + .lede { margin-top: 12px; }
.closing-card .lede a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1 / -1; }

.form-field label {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}

.form-field label span { color: rgba(255, 255, 255, 0.5); }

.form-field input,
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  outline: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230E1116' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-field input::placeholder { color: var(--text-3); }

.form-field input:focus-visible,
.form-field select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.form-submit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.form-submit .btn { background: #fff; color: var(--accent); }
.form-submit .btn:hover { background: var(--paper-2); color: var(--accent-ink); }
.form-submit .btn .arrow { background: var(--accent-soft); }
.form-submit .btn[disabled] { opacity: 0.7; cursor: progress; }

.form-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.form-success {
  display: none;
  grid-column: 1 / -1;
  padding: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
}

.form-success h3 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
}

.form-success p {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.form-success a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.form.is-done > :not(.form-success) { display: none; }
.form.is-done .form-success { display: block; }

.form-error {
  display: none;
  grid-column: 1 / -1;
  font-size: 13.5px;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px 14px;
  border-radius: 8px;
}

.form.has-error .form-error { display: block; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .int-groups, .cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .artifact-body { grid-template-columns: 1fr; }
  .artifact-main { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .hero-grid,
  .section-head,
  .stats,
  .faq-grid,
  .closing-card { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .cols--3 { grid-template-columns: 1fr; row-gap: 32px; }
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-item { padding: 18px 16px 18px 0; margin-right: 16px; }
  .proof-item:nth-child(2) { border-right: 0; margin-right: 0; }
  .proof-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat { grid-template-columns: 1fr; gap: 10px; }
  .artifact-query { grid-template-columns: 1fr; gap: 14px; }
  .artifact-table .hide-sm { display: none; }
  .form { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .int-groups, .cols--4 { grid-template-columns: 1fr; }
  .feature { min-height: 0; padding: 24px 20px 28px; }
  .artifact-bar-right { display: none; }
}
