@import url("./design-tokens.css");

html { scroll-behavior: smooth; }

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--sorts-ink);
  background: var(--sorts-cloud);
  font-family: var(--sorts-font-product);
  font-size: 16px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }

a { color: var(--sorts-blue); text-underline-offset: 3px; }

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sorts-ink);
}

.lockup img { width: 36px; height: 36px; flex: none; }

.lockup span {
  font-family: var(--sorts-font-brand);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.lockup-reverse { color: var(--sorts-white); }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

.nav-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sorts-font-brand);
}

.nav-links a {
  color: var(--sorts-neutral-700);
  text-decoration: none;
}

.nav-links a:hover { color: var(--sorts-blue); }

.kicker,
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sorts-blue);
  font-family: var(--sorts-font-brand);
}

.kicker { color: #95b6ff; }

.eyebrow.light { color: #dce8ff; }

h1, h2, h3 {
  font-family: var(--sorts-font-brand);
  letter-spacing: -0.03em;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 16px 0 20px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.lede,
.lead {
  margin: 0;
  color: var(--sorts-neutral-500);
  font-size: 1.05rem;
  max-width: 36rem;
}

.hero .lede { color: #b9c2d2; max-width: 38rem; font-size: 1.15rem; }

.hero {
  background: var(--sorts-ink);
  color: var(--sorts-white);
  overflow: hidden;
}

.hero-grid {
  width: min(1440px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  min-height: 640px;
}

.hero-copy {
  padding: 80px max(28px, calc((100vw - 1180px) / 2)) 72px;
}

.hero-art {
  position: relative;
  background: var(--sorts-blue);
  overflow: hidden;
  min-height: 280px;
}

.hero-art img {
  position: absolute;
  width: 150%;
  max-width: none;
  left: -18%;
  top: 6%;
}

.hero-art span {
  position: absolute;
  left: 32px;
  bottom: 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #dce8ff;
  font-family: var(--sorts-font-brand);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: var(--sorts-radius-md);
  background: var(--sorts-blue);
  color: var(--sorts-white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sorts-font-product);
  transition: opacity var(--sorts-motion-standard);
}

.btn:hover { opacity: 0.92; }

.btn-ghost {
  background: transparent;
  border: 1px solid #475467;
}

.btn-outline {
  background: transparent;
  color: var(--sorts-ink);
  border: 1px solid var(--sorts-neutral-300);
}

.section { padding: 88px 0; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 40px;
}

.section-head h2 { margin-top: 10px; }

.section-ink {
  background: var(--sorts-ink);
  color: var(--sorts-white);
}

.section-ink .lead { color: #b9c2d2; }
.section-ink .eyebrow { color: #95b6ff; }
.section-ink a { color: #dce8ff; }

.app-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.link-grid {
  grid-template-columns: repeat(3, 1fr);
}

.app-card,
.link-grid article {
  background: var(--sorts-white);
  border: 1px solid var(--sorts-neutral-200);
  border-radius: var(--sorts-radius-lg);
  padding: 24px;
  box-shadow: var(--sorts-shadow-marketing);
}

.link-grid article {
  background: #182230;
  border-color: #344054;
  box-shadow: none;
}

.link-grid h3 { margin-bottom: 8px; }
.link-grid p { color: #b9c2d2; margin: 0 0 16px; }

.link-card .sortslink-mark {
  margin: 0 0 12px;
}

.link-card--projects a { color: var(--sortslink-projects); }
.link-card--scan a { color: var(--sortslink-scan); }
.link-card--ledger a { color: var(--sortslink-ledger); }

.link-grid a {
  font-weight: 600;
  text-decoration: none;
}
.link-grid a:hover { text-decoration: underline; }

.section-ink .sortslink-mark--primary.sortslink-mark--reverse .sortslink-mark__sorts {
  color: var(--sorts-white);
}

.section-ink h2.sortslink-mark {
  margin: 10px 0 0;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: var(--sorts-neutral-100);
  display: grid;
  place-items: center;
  margin-bottom: 36px;
}

.app-icon span {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent);
}

.app-card p { color: var(--sorts-neutral-500); margin: 8px 0 0; }

.by {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 24px;
  color: var(--sorts-neutral-500);
  font-size: 12px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: var(--sorts-white);
  border: 1px solid var(--sorts-neutral-200);
  border-radius: var(--sorts-radius-lg);
  padding: 24px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--sorts-font-brand);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sorts-mist);
  margin-bottom: 16px;
}

.steps strong {
  display: block;
  font-family: var(--sorts-font-brand);
  margin-bottom: 6px;
}

.steps span { color: var(--sorts-neutral-500); }

.section-blue { padding: 0; }

.fold-field {
  position: relative;
  min-height: 480px;
  background: var(--sorts-blue);
  color: var(--sorts-white);
  overflow: hidden;
}

.fold-field .fold {
  position: absolute;
  width: min(720px, 80vw);
  left: -80px;
  top: -40px;
}

.fold-copy {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
  max-width: 36rem;
  margin-right: max(20px, calc((100vw - 1180px) / 2));
  margin-left: auto;
}

.fold-copy h2 { margin: 12px 0 20px; }

.fold-copy ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #dce8ff;
}

.fold-copy li + li { margin-top: 8px; }

.site-footer {
  background: var(--sorts-ink);
  color: var(--sorts-white);
  padding: 56px 0;
}

.site-footer p {
  margin: 20px 0 0;
  color: #98a2b3;
  max-width: 36rem;
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid,
  .section-head,
  .app-grid,
  .link-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .hero-copy { padding: 56px 24px; }
  .hero-art { min-height: 320px; }
  .fold-copy {
    margin-left: 20px;
    margin-right: 20px;
    max-width: none;
  }
  .fold-field .fold {
    width: 420px;
    left: -100px;
    top: -80px;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
