/* ─────────────────────────────────────────
   THE CARBON WORKBENCH - home.css
   Homepage layout (rebuilt 29 Sep 2026). All classes are
   prefixed .hp- and scoped to <main class="hp">.
   Text colours are chosen to pass WCAG AA on their grounds.
   ───────────────────────────────────────── */

.hp {
  --hp-ink: #0f1a16;
  --hp-muted: #4a5550;
  --hp-paper: #fbfaf7;
  --hp-inset: #f1f2ee;
  --hp-rule: #dcdfd9;
  --hp-brand: #2a6348;
  --hp-lift: #46a074;
  --hp-carbon: #0c1512;
  --hp-carbon-2: #16241f;
  --hp-carbon-line: #2b3f37;
  --hp-on-dark: #eef2ef;
  --hp-on-dark-muted: #b4c3bb;
  --hp-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --hp-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hp-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  display: block;
  background: var(--hp-paper);
  color: var(--hp-ink);
  font-family: var(--hp-sans);
}
.hp *, .hp *::before, .hp *::after { box-sizing: border-box; }
.hp-wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

.hp h1, .hp h2 {
  font-family: var(--hp-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: inherit;
  margin: 0;
}
.hp h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.02; }
.hp h2 { font-size: clamp(30px, 3.4vw, 42px); line-height: 1.08; }
.hp h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; line-height: 1.3; }
.hp p { margin: 0; line-height: 1.65; }
.hp a { color: var(--hp-brand); }

