/* ==========================================================================
   Clafina — marketing site
   Colours are the ERP's own tokens ("Commerce Black"): zinc neutrals, a
   near-black primary, borders instead of shadows. Change a colour here and
   the whole site follows, as the product does.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --page: #fafafa;
  --card: #ffffff;
  --ink: #09090b;
  --ink-soft: #52525b;
  --ink-muted: #71717a;

  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --fill: #f4f4f5;

  --primary: #18181b;
  --primary-hover: #27272a;
  --on-primary: #fafafa;

  --good-ink: #145c2f;
  --good-fill: #e6f4ec;
  --warn-ink: #833d07;
  --warn-fill: #fdf0dd;
  --bad-ink: #a81919;
  --bad-fill: #fdeaea;
  --info: #1450d2;
  --live: #15803d;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --max: 1160px;
  --gutter: 24px;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--ink);
  color: var(--on-primary);
}

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

[hidden] {
  display: none !important;
}

/* --- Typography --------------------------------------------------------- */
h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 700;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--border-strong);
}

.eyebrow--plain::before {
  display: none;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* --- Layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(52px, 6.5vw, 80px);
}

.section--tight {
  padding-block: clamp(34px, 4.2vw, 52px);
}

.rule-top {
  border-top: 1px solid var(--border);
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--fill);
  border-color: var(--ink-muted);
}

.btn--sm {
  height: 40px;
  padding-inline: 16px;
  font-size: 0.875rem;
}

.btn--lg {
  height: 52px;
  padding-inline: 26px;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color 0.18s ease;
}

.link-arrow:hover {
  text-decoration-color: var(--ink);
}

.link-arrow svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* --- Skip / sr-only ----------------------------------------------------- */
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip:focus {
  top: 16px;
}

.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;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand__mark {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--fill);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 96px) 0;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 560px;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 10%, transparent 72%);
  opacity: 0.7;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 22px;
  max-width: 860px;
  margin-inline: auto;
}

.hero h1 {
  max-width: 15ch;
}

.hero .lede {
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.hero__note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero__note svg {
  width: 14px;
  height: 14px;
  color: var(--live);
}

/* --- Product frame (the dashboard illustration) ------------------------- */
.stage {
  position: relative;
  margin-top: clamp(40px, 6vw, 64px);
  padding-inline: var(--gutter);
  max-width: 1180px;
  margin-inline: auto;
}

.app {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  overflow: hidden;
  font-size: 13px;
}

.app__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.app__dots {
  display: flex;
  gap: 6px;
}

.app__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}

.app__url {
  margin-inline: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.app__url svg {
  width: 11px;
  height: 11px;
}

.app__body {
  display: grid;
  grid-template-columns: 204px 1fr;
  min-height: 460px;
}

.app__side {
  border-right: 1px solid var(--border);
  background: #fcfcfc;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app__side-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.app__side-brand svg {
  width: 18px;
  height: 18px;
}

.side-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-group__label {
  padding: 0 8px 6px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.side-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
}

.side-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.side-item.is-active {
  background: var(--primary);
  color: var(--on-primary);
}

.side-item.is-active svg {
  opacity: 1;
}

.side-item__count {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--fill);
  color: var(--ink-muted);
}

.side-item.is-active .side-item__count {
  background: rgba(255, 255, 255, 0.18);
  color: var(--on-primary);
}

