/* ==========================================================================
   Kenforms marketing page
   Tokens are the dark Kenforms Portal design system (navy + cyan).
   ========================================================================== */

:root {
  /* Brand */
  --kenforms-navy: #0F172A;
  --kenforms-cyan: #06B6D4;

  /* Primary ramp */
  --primary-300: #67E8F9;
  --primary-400: #22D3EE;
  --primary-500: #06B6D4;
  --primary-600: #0891B2;
  --primary-700: #0E7490;
  --primary-950: #083344;
  --primary-color: var(--primary-500);
  --primary-contrast-color: var(--kenforms-navy);
  --primary-hover-color: var(--primary-600);

  /* Semantic */
  --color-success: #059669;
  --color-danger: #E11D48;
  --color-contrast: #F1F5F9;
  --color-contrast-hover: #E2E8F0;
  --color-contrast-text: var(--kenforms-navy);
  --red-500: rgb(239, 68, 68);

  /* Surfaces (dark) */
  --surface-0: #0B111F;
  --surface-alt: #0E1526;
  --surface-100: #1A2438;
  --surface-200: #26324A;
  --surface-300: #33415B;
  --surface-400: #64748B;
  --surface-600: #C3CCDA;
  --content-background: #131D33;
  --content-border-color: #26324A;
  --content-hover-background: #1E2A42;
  --text-color: #E7ECF3;
  --text-muted-color: #94A3B8;
  --form-field-background: #0B111F;
  --form-field-border-color: #33415B;
  --form-field-placeholder-color: #6B7A93;

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 10.5px;
  --text-sm: 12.25px;
  --text-base: 14px;
  --text-lg: 15.75px;
  --text-xl: 17.5px;
  --text-2xl: 21px;
  --text-4xl: 28px;
  --text-5xl: 35px;

  /* Metrics */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-xl: 12px;
  --field-py: 7px;
  --field-px: 10.5px;
  --field-sm-py: 5.25px;
  --field-sm-px: 8.75px;
  --field-lg-py: 8.75px;
  --field-lg-px: 12.25px;
  --button-gap: 7px;
  --header-h: 60px;

  color-scheme: dark;
}

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

html {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-color);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body { margin: 0; min-height: 100vh; background: var(--surface-0); color: var(--text-color); }

a { color: var(--primary-400); text-decoration: none; }
a:hover { color: var(--primary-300); }

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

.container { max-width: 1160px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

section[id] { scroll-margin-top: var(--header-h); }

.overline {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-400);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 17, 31, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--content-border-color);
}
.site-header__inner {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-link { display: inline-flex; }
.logo { filter: brightness(0) invert(1); }
.logo--header { height: 26px; width: auto; }
.logo--footer { height: 20px; width: auto; opacity: 0.8; }

/* ---------- Buttons (design-system Button) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--button-gap);
  padding: var(--field-py) var(--field-px);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn .pi { font-size: .875em; }
.btn--small { padding: var(--field-sm-py) var(--field-sm-px); font-size: var(--text-sm); }
.btn--large { padding: var(--field-lg-py) var(--field-lg-px); font-size: var(--text-lg); }
.btn--fluid { display: flex; width: 100%; }

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

.btn--contrast-outlined {
  background: transparent;
  border-color: var(--color-contrast);
  color: var(--color-contrast);
}
.btn--contrast-outlined:hover { background: color-mix(in srgb, var(--primary-color) 4%, transparent); color: var(--color-contrast); }

.btn--text {
  background: transparent;
  border-color: transparent;
  color: var(--primary-color);
  align-self: flex-start;
}
.btn--text:hover { background: color-mix(in srgb, var(--primary-color) 4%, transparent); color: var(--primary-color); }

.btn:disabled, .btn[aria-busy="true"] { cursor: default; }
.btn:disabled { opacity: 0.6; }
.btn__spinner { display: none; }
.btn[aria-busy="true"] .btn__icon { display: none; }
.btn[aria-busy="true"] .btn__spinner { display: inline-block; animation: kf-spin 1s linear infinite; }
@keyframes kf-spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  padding-top: 40px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: center;
}
.hero__copy { display: flex; flex-direction: column; gap: 20px; }
.hero__title {
  font-size: clamp(35px, 7vw, 52px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero__lead {
  font-size: var(--text-xl);
  line-height: 1.5;
  color: var(--text-muted-color);
  max-width: 480px;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.hero__demo { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* Phone mock-up */
.phone {
  width: 272px;
  height: 552px;
  border-radius: 44px;
  background: var(--surface-100);
  padding: 10px;
  border: 1px solid var(--surface-300);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  flex: none;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  background: var(--content-background);
  display: flex;
  flex-direction: column;
}
.phone__status {
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 11px;
  font-weight: 600;
}
.phone__island { width: 76px; height: 20px; border-radius: 12px; background: var(--surface-0); }
.phone__signal { display: flex; gap: 4px; align-items: center; }
.phone__signal .pi { font-size: 10px; }
.phone__appbar {
  flex: none;
  padding: 6px 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--content-border-color);
}
.phone__appbar > .pi { font-size: 12px; color: var(--text-muted-color); }
.phone__appbar-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.phone__appbar-title { font-size: 13px; font-weight: 600; }
.phone__appbar-sub { font-size: var(--text-xs); color: var(--text-muted-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scene { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scene[hidden] { display: none; }

/* Scene: questionnaire */
.scene--q { padding: 14px 16px; gap: 14px; }
.q-progress { height: 4px; border-radius: 4px; background: var(--surface-200); overflow: hidden; }
.q-progress__fill { height: 100%; background: var(--primary-color); width: 0; }
.q-block { display: flex; flex-direction: column; gap: 8px; }
.q-label { font-size: 12px; font-weight: 600; }
.q-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-option {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--surface-300);
}
.q-radio { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--surface-300); display: grid; place-items: center; flex: none; }
.q-radio__dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.q-input {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  background: var(--surface-0);
  border: 1px solid var(--surface-300);
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
}
.q-caret { width: 1px; height: 13px; background: var(--primary-color); opacity: 0; }
.q-photos { display: flex; gap: 8px; }
.q-photo { width: 64px; height: 64px; border-radius: var(--radius-md); display: grid; place-items: center; }
.q-photo--add { border: 1px dashed var(--surface-300); color: var(--text-muted-color); }
.q-photo--add .pi { font-size: 16px; }
.q-photo--thumb { background: var(--surface-200); opacity: 0; }
.q-photo--thumb .pi { font-size: 18px; color: var(--surface-600); }
.q-submit {
  margin-top: auto;
  padding: 10px;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--primary-color);
  color: var(--kenforms-navy);
}