/* Buttons */
.hp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 20px; border-radius: 8px;
  font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hp .hp-btn-primary { background: var(--hp-brand); color: #fff; }
.hp .hp-btn-primary:hover { background: #1f4c37; }
.hp .hp-btn-secondary { background: #fff; color: var(--hp-ink); border-color: #c7ccc5; }
.hp .hp-btn-secondary:hover { border-color: var(--hp-brand); color: var(--hp-brand); }
.hp .hp-btn-ghost-light { color: var(--hp-on-dark); border-color: #4b6158; background: transparent; }
.hp .hp-btn-ghost-light:hover { border-color: var(--hp-on-dark); }
.hp .hp-btn:focus-visible, .hp a:focus-visible, .hp summary:focus-visible, .hp button:focus-visible, .hp [tabindex]:focus-visible {
  outline: 3px solid #7fd3a6; outline-offset: 2px;
}

/* Section scaffolding */
.hp-section { padding: 96px 0; }
.hp-head { max-width: 720px; margin-bottom: 40px; }
.hp-head p { margin-top: 14px; color: var(--hp-muted); font-size: 17px; }
.hp-more { margin-top: 28px; font-weight: 600; }
.hp-more a { text-underline-offset: 3px; }
.hp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.hp-split > div > p { margin-top: 16px; color: var(--hp-muted); font-size: 17px; }
.hp-split .hp-actions { margin-top: 28px; }

/* Hero */
.hp-hero { padding: 84px 0 0; border-bottom: 1px solid var(--hp-rule); }
.hp-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hp-lead { margin-top: 22px !important; font-size: 19px; color: var(--hp-muted); max-width: 560px; }
.hp-hero .hp-actions { margin-top: 32px; }
.hp-note { margin-top: 18px !important; font-size: 14px; color: var(--hp-muted); }

.hp-panel {
  margin: 0; padding: 22px; border-radius: 14px;
  background: var(--hp-carbon); color: var(--hp-on-dark);
  box-shadow: 0 24px 60px rgba(12, 21, 18, 0.18);
  font-family: var(--hp-mono);
}
.hp-panel-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--hp-on-dark-muted); margin-bottom: 16px; }
.hp-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-panel-grid div { padding: 14px; border: 1px solid var(--hp-carbon-line); border-radius: 8px; background: var(--hp-carbon-2); }
.hp-panel-grid span { display: block; font-size: 12px; color: var(--hp-on-dark-muted); }
.hp-panel-grid strong { display: block; margin-top: 6px; font-size: 24px; font-weight: 500; color: #fff; }
.hp-panel-grid .hp-panel-net { border-color: var(--hp-lift); }
.hp-panel-grid .hp-panel-net strong { color: #8fe0b4; }
.hp-panel-chain { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 9px; }
.hp-panel-chain li { display: grid; grid-template-columns: 96px 1fr 64px; align-items: center; gap: 10px; font-size: 12px; color: var(--hp-on-dark-muted); }
.hp-panel-chain b { display: block; height: 6px; border-radius: 3px; background: linear-gradient(to right, #6f8f80 var(--w), #1d2c26 var(--w)); }
.hp-panel-chain b.net { background: linear-gradient(to right, var(--hp-lift) var(--w), #1d2c26 var(--w)); }
.hp-panel-chain em { font-style: normal; text-align: right; color: var(--hp-on-dark); }
.hp-panel figcaption { margin-top: 16px; font: 12px/1.5 var(--hp-sans); color: var(--hp-on-dark-muted); }

.hp-refs { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 44px; padding-bottom: 28px; }
.hp-refs-label { font-size: 13px; font-weight: 600; color: var(--hp-muted); }
.hp-refs ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.hp-refs li { padding: 5px 11px; border: 1px solid var(--hp-rule); border-radius: 999px; background: #fff; font-size: 13px; color: var(--hp-ink); }

/* Live calculator */
.hp-try { padding: 88px 0; background: var(--hp-carbon); color: var(--hp-on-dark); }
.hp-try .hp-head p { color: var(--hp-on-dark-muted); }
.hp-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--hp-carbon-line); border-radius: 10px; margin-bottom: 18px; }
.hp-tabs button { padding: 9px 16px; border: 0; border-radius: 7px; background: transparent; color: var(--hp-on-dark-muted); font: 600 14px/1.2 var(--hp-sans); cursor: pointer; }
.hp-tabs button.active { background: var(--hp-lift); color: var(--hp-carbon); }
.hp-frame { border: 1px solid var(--hp-carbon-line); border-radius: 12px; overflow: hidden; background: #0f1a16; }
.hp-frame iframe { display: block; width: 100%; height: 980px; border: 0; }
.hp-frame-foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: var(--hp-on-dark-muted); }
.hp-try .hp-btn-primary { background: var(--hp-lift); color: var(--hp-carbon); }
.hp-try .hp-btn-primary:hover { background: #5ab686; }

/* Tool cards */
.hp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hp-card { padding: 28px; border: 1px solid var(--hp-rule); border-radius: 12px; background: #fff; }
.hp-card > p { color: var(--hp-muted); font-size: 15px; }
.hp-links { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--hp-rule); display: grid; gap: 9px; }
.hp-links a { font-weight: 600; font-size: 15px; text-decoration: none; }
.hp-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Report */
.hp-report { background: var(--hp-inset); }
.hp-ticks { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.hp-ticks li { position: relative; padding-left: 28px; font-size: 16px; line-height: 1.5; }
.hp-ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--hp-brand); border-bottom: 2px solid var(--hp-brand); transform: rotate(-45deg); }
.hp-report-img { display: block; border-radius: 12px; }
.hp-report-img img { display: block; width: 100%; height: auto; border-radius: 12px; }

/* Method */
.hp-principles { margin: 28px 0 0; display: grid; gap: 18px; }
.hp-principles dt { font-weight: 600; font-size: 16px; }
.hp-principles dd { margin: 4px 0 0; color: var(--hp-muted); font-size: 15px; line-height: 1.6; }
.hp-code {
  margin: 0; padding: 26px; border-radius: 12px; overflow-x: auto;
  background: var(--hp-carbon); color: #dfe8e3;
  font: 14px/1.8 var(--hp-mono);
}
.hp-code .c { color: #93a79d; }

/* Embeds */
.hp-embeds { background: var(--hp-carbon); color: var(--hp-on-dark); }
.hp-embeds .hp-split > div > p { color: var(--hp-on-dark-muted); }
.hp-embeds .hp-btn-primary { background: var(--hp-lift); color: var(--hp-carbon); }
.hp-embeds .hp-btn-primary:hover { background: #5ab686; }
.hp-embed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hp-embed-list li { padding: 20px 22px; border: 1px solid var(--hp-carbon-line); border-radius: 10px; background: var(--hp-carbon-2); }
.hp-embed-list strong { display: block; font-size: 16px; color: #fff; }
.hp-embed-list span { display: block; margin-top: 4px; font-size: 14px; color: var(--hp-on-dark-muted); }

/* Pricing */
.hp-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-plan { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--hp-rule); border-radius: 12px; background: #fff; }
.hp-plan-featured { border: 2px solid var(--hp-brand); }
.hp-price { margin-top: 6px !important; font-family: var(--hp-serif); font-size: 42px; line-height: 1.1 !important; }
.hp-price small { font-family: var(--hp-sans); font-size: 14px; color: var(--hp-muted); }
.hp-plan ul { flex: 1; margin: 18px 0 22px; padding: 0; list-style: none; display: grid; gap: 8px; align-content: start; }
.hp-plan li { font-size: 14px; line-height: 1.45; color: var(--hp-ink); padding-left: 16px; position: relative; }
.hp-plan li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--hp-brand); }
.hp-plan .hp-btn { width: 100%; }
.hp-plans-note { margin-top: 24px !important; color: var(--hp-muted); }

/* Comparison */
.hp-compare { padding-top: 24px; }
.hp-table-scroll { overflow-x: auto; border: 1px solid var(--hp-rule); border-radius: 12px; background: #fff; }
.hp-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.hp-table th, .hp-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--hp-rule); vertical-align: top; }
.hp-table thead th { font-size: 13px; font-weight: 600; color: var(--hp-muted); background: var(--hp-inset); }
.hp-table tbody th { font-weight: 600; }
.hp-table tbody td { color: var(--hp-muted); }
.hp-table .hl { background: #e9f3ed; color: #174a33; font-weight: 600; }
.hp-table tbody tr:last-child th, .hp-table tbody tr:last-child td { border-bottom: 0; }

/* FAQ */
.hp-faq { padding-top: 24px; }
.hp-faq-wrap { max-width: 820px; }
.hp-faq h2 { margin-bottom: 28px; }
.hp-faq details { border-top: 1px solid var(--hp-rule); }
.hp-faq details:last-of-type { border-bottom: 1px solid var(--hp-rule); }
.hp-faq summary {
  display: flex; justify-content: space-between; gap: 18px; padding: 20px 0;
  cursor: pointer; list-style: none; font-size: 17px; font-weight: 600;
}
.hp-faq summary::-webkit-details-marker { display: none; }
.hp-faq summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--hp-brand); }
.hp-faq details[open] summary::after { content: "−"; }
.hp-faq details p { padding: 0 0 22px; color: var(--hp-muted); font-size: 16px; max-width: 700px; }

/* Closing strip */
.hp-close { padding: 72px 0; background: var(--hp-brand); color: #fff; }
.hp-close-inner { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; }
.hp-close p { margin-top: 8px; color: #e3efe8; }
.hp-close .hp-btn-primary { background: #fff; color: var(--hp-brand); }
.hp-close .hp-btn-primary:hover { background: #e9f3ed; }
.hp-close .hp-btn-ghost-light { border-color: #9cc4ae; color: #fff; }

/* Responsive */
@media (max-width: 1020px) {
  .hp-plans { grid-template-columns: repeat(2, 1fr); }
  .hp-cards { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hp-hero { padding-top: 52px; }
  .hp-hero-grid, .hp-split { grid-template-columns: 1fr; gap: 40px; }
  .hp-section { padding: 68px 0; }
  .hp-try { padding: 64px 0; }
  .hp-frame iframe { height: 1100px; }
}
@media (max-width: 560px) {
  .hp-wrap { padding: 0 18px; }
  .hp-plans { grid-template-columns: 1fr; }
  .hp-lead { font-size: 17px; }
  .hp-actions .hp-btn { width: 100%; }
  .hp-panel-chain li { grid-template-columns: 80px 1fr 56px; }
  .hp-panel-grid strong { font-size: 20px; }
}
