@import "../../shared/css/brand.css";

/* ---- reset and base ---------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--ink-1000);
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); letter-spacing: -0.034em; }
h2 { font-size: var(--step-4); letter-spacing: -0.028em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { text-wrap: pretty; }

a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 2px;
          text-underline-offset: 2px; }

:focus-visible {
  outline: 3px solid var(--verified);
  outline-offset: 2px;
  border-radius: 3px;
}

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

.skip {
  position: absolute; left: 50%; transform: translate(-50%, -150%);
  background: var(--ink-1000); color: var(--white); padding: 10px 18px;
  border-radius: 0 0 var(--r) var(--r); z-index: 100; transition: transform .15s;
}
.skip:focus { transform: translate(-50%, 0); }

/* ---- layout ------------------------------------------------------------ */

.page { max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.lead { font-size: var(--step-1); color: var(--ink-600); max-width: var(--measure); }
.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.eyebrow.teal { color: var(--verified-600); }
.center { text-align: center; margin-inline: auto; }
.center .lead { margin-inline: auto; }

.grid { display: grid; gap: clamp(1rem, .6rem + 1.6vw, 2rem); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.split {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 880px) { .split { grid-template-columns: 1.05fr .95fr; } }

/* ---- header ------------------------------------------------------------ */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--ink-200);
}
.masthead .page {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 64px;
}
.logo { display: inline-flex; align-items: center; gap: .55rem; flex: none; }
.logo svg { width: 30px; height: 30px; }
.logo b {
  font-size: 1.0625rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--ink-1000);
}
.logo b span { color: var(--brand); }

.mainnav { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.mainnav a {
  padding: .5rem .7rem; border-radius: var(--r-sm);
  color: var(--ink-700); font-weight: 500; font-size: var(--step--1);
}
.mainnav a:hover { background: var(--ink-100); color: var(--ink-1000);
                   text-decoration: none; }
.mainnav a[aria-current="page"] { color: var(--brand-700); font-weight: 600; }
.navtoggle { display: none; }

@media (max-width: 820px) {
  .mainnav {
    position: fixed; inset: 64px 0 auto; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--white);
    border-bottom: 1px solid var(--ink-200); padding: .5rem var(--gutter) 1rem;
    box-shadow: var(--shadow-lg);
  }
  .mainnav[hidden] { display: none; }
  .mainnav a { padding: .7rem .5rem; font-size: var(--step-0); }
  .mainnav .btn { margin-top: .5rem; text-align: center; }
  .navtoggle {
    display: inline-flex; margin-left: auto; align-items: center; gap: .4rem;
    background: none; border: 1px solid var(--ink-300); color: var(--ink-800);
    border-radius: var(--r-sm); padding: .45rem .7rem; font: inherit;
    font-size: var(--step--1); cursor: pointer;
  }
}

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: var(--step-0);
  padding: .7rem 1.25rem; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff; box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--white); color: var(--ink-900); border-color: var(--ink-300); }
.btn-ghost:hover { background: var(--ink-50); border-color: var(--ink-400); }
.btn-dark { background: var(--ink-1000); color: var(--white); }
.btn-dark:hover { background: var(--ink-800); }
.btn-lg { padding: .9rem 1.6rem; font-size: var(--step-1); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---- hero -------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 1.5rem + 8vw, 7rem) clamp(3rem, 2rem + 5vw, 5.5rem);
  background:
    radial-gradient(1100px 520px at 82% -8%, var(--brand-wash) 0%, transparent 62%),
    radial-gradient(760px 420px at 6% 8%, var(--verified-wash) 0%, transparent 58%);
}
.hero h1 { max-width: 20ch; }
.hero .lead { margin-top: 1.25rem; font-size: var(--step-2); line-height: 1.45; }
.hero .btn-row { margin-top: 2rem; }
.hero-note { margin-top: 1rem; font-size: var(--step--1); color: var(--ink-500); }

/* ---- cards ------------------------------------------------------------- */

.card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: clamp(1.15rem, .9rem + .8vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: var(--step-1); }
.card p { color: var(--ink-600); margin-top: .5rem; }
.card-hi { border-color: var(--brand-300); box-shadow: var(--shadow); }