.app__main {
  padding: 18px 20px 24px;
  background: var(--page);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.app__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.app__sub {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.app__head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding-inline: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

.chip--dark {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.kpi__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.kpi__value {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.kpi__delta {
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kpi__delta--up {
  color: var(--good-ink);
}

.app__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  min-width: 0;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px;
  min-width: 0;
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.panel__title {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.panel__meta {
  font-size: 10px;
  color: var(--ink-muted);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 122px;
  padding-top: 4px;
}

.bar {
  flex: 1;
  height: var(--h, 40%);
  background: var(--border);
  border-radius: 3px 3px 0 0;
  transition: background-color 0.2s ease;
}

.bar.is-peak {
  background: var(--primary);
}

.bar-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.row:first-child {
  border-top: 0;
  padding-top: 0;
}

.row__name {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row__meta {
  grid-column: 1;
  font-size: 10px;
  color: var(--ink-muted);
}

.row__amount {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pill {
  justify-self: end;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill--good {
  background: var(--good-fill);
  color: var(--good-ink);
}

.pill--warn {
  background: var(--warn-fill);
  color: var(--warn-ink);
}

.pill--neutral {
  background: var(--fill);
  color: var(--ink-soft);
}

/* --- Logo / surface strip ----------------------------------------------- */
.surfaces {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.surface {
  display: grid;
  gap: 6px;
  padding: 20px 18px;
  border-left: 1px solid var(--border);
  transition: background-color 0.18s ease;
}

.surface:first-child {
  border-left: 0;
}

.surface:hover {
  background: var(--page);
}

.surface svg {
  width: 20px;
  height: 20px;
  margin-bottom: 6px;
  color: var(--ink);
}

.surface__name {
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.surface__desc {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* --- Cards / grids ------------------------------------------------------ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 26px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.card--hover:hover {
  border-color: var(--border-strong);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

.card__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--page);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.card__icon svg {
  width: 18px;
  height: 18px;
}

/* Feature lists */
.feature-list {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.feature-list svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--ink);
}

/* --- Industry cards ----------------------------------------------------- */
.industries {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.industry {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px 16px;
  display: grid;
  gap: 4px;
  transition: border-color 0.18s ease, transform 0.18s var(--ease);
}

.industry:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.industry__name {
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.industry__desc {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* --- Split / pillar rows ------------------------------------------------ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.split--reverse .split__visual {
  order: -1;
}

.split__copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.split__copy p {
  color: var(--ink-soft);
  text-wrap: pretty;
}

.split__visual {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 22px;
  min-width: 0;
}

/* Mini receipt used in "built for the counter" */
.receipt {
  display: grid;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.receipt__head {
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-strong);
}

.receipt__line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.receipt__line--total {
  border-top: 1px dashed var(--border-strong);
  padding-top: 10px;
  font-weight: 700;
  font-size: 15px;
}

.receipt__line span:last-child {
  font-variant-numeric: tabular-nums;
}

.receipt__note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 11.5px;
  color: var(--good-ink);
  background: var(--good-fill);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 4px;
}

.receipt__note svg {
  width: 14px;
  height: 14px;
}

/* Mini stack used in "one record" */
.stack {
  display: grid;
  gap: 8px;
}

.stack__row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--card);
  font-size: 12.5px;
}

.stack__row svg {
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
}

.stack__row strong {
  font-weight: 650;
}

.stack__tag {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}

.stack__row--hero {
  border-color: var(--ink);
  background: var(--primary);
  color: var(--on-primary);
}

.stack__row--hero svg,
.stack__row--hero .stack__tag {
  color: rgba(250, 250, 250, 0.7);
}

/* --- Facts band --------------------------------------------------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fact {
  padding: 32px 24px;
  border-left: 1px solid var(--border);
  display: grid;
  gap: 6px;
}

.fact:first-child {
  border-left: 0;
}

.fact__value {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fact__label {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* --- CTA band ----------------------------------------------------------- */
.cta {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 6vw, 64px);
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.cta h2 {
  max-width: 20ch;
}

.cta p {
  max-width: 52ch;
  color: rgba(250, 250, 250, 0.7);
}

.cta .btn--primary {
  background: var(--on-primary);
  color: var(--primary);
}

.cta .btn--primary:hover {
  background: #ffffff;
}

.cta .btn--ghost {
  border-color: rgba(250, 250, 250, 0.3);
  color: var(--on-primary);
}

.cta .btn--ghost:hover {
  background: rgba(250, 250, 250, 0.1);
  border-color: rgba(250, 250, 250, 0.5);
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
  margin-top: clamp(56px, 8vw, 96px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px 32px;
}

.footer-brand {
  display: grid;
  gap: 14px;
  align-content: start;
  max-width: 34ch;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.footer-col ul {
  display: grid;
  gap: 10px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.footer-bottom__links {
  display: flex;
  gap: 18px;
}

.footer-bottom__links a:hover {
  color: var(--ink);
}

/* --- Sub-page hero ------------------------------------------------------ */
.page-hero {
  padding-block: clamp(48px, 7vw, 80px) clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--border);
}

.page-hero__inner {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
}

/* --- Pricing ------------------------------------------------------------ */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 28px;
  position: relative;
}

.plan--featured {
  border-color: var(--ink);
  border-width: 1px;
}

.plan__tag {
  position: absolute;
  top: -11px;
  left: 28px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.plan__name {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.plan__desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-top: 4px;
  min-height: 2.6em;
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-block: 4px;
}

.plan__amount {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plan__period {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.plan__note {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: -6px;
}

.plan__cta {
  margin-top: auto;
}

.plan .feature-list {
  margin-top: 0;
}

.plan__divider {
  height: 1px;
  background: var(--border);
}

/* --- FAQ ---------------------------------------------------------------- */
.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}

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

.faq summary:hover {
  color: var(--ink-soft);
}

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--ink-muted);
  flex: none;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  padding-bottom: 22px;
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

/* --- Contact ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-muted);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.1);
}

.field__error {
  font-size: 0.75rem;
  color: var(--bad-ink);
  display: none;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--bad-ink);
}

.field.is-invalid .field__error {
  display: block;
}

.field__hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.form__success {
  border: 1px solid var(--good-ink);
  background: var(--good-fill);
  color: var(--good-ink);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.9375rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.form__success svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.contact-aside {
  display: grid;
  gap: 16px;
  align-content: start;
}

.aside-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 22px;
  display: grid;
  gap: 10px;
}

.aside-card h3 {
  font-size: 0.9375rem;
}

.aside-card p,
.aside-card li {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.aside-card ul {
  display: grid;
  gap: 8px;
}

.aside-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}

.aside-card a:hover {
  text-decoration-color: var(--ink);
}

/* --- Legal / prose ------------------------------------------------------ */
.prose {
  max-width: 68ch;
  display: grid;
  gap: 20px;
}

.prose h2 {
  font-size: 1.375rem;
  margin-top: 20px;
}

.prose h3 {
  font-size: 1rem;
  margin-top: 8px;
}

.prose p,
.prose li {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  text-wrap: pretty;
}

.prose ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  list-style: disc;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice {
  border: 1px solid var(--warn-ink);
  background: var(--warn-fill);
  color: var(--warn-ink);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.875rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.notice svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

/* --- Reveal on scroll --------------------------------------------------- */
/* Only hide what JavaScript will reveal: with no script, the page still reads. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
  .surfaces {
    grid-template-columns: repeat(3, 1fr);
  }

  .surface:nth-child(4) {
    border-left: 0;
  }

  .surface:nth-child(n + 4) {
    border-top: 1px solid var(--border);
  }

  .industries {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .app__body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .app__side {
    display: none;
  }

  .app__grid {
    grid-template-columns: 1fr;
  }

  .split,
  .split--reverse {
    grid-template-columns: 1fr;
  }

  .split--reverse .split__visual {
    order: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .plans {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .fact:nth-child(3) {
    border-left: 0;
  }

  .fact:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    height: 60px;
  }

  .nav {
    position: fixed;
    inset: 60px 0 auto;
    z-index: 99;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--gutter) 22px;
    background: var(--page);
    border-bottom: 1px solid var(--border);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px;
    font-size: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-actions .btn--ghost {
    display: none;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .industries,
  .surfaces {
    grid-template-columns: 1fr;
  }

  .surface {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .surface:first-child {
    border-top: 0;
  }

  .kpis {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .cta {
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 520px) {
  .facts {
    grid-template-columns: 1fr;
  }

  .fact {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 22px 20px;
  }

  .fact:first-child {
    border-top: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px;
  }

  .plan {
    padding: 22px;
  }

  .plan__tag {
    left: 22px;
  }
}

/* --- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta {
    display: none;
  }
}

/* --- Anchored sections and the in-page jump nav ------------------------- */
[id] {
  scroll-margin-top: 96px;
}

.jump-wrap {
  position: sticky;
  top: 68px;
  z-index: 60;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.jump {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 14px;
  scrollbar-width: none;
}

.jump::-webkit-scrollbar {
  display: none;
}

.jump a {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.jump a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.plan__desc + .plan__desc,
.plan .feature-list li {
  text-wrap: pretty;
}

.form__success a {
  color: inherit;
}

@media (max-width: 760px) {
  .jump-wrap {
    top: 60px;
  }

  [id] {
    scroll-margin-top: 128px;
  }
}

/* On a narrow screen the mock's two chips do not both fit beside the title. */
@media (max-width: 560px) {
  .app__head-actions .chip:not(.chip--dark) {
    display: none;
  }
}
