/* PAAR Systems — shared stylesheet
   Design direction: bold and minimal. High-contrast type, generous whitespace,
   one accent colour, almost no ornament. Page sits on a violet-tinted white
   sampled from the logo rather than pure white. */

:root {
  --ink: #0C0B14;            /* cool near-black, sits with the violet */
  --ink-soft: #464458;
  --ink-faint: #66647B;      /* darkened to clear WCAG AA on both page tints */
  --paper: #F6F5FC;          /* violet-tinted white */
  --paper-alt: #EBE9F8;      /* one shade deeper for alternating bands */
  --line: #D9D6EA;
  /* Brand palette sampled from the PAAR Systems logo */
  --accent: #5935DF;        /* wordmark violet */
  --accent-mid: #3C56D1;    /* deep indigo in the mark */
  --accent-2: #4F88D7;      /* mid blue in the mark */
  --accent-ink: #FFFFFF;
  --brand-gradient: linear-gradient(90deg, var(--accent) 0%, var(--accent-mid) 45%, var(--accent-2) 100%);

  --max: 1180px;
  --gut: clamp(1.25rem, 5vw, 4.5rem);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout primitives ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gut);
}

section { padding: clamp(4rem, 9vw, 8.5rem) 0; }
section.tight { padding: clamp(2.75rem, 6vw, 5rem) 0; }
section.alt { background: var(--paper-alt); }
section.ink { background: var(--ink); color: var(--paper); }
section.ink .eyebrow { color: rgba(246, 245, 252, 0.6); }
section.ink .lede { color: rgba(246, 245, 252, 0.8); }
section.ink hr, section.ink .card { border-color: rgba(246, 245, 252, 0.24); }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 7.4vw, 5.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.2; letter-spacing: -0.02em; }
h4 { font-size: 1.02rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.15em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.6rem;
}

.lede {
  font-size: clamp(1.1rem, 1.75vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
  letter-spacing: -0.01em;
}

.measure { max-width: 62ch; }
.big-statement {
  font-size: clamp(1.5rem, 3.1vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 30ch;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 245, 252, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  border-top: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
  border-left: 0;
  border-right: 0;
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.05rem var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.16rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.brand span { font-weight: 400; color: var(--ink-faint); letter-spacing: 0.02em; font-size: 0.95rem; }

/* Logo lockup — height-driven so it scales with the nav, never distorts */
.brand img { height: 34px; width: auto; }
.footer .brand img { height: 42px; }
@media (max-width: 620px) { .brand img { height: 28px; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  font-size: 0.94rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

section.ink .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
section.ink .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
section.ink .btn.ghost { background: transparent; color: var(--paper); border-color: rgba(246,245,252,0.42); }
section.ink .btn.ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.2rem; }

.textlink {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
  white-space: nowrap;
}
.textlink:hover { color: var(--accent); }

/* ---------- Hero ---------- */

.hero { padding: clamp(4rem, 11vw, 9.5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: 1.8rem; }

/* ---------- Grids ---------- */

.grid { display: grid; gap: clamp(1.75rem, 3.2vw, 3rem); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 5vw, 5rem);
  align-items: start;
}

@media (max-width: 900px) {
  .g3, .g4, .split { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Numbered / bordered blocks ---------- */

.card {
  border-top: 2px solid var(--ink);
  padding-top: 1.4rem;
}
.card .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.9rem;
}
.card p { font-size: 0.98rem; color: var(--ink-soft); }
section.ink .card p { color: rgba(246,245,252,0.74); }

.rule-list { border-top: 1px solid var(--line); }
.rule-item {
  border-bottom: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.3rem) 0;
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
}
.rule-list.plain .rule-item { grid-template-columns: minmax(0, 1fr); }

.rule-item .idx {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  padding-top: 0.4rem;
}
.rule-item h3 { margin-bottom: 0.5rem; }
.rule-item p { color: var(--ink-soft); font-size: 1rem; }
@media (max-width: 620px) {
  .rule-item { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
}

/* ---------- Product name + descriptor ---------- */

.prod-sub {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: -0.35rem 0 1.1rem;
}

/* ---------- Tag / status chips ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.tags li {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 0.35rem 0.6rem;
  color: var(--ink-soft);
}
.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--brand-gradient);
  color: var(--accent-ink);
  padding: 0.3rem 0.55rem;
  margin-bottom: 1rem;
}
.chip.quiet { background: transparent; color: var(--ink-faint); border: 1px solid var(--line); }

/* ---------- Checklists ---------- */

ul.ticks { list-style: none; padding: 0; margin: 1.2rem 0 0; }
ul.ticks li {
  padding: 0.6rem 0 0.6rem 1.6rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 0.98rem;
  color: var(--ink-soft);
}
ul.ticks li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
ul.ticks li strong { color: var(--ink); font-weight: 600; }

/* ---------- Table ---------- */

.table-scroll { overflow-x: auto; margin-top: 2rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 620px; }
th, td { text-align: left; padding: 1rem 1.1rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
  border-bottom: 1px solid var(--ink);
}
td strong { font-weight: 600; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 1.4rem; max-width: 40rem; }
.field { display: grid; gap: 0.5rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.7rem 0;
  border-radius: 0;
  width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-note { font-size: 0.87rem; color: var(--ink-faint); max-width: 40rem; }

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 5rem) 0 2.5rem;
  font-size: 0.93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer a { text-decoration: none; color: var(--ink-soft); }
.footer a:hover { color: var(--ink); }
.footer .colophon {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* ---------- Utilities ---------- */

.stack-sm > * + * { margin-top: 0.8rem; }
.mt-0 { margin-top: 0; }
.nowrap { white-space: nowrap; }
.accent { color: var(--accent); }
.skip {
  position: absolute; left: -9999px;
}
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; z-index: 100; }