/* Scenes: camera based */
.scene--cam { background: #070B14; }
.cam { position: relative; flex: 1; display: grid; place-items: center; overflow: hidden; }
.cam__frame { position: absolute; border: 2px solid rgba(34, 211, 238, 0.6); border-radius: 10px; }
.cam__frame--tag { width: 190px; height: 116px; }
.cam__frame--bar { width: 176px; height: 84px; top: calc(50% + 8px); }
.cam__frame--doc { inset: 22px 30px; }
.cam__frame--rec { inset: 22px 58px; }
.scanline { position: absolute; height: 2px; background: #22D3EE; box-shadow: 0 0 12px 2px rgba(34, 211, 238, 0.6); }
.scanline--bar { width: 168px; top: calc(50% + 50px); }
.scanline--doc { left: 30px; right: 30px; top: 22px; }
.scanline--rec { left: 58px; right: 58px; top: 22px; }

.cam__panel {
  flex: none;
  padding: 12px 16px 16px;
  background: var(--content-background);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cam__panel--tall { min-height: 132px; }
.cam__status {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted-color);
}
.cam__fields { display: flex; flex-direction: column; gap: 8px; }
.cam-field { display: flex; flex-direction: column; gap: 4px; }
.cam-field__label { font-size: var(--text-xs); color: var(--text-muted-color); }
.cam-field__box {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  background: var(--surface-0);
  border: 1px solid var(--surface-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.cam-field__note { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted-color); }
.cam__kv { display: flex; flex-direction: column; gap: 8px; }
.cam-kv { display: flex; justify-content: space-between; font-size: 12px; }
.cam-kv__k { color: var(--text-muted-color); }
.cam-kv__v { font-weight: 600; }

/* Price tag */
.cam__shelf { position: absolute; left: 0; right: 0; top: 62%; height: 10px; background: var(--surface-200); }
.tag {
  position: relative;
  width: 156px;
  padding: 10px 12px;
  background: #F8F8FF;
  border-radius: 3px;
  color: var(--kenforms-navy);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: scale(0.92);
}
.tag__row { display: flex; justify-content: space-between; align-items: center; }
.tag__row--bottom { align-items: flex-end; }
.tag__name { font-size: 10px; font-weight: 600; }
.tag__promo { font-size: 10px; font-weight: 700; color: #fff; background: #E11D48; padding: 1px 5px; border-radius: 3px; }
.tag__prices { display: flex; align-items: baseline; gap: 8px; }
.tag__price { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: #BE123C; }
.tag__old { font-size: 13px; font-weight: 500; color: #64748B; text-decoration: line-through; }
.tag__meta { font-size: 8px; color: #475569; }
.tag__barcode { display: flex; gap: 1px; height: 14px; }
.tag__barcode i { display: block; background: var(--kenforms-navy); }

/* Barcode pack */
.pack {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-md);
  background: #E2E8F0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotate(3deg);
}
.pack__lines { display: flex; flex-direction: column; gap: 5px; }
.pack__line { border-radius: 2px; }
.pack__line--a { height: 9px; width: 70%; background: #0E7490; }
.pack__line--b { height: 5px; width: 45%; background: #94A3B8; }
.pack__label { background: #fff; padding: 6px 8px 4px; border-radius: 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pack__bars { display: flex; gap: 1px; height: 36px; width: 100%; }
.pack__bars i { display: block; }
.pack__digits { font-size: 7px; letter-spacing: .12em; color: var(--kenforms-navy); }

/* Document & receipt */
.ph { border-radius: 2px; background: #CBD5E1; }
.doc {
  position: relative;
  width: 168px;
  height: 226px;
  background: #F1F5F9;
  border-radius: 3px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transform: rotate(-2deg);
}
.doc__footer { margin-top: auto; display: flex; justify-content: space-between; }
.receipt {
  width: 118px;
  height: 236px;
  background: #F8F8FF;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: rotate(2deg);
}
.receipt__rule { border-top: 1px dashed #94A3B8; margin: 4px 0; }
.receipt__row { display: flex; justify-content: space-between; }
.receipt__barcode { margin-top: auto; display: flex; gap: 1px; height: 14px; justify-content: center; }
.receipt__barcode i { display: block; background: #334155; }

/* Chips */
.chips { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chips__row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: none;
  border: 1px solid var(--content-border-color);
  background: transparent;
  color: var(--text-muted-color);
  transition: background .15s, border-color .15s, color .15s;
}
.chip .pi { font-size: 12px; }
.chip:hover { color: var(--text-color); border-color: var(--surface-300); }
.chip.is-active {
  border-color: var(--primary-color);
  background: rgba(34, 211, 238, 0.1);
  color: var(--primary-300);
}

/* ---------- Sections ---------- */
.section { border-top: 1px solid var(--content-border-color); }
.section--alt { background: var(--surface-alt); }
.section__inner { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 28px; }
.section__head { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.section__title {
  font-size: clamp(28px, 5vw, 35px);
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

/* Cards */
.cards { display: grid; gap: 16px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.card {
  background: var(--content-background);
  border: 1px solid var(--content-border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-950);
  color: var(--primary-400);
  display: grid;
  place-items: center;
}
.card__icon .pi { font-size: 18px; }
.card__title { font-size: var(--text-xl); font-weight: 600; }
.card__text { font-size: var(--text-base); color: var(--text-muted-color); text-wrap: pretty; }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 28px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 2px solid var(--surface-300);
}
.step--active { border-top-color: var(--primary-color); }
.step__num { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted-color); }
.step--active .step__num { color: var(--primary-400); }
.step__title { font-size: var(--text-xl); font-weight: 600; }
.step__text { font-size: var(--text-base); color: var(--text-muted-color); text-wrap: pretty; }

/* ---------- Contact ---------- */
.contact {
  padding-top: 56px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px;
  align-items: start;
}
.contact__copy { display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
.contact__lead { font-size: var(--text-lg); color: var(--text-muted-color); text-wrap: pretty; }
.card--form { gap: 16px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form[hidden], .form-done[hidden] { display: none; }
.form-done { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: var(--text-sm); font-weight: 500; }
.field__optional { color: var(--text-muted-color); font-weight: 400; }
.field__error { font-size: var(--text-sm); color: #FB7185; }
.field__error[hidden] { display: none; }
/* Honeypot: off-screen for people, present in the DOM for bots. */
.field--trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Inputs (design-system InputText / Textarea / Select) */
.input {
  width: 100%;
  padding: var(--field-py) var(--field-px);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-color);
  background: var(--form-field-background);
  border: 1px solid var(--form-field-border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--form-field-placeholder-color); opacity: 1; }
.input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 1px var(--primary-color); }
.input:focus-visible { outline: none; }
.input.is-invalid { border-color: var(--red-500); }
.input.is-invalid:focus { box-shadow: none; }
.textarea { resize: vertical; min-height: 80px; }

.select { position: relative; }
.select__native {
  appearance: none;
  -webkit-appearance: none;
  padding-right: calc(var(--field-px) + 24px);
  cursor: pointer;
}
.select__native:has(option[value=""]:checked) { color: var(--form-field-placeholder-color); }
.select__native option { background: var(--content-background); color: var(--text-color); }
.select__chevron {
  position: absolute;
  right: var(--field-px);
  top: 50%;
  transform: translateY(-50%);
  font-size: .75rem;
  color: var(--text-muted-color);
  pointer-events: none;
}

/* Message (design-system Message) */
.message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
}
.message[hidden] { display: none; }
.message .pi { font-size: 1rem; flex: none; }
.message span { flex: 1; color: var(--text-color); }
.message--success {
  color: var(--color-success);
  background: color-mix(in srgb, var(--color-success) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-success) 32%, transparent);
}
.message--error {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-danger) 32%, transparent);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--content-border-color); }
.site-footer__inner {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-muted-color);
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip, .input { transition: none; }
}