.step { position: relative; padding-top: 2.75rem; }
.step::before {
  content: attr(data-step);
  position: absolute; top: 1.15rem; left: clamp(1.15rem, .9rem + .8vw, 1.75rem);
  width: 30px; height: 30px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--ink-1000); color: var(--white);
  font-size: .8125rem; font-weight: 700;
}

.icon {
  width: 38px; height: 38px; border-radius: var(--r);
  display: grid; place-items: center; margin-bottom: .9rem;
  background: var(--brand-wash); color: var(--brand-700);
}
.icon.teal { background: var(--verified-wash); color: var(--verified-600); }
.icon svg { width: 20px; height: 20px; }

/* ---- outcome chips ----------------------------------------------------- */
/* CC-PROD-003: UNKNOWN and NO DATA must stay distinct from a negative finding.
   Every chip therefore carries its own word — colour is never the only signal. */

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--step--1); font-weight: 700; letter-spacing: .02em;
  padding: .2rem .6rem; border-radius: var(--r-sm);
  border: 1px solid transparent; white-space: nowrap;
}
.chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}
.chip-pass { background: var(--pass-wash); color: var(--pass-600); border-color: var(--pass); }
.chip-cond { background: var(--pass-wash); color: var(--pass-600); border-color: var(--pass-600); }
.chip-review { background: var(--review-wash); color: var(--review-600); border-color: var(--review); }
.chip-block { background: var(--block-wash); color: var(--block-600); border-color: var(--block); }
.chip-unknown { background: var(--unknown-wash); color: var(--ink-600); border-color: var(--ink-300); }
.chip-unavail { background: var(--unknown-wash); color: var(--ink-600);
                border-color: var(--ink-300); border-style: dashed; }
.chip-planned {
  background: var(--verified-wash); color: var(--verified-600);
  border-color: var(--verified); text-transform: uppercase; font-size: .6875rem;
}
.chip-planned::before { display: none; }

/* ---- ink section ------------------------------------------------------- */

.ink {
  background: var(--ink-1000);
  color: var(--ink-300);
  position: relative; overflow: hidden;
}
.ink h2, .ink h3 { color: #fff; }
.ink .lead { color: var(--ink-400); }
.ink .card {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: none;
}
.ink .card p { color: var(--ink-400); }
.ink .eyebrow { color: var(--brand-300); }
.ink::after {
  content: ""; position: absolute; inset: auto 0 -40% 0; height: 70%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(255, 106, 37, .16), transparent 70%);
  pointer-events: none;
}

/* ---- packet preview ---------------------------------------------------- */

.packet {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--ink-200); background: var(--white);
  box-shadow: var(--shadow-lg); font-size: var(--step--1);
}
.packet-bar {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem 1rem; background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
}
.packet-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-300); }
.packet-bar strong { font-size: var(--step--1); color: var(--ink-700); }
.packet-body { padding: 1rem; }
.packet-row {
  display: flex; gap: .75rem; align-items: baseline;
  padding: .55rem 0; border-bottom: 1px dashed var(--ink-200);
}
.packet-row:last-child { border-bottom: 0; }
.packet-row .k { color: var(--ink-500); min-width: 9.5rem; flex: none; }
.packet-row .v { color: var(--ink-900); font-weight: 500; }
.packet-foot {
  padding: .75rem 1rem; background: var(--ink-50);
  border-top: 1px solid var(--ink-200);
  font-family: var(--font-mono); font-size: .75rem; color: var(--ink-500);
  overflow-wrap: anywhere;
}

/* ---- pricing ----------------------------------------------------------- */

.plan { display: flex; flex-direction: column; }
.plan .price {
  font-size: var(--step-4); font-weight: 800; letter-spacing: -.03em;
  color: var(--ink-1000); line-height: 1;
}
.plan .price small { font-size: var(--step-0); font-weight: 600; color: var(--ink-500); }
.plan ul { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.plan li {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .4rem 0; color: var(--ink-700);
}
.plan li::before {
  content: "✓"; color: var(--verified-600); font-weight: 800; flex: none;
}
.plan li.no::before { content: "—"; color: var(--ink-400); }
.plan .btn { margin-top: 1.5rem; }
.badge-pilot {
  align-self: flex-start; margin-bottom: .75rem;
  background: var(--brand-wash); color: var(--brand-700);
  border: 1px solid var(--brand-300); border-radius: var(--r-pill);
  padding: .15rem .65rem; font-size: var(--step--1); font-weight: 700;
}

/* ---- tables ------------------------------------------------------------ */

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--ink-200); }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
th, td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--ink-200); }
th { background: var(--ink-50); font-weight: 700; color: var(--ink-600);
     font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- forms ------------------------------------------------------------- */

form .field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: var(--step--1);
        color: var(--ink-700); margin-bottom: .35rem; }
