/* dxCompany public site. Values come from the dxCompany Design System tokens. */

/* Both files are variable fonts, latin subset: one file covers every weight used here. */
@font-face { font-family: "Geist"; src: url("fonts/Geist-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --primary-600: #e11d2e;
  --primary-500: #ef3340;
  --primary-400: #fb7171;
  --neutral-950: #0f1014;
  --neutral-900: #14171d;
  --neutral-800: #1a1d23;
  --neutral-700: #2a2f37;
  --neutral-600: #3f4651;
  --neutral-500: #525965;
  --neutral-400: #6b7280;
  --neutral-300: #9aa1ac;
  --neutral-250: #d7dce3;
  --neutral-200: #e5e7eb;
  --neutral-150: #eceff3;
  --neutral-100: #f2f4f7;
  --neutral-50: #f8fafc;
  --white: #ffffff;
  --success: #16a34a;
  --success-tint: #e7f6ec;
  --info: #2563eb;
  --info-tint: #e4ecfd;

  --accent: var(--primary-500);
  --accent-hover: var(--primary-600);
  --bg-canvas: var(--neutral-50);
  --bg-surface: var(--white);
  --bg-muted: var(--neutral-100);
  --bg-inverse: var(--neutral-950);
  --fg-strong: var(--neutral-950);
  --fg-default: var(--neutral-900);
  --fg-muted: var(--neutral-400);
  --border-default: var(--neutral-200);
  --border-strong: var(--neutral-250);
  --border-subtle: var(--neutral-150);

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

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 3px rgba(239, 51, 64, 0.18);

  --gutter: 24px;
  --section-y: 96px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--fg-default);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1 { font-size: 40px; line-height: 52px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-strong); }
h2 { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-strong); }
h3 { font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg-strong); }
.h4 { font-size: 18px; line-height: 26px; font-weight: 500; color: var(--fg-strong); }
.lead { font-size: 16px; line-height: 24px; }
.meta { font-size: 12px; line-height: 18px; color: var(--fg-muted); }
.eyebrow { font-size: 12px; line-height: 18px; font-weight: 500; color: var(--primary-600); }

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

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 10px 16px; border-radius: 10px; background: var(--bg-inverse); color: var(--white); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* Layout */

.container { max-width: 1200px; margin: 0 auto; }
.section { padding: var(--section-y) var(--gutter); }
.section--canvas { background: var(--bg-canvas); }
.section--surface { background: var(--bg-surface); }
.section--inverse { background: var(--bg-inverse); }
.section--ruled { border-bottom: 1px solid var(--border-default); }
.section--ruled-top { border-top: 1px solid var(--border-default); }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 64px; }
.stack { display: flex; flex-direction: column; gap: 40px; }
.stack--tight { gap: 32px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }

.section__intro { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.section__intro .pill { align-self: flex-start; }
.section__intro--narrow { flex: 1 1 360px; min-width: 0; }
.section__intro--narrow .lead { max-width: 460px; }
.section__title { max-width: 640px; }
.section--inverse h2 { color: var(--white); }
.section--inverse .lead { color: var(--neutral-250); }

/* Header */

.site-header { background: var(--bg-surface); padding: 0 var(--gutter); }
.site-header__row { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 10px 0; }

.lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.lockup__dx { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--fg-strong); }
.lockup__rule { width: 2px; height: 22px; border-radius: 1px; background: var(--primary-600); }
.lockup__company { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--primary-600); }

/* Small pieces */

.dot { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 999px; }
.dot--accent { background: var(--accent); }
.dot--today { background: var(--success); }
.dot--next { background: var(--info); }
.dot--follow { background: var(--neutral-400); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; color: var(--neutral-600); font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; }
.pill--outline { padding: 4px 12px; gap: 8px; background: var(--bg-surface); border: 1px solid var(--border-default); }
.pill--success { background: var(--success-tint); }
.pill--info { background: var(--info-tint); }
.pill--neutral { background: var(--bg-muted); }

.card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 16px; box-shadow: var(--shadow-lg); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border: 0; border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 120ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 120ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* Hero */

.hero { background: var(--bg-surface); border-bottom: 1px solid var(--border-default); padding: 80px var(--gutter) var(--section-y); }
.hero__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero__copy h1, .hero__copy .lead { max-width: 560px; }