label .opt { font-weight: 400; color: var(--ink-400); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink-900); background: var(--white);
  border: 1px solid var(--ink-300); border-radius: var(--r);
  padding: .65rem .8rem;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-400); }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { width: auto; margin-top: .3rem; flex: none; }
.check label { font-weight: 400; color: var(--ink-700); margin: 0; }
.hint { font-size: var(--step--1); color: var(--ink-500); margin-top: .3rem; }
.formcard { max-width: 34rem; }

.alert {
  border-radius: var(--r); padding: .8rem 1rem; font-size: var(--step--1);
  border: 1px solid transparent; margin-bottom: 1rem;
}
.alert-error { background: var(--block-wash); color: var(--block-600); border-color: var(--block); }
.alert-ok { background: var(--pass-wash); color: var(--pass-600); border-color: var(--pass); }
.alert-info { background: var(--verified-wash); color: var(--verified-600);
              border-color: var(--verified-100); }

/* ---- planned capabilities ----------------------------------------------
   data-planned is the machine-readable marker the claim gate checks. Rendering
   it here means the marker cannot be true for the build and invisible to the
   reader: one attribute, and the page says so out loud. Generated content is
   announced by current screen readers, and the pages that had an explicit
   "Planned R1" chip keep it for the release detail. */

[data-planned]::after {
  content: "Planned";
  display: inline-block;
  margin-left: .5rem;
  vertical-align: middle;
  padding: .1rem .5rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--verified);
  background: var(--verified-wash);
  color: var(--verified-600);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* On a card or a figure the badge belongs at the top, not trailing the body. */
.card[data-planned], .packet[data-planned] { position: relative; }
.card[data-planned]::after, .packet[data-planned]::after {
  position: absolute;
  top: .75rem;
  right: .75rem;
  margin-left: 0;
}
.ink [data-planned]::after {
  background: rgba(0, 181, 184, .14);
  border-color: var(--verified);
  color: #8ee6e8;
}

/* ---- notes, faq -------------------------------------------------------- */

.note {
  border-left: 3px solid var(--brand); background: var(--brand-wash);
  padding: .9rem 1.1rem; border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink-700); font-size: var(--step--1);
}
.note.teal { border-left-color: var(--verified); background: var(--verified-wash); }

details.faq {
  border-bottom: 1px solid var(--ink-200); padding: 1rem 0;
}
details.faq summary {
  cursor: pointer; font-weight: 600; color: var(--ink-1000);
  font-size: var(--step-1); list-style: none; display: flex; gap: 1rem;
  align-items: baseline;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; margin-left: auto; color: var(--brand); font-weight: 700;
  font-size: var(--step-2); line-height: 1;
}
details.faq[open] summary::after { content: "−"; }
details.faq p { margin-top: .75rem; color: var(--ink-600); max-width: var(--measure); }

/* ---- footer ------------------------------------------------------------ */

.foot {
  background: var(--ink-1000); color: var(--ink-400);
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) 2rem;
  font-size: var(--step--1);
}
.foot a { color: var(--ink-300); }
.foot a:hover { color: #fff; }
/* Footer column titles are h2 for the document outline (an h4 after an h1 skips
   two levels) but keep the small, quiet appearance of a column label. */
.foot .footcol {
  color: #fff; font-size: var(--step--1); text-transform: uppercase;
  letter-spacing: .09em; margin-bottom: .75rem; font-weight: 700;
}
.foot ul { list-style: none; padding: 0; }
.foot li { padding: .2rem 0; }
.foot .bottom {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
}
.foot .bottom p { color: var(--ink-500); }
.foot .logo b { color: #fff; }

[hidden] { display: none !important; }