.watch { display: flex; flex-direction: column; gap: 8px; max-width: 520px; padding-top: 8px; }
.watch label { font-size: 12px; line-height: 18px; font-weight: 500; }
.watch__row { display: flex; flex-wrap: wrap; gap: 8px; }
.watch input[type="email"] { flex: 1 1 240px; min-width: 0; height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-surface); box-shadow: var(--shadow-sm); font-family: inherit; font-size: 14px; color: var(--fg-strong); }
.watch input[type="email"]::placeholder { color: var(--neutral-300); }
.watch input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
.watch__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.watch__note { font-size: 12px; line-height: 18px; color: var(--fg-muted); }
.watch__status { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--fg-strong); }
.watch__status:empty { display: none; }
.watch__status[data-kind="error"] { color: #b91c1c; }

.watch--inverse { flex: 1 1 400px; min-width: 0; padding-top: 0; }
.watch--inverse label { color: var(--neutral-200); }
.watch--inverse input[type="email"] { border-color: var(--neutral-600); background: var(--neutral-800); box-shadow: none; color: var(--white); }
.watch--inverse .watch__status { color: var(--white); }
.watch--inverse .watch__status[data-kind="error"] { color: var(--primary-400); }

.jump { flex: 1 1 380px; min-width: 0; max-width: 520px; display: flex; flex-direction: column; }
.jump__label { padding-bottom: 12px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--fg-muted); }
.jump a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border-default); color: var(--fg-strong); text-decoration: none; transition: background-color 120ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.jump a:last-child { border-bottom: 1px solid var(--border-default); }
.jump a:hover { background: var(--bg-canvas); }
.jump a > span { display: flex; flex-direction: column; gap: 2px; }
.jump strong { font-size: 18px; line-height: 26px; font-weight: 500; }
.jump a > span > span { color: var(--neutral-500); }
.jump svg { flex: none; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* One foundation */

.foundation { flex: 1.3 1 520px; min-width: 0; display: flex; flex-direction: column; padding: 32px; border: 1px solid var(--border-default); border-radius: 18px; background-color: var(--bg-muted); background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px); background-size: 16px 16px; }
.foundation__label { padding-bottom: 12px; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--neutral-500); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 5px 12px; border: 1px dashed var(--neutral-300); border-radius: 999px; background: var(--bg-surface); color: var(--neutral-500); font-size: 12px; line-height: 18px; font-weight: 500; }

.foundation__join { display: flex; flex-direction: column; align-items: center; }
.foundation__join::before, .foundation__join::after { content: ""; width: 2px; height: 20px; background: var(--border-strong); }
.foundation__join span { padding: 3px 12px; border-radius: 999px; background: var(--bg-inverse); color: var(--white); font-size: 12px; line-height: 18px; font-weight: 500; }

.foundation__card { overflow: hidden; }
.foundation__head { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border-subtle); }

.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; padding: 8px 24px; }
.caps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-subtle); font-weight: 500; color: var(--fg-strong); }
.caps li:nth-last-child(-n+2) { border-bottom: 0; }

.context { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px 24px; background: var(--bg-canvas); border-top: 1px solid var(--border-subtle); }
.context__tile { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-surface); }
.context__name { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg-strong); }
.context .meta { color: var(--neutral-500); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 12px 24px; border-top: 1px solid var(--border-subtle); font-size: 12px; line-height: 18px; color: var(--neutral-500); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* The shift */

.panel { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 32px; }
.panel--wide { flex: 1.4 1 420px; }
.panel--muted { border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-muted); color: var(--neutral-600); }
.panel--muted .h4 { color: var(--neutral-600); }

.list { display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 24px; }
.list li { position: relative; padding-left: 32px; }
.list--dash li { padding-left: 20px; }
.list--dash li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 2px; background: var(--neutral-300); }
.list--check li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef3340' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Four pieces */

.feature { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.feature--wide { flex: 1.5 1 440px; }
.feature p { font-size: 16px; line-height: 24px; max-width: 560px; }
.feature__icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg-muted); }
.feature__icon svg { fill: none; stroke: var(--neutral-700); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Steps */

.steps { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.steps li { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 2px solid var(--fg-strong); }
.steps p { font-size: 16px; line-height: 24px; }
.steps__num { font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 500; color: var(--fg-muted); }

/* What comes next */

.table-wrap { overflow-x: auto; border: 1px solid var(--border-default); border-radius: 16px; box-shadow: var(--shadow-lg); }
table { width: 100%; min-width: 680px; border-collapse: collapse; background: var(--bg-canvas); }
thead tr { background: var(--bg-surface); }
thead th { padding: 12px 16px; text-align: left; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--fg-muted); }
tbody tr { border-top: 1px solid var(--border-subtle); }
tbody tr:first-child { border-top-color: var(--border-default); }
tbody th { text-align: left; font-weight: 500; color: var(--fg-strong); }
tbody th, tbody td { padding: 14px 16px; }
th:first-child { width: 26%; padding-left: 24px; }
th:last-child, td:last-child { width: 150px; padding-right: 24px; }

/* Footer */

.site-footer { background: var(--bg-inverse); border-top: 1px solid var(--neutral-700); padding: 32px var(--gutter); font-size: 12px; line-height: 18px; color: var(--neutral-300); }

/* Phones */

@media (max-width: 640px) {
  :root { --gutter: 16px; --section-y: 64px; }
  h1 { font-size: 32px; line-height: 42px; }
  .hero { padding-top: 48px; }
  .foundation, .panel, .feature { padding: 24px; }
  .foundation { padding: 16px; }
  .caps { grid-template-columns: minmax(0, 1fr); }
  .caps li:nth-last-child(2) { border-bottom: 1px solid var(--border-subtle); }
  .watch .btn { flex: 1 1 100%; }
}
