:root {
  --background: hsl(36, 38%, 97%);
  --background-alt: hsl(33, 33%, 93%);
  --foreground: hsl(150, 11%, 20%);
  --muted: hsl(33, 25%, 90%);
  --muted-foreground: hsl(150, 8%, 38%);
  --primary: hsl(16, 57%, 51%);
  --primary-hover: hsl(16, 57%, 45%);
  --primary-foreground: hsl(36, 38%, 97%);
  --gold: hsl(46, 65%, 52%);
  --hairline: hsla(150, 11%, 20%, 0.08);
  --shadow-soft: 0 1px 2px hsla(150, 11%, 20%, 0.08);
  --shadow-elev:
    0 1px 0 hsla(150, 11%, 20%, 0.04),
    0 1px 2px hsla(150, 11%, 20%, 0.06),
    0 10px 30px -12px hsla(150, 11%, 20%, 0.18);

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: transparent; }

/* Layout shell */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 1024px) {
  .container { padding: 0 40px; }
}

/* Ambient backgrounds */
.ambient, .grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.ambient {
  background:
    radial-gradient(80% 60% at 50% -10%, color-mix(in oklab, var(--primary) 8%, transparent) 0%, transparent 60%),
    radial-gradient(50% 50% at 100% 100%, color-mix(in oklab, var(--gold) 6%, transparent) 0%, transparent 60%);
}
.grid-bg {
  opacity: 0.04;
  background-image:
    linear-gradient(var(--foreground) 1px, transparent 1px),
    linear-gradient(90deg, var(--foreground) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, black, transparent 80%);
  mask-image: radial-gradient(70% 60% at 50% 40%, black, transparent 80%);
}

/* Header */
.site-header { flex-shrink: 0; z-index: 20; }
.header-row {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo {
  display: block;
  height: 42px;
  width: auto;
}
@media (min-width: 640px) {
  .brand-logo { height: 48px; }
}
@media (min-width: 960px) {
  .brand-logo { height: 52px; }
}
.brand-mark {
  height: 24px; width: 24px; border-radius: 5px;
  background: var(--foreground); color: var(--background);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
}
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }

.status {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
}
@media (min-width: 640px) { .status { display: inline-flex; } }
.ping { position: relative; display: inline-flex; height: 6px; width: 6px; }
.ping-dot {
  position: absolute; inset: 0;
  border-radius: 999px; background: var(--primary); opacity: 0.6;
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.ping-core {
  position: relative; display: inline-flex;
  height: 6px; width: 6px; border-radius: 999px; background: var(--primary);
}
@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
}
.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 48px;
  }
  .hero-copy { grid-column: span 6; }
  .hero-mocks { grid-column: span 6; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--background) 70%, transparent);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--muted-foreground);
}
.dot-gold { height: 6px; width: 6px; border-radius: 999px; background: var(--gold); }

.title {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-size: 38px;
  line-height: 1.05;
}
@media (min-width: 640px) { .title { font-size: 44px; } }
@media (min-width: 1024px) { .title { font-size: 52px; line-height: 1.02; } }
.accent { color: var(--primary); }

.lede {
  margin-top: 20px;
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted-foreground);
}

.actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 6px;
  font-size: 13.5px;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary {
  background: var(--foreground); color: var(--background);
  padding: 8px 8px 8px 20px;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: color-mix(in oklab, var(--foreground) 85%, transparent); }
.btn-arrow {
  height: 28px; width: 28px; border-radius: 999px;
  background: color-mix(in oklab, var(--background) 15%, transparent);
  display: grid; place-items: center;
  transition: transform .2s;
}
.btn-primary:hover .btn-arrow { transform: translateX(2px); }

.btn-ghost {
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
}
.btn-ghost:hover {
  color: var(--foreground);
  border-color: color-mix(in oklab, var(--foreground) 30%, transparent);
}

.chips {
  list-style: none; padding: 0;
  margin: 24px 0 0;
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 11px; color: var(--muted-foreground);
}
.chips li { display: inline-flex; align-items: center; gap: 8px; }
.bullet {
  height: 4px; width: 4px; border-radius: 999px;
  background: color-mix(in oklab, var(--foreground) 40%, transparent);
}

/* Mockups */
.hero-mocks {
  position: relative;
  height: 380px;
}
@media (min-width: 1024px) { .hero-mocks { height: 460px; } }

.mock {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--background);
  box-shadow: var(--shadow-elev);
  position: absolute;
}
.mock-approvals { top: 0; right: 0; width: 78%; transform: rotate(1.2deg); z-index: 1; }
.mock-revenue   { top: 28%; left: 0; width: 58%; transform: rotate(-2deg); z-index: 2; }
.mock-workflow  { bottom: 0; right: 4%; width: 72%; transform: rotate(-0.5deg); z-index: 3; }

.mock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--background-alt) 60%, transparent);
}
.mock-head-left { display: flex; align-items: center; gap: 6px; }
.dot { height: 8px; width: 8px; border-radius: 999px; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.mock-title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-foreground);
}
.mock-tag {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--hairline); background: var(--background);
  padding: 2px 6px; border-radius: 3px;
  font-family: var(--font-mono); font-size: 8.5px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-foreground);
}
.tag-dot { height: 4px; width: 4px; border-radius: 999px; background: var(--primary); }
.mock-body { padding: 12px; }

/* Approvals table */
.tbl-head, .tbl-row {
  display: grid;
  grid-template-columns: 6fr 4fr 2fr;
  align-items: center;
}
.tbl-head {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-foreground);
}
.tbl-row {
  padding: 6px 0;
  border-top: 1px solid var(--hairline);
  font-size: 10.5px;
}
.tbl-row:first-of-type { border-top: 0; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; }
.row-id { font-family: var(--font-mono); font-size: 8.5px; color: var(--muted-foreground); }
.state {
  display: inline-block; padding: 2px 4px; border-radius: 3px;
  border: 1px solid var(--hairline);
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.14em;
}
.state-pending { color: var(--muted-foreground); }
.state-review {
  border-color: color-mix(in oklab, var(--gold) 40%, transparent);
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
  background: color-mix(in oklab, var(--gold) 8%, transparent);
}
.state-approved {
  border-color: color-mix(in oklab, var(--primary) 30%, transparent);
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 5%, transparent);
}

/* Revenue */
.muted-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted-foreground); }
.muted-label.small { font-size: 9px; letter-spacing: 0.14em; }
.rev-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.rev-amount { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rev-delta { font-family: var(--font-mono); font-size: 10px; color: var(--primary); }
.rev-chart { width: 100%; height: 70px; margin-top: 8px; color: var(--primary); display: block; }
.rev-foot {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.rev-foot .num { font-size: 12px; }

/* Workflow kanban */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kcol {
  border: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--background-alt) 40%, transparent);
  border-radius: 3px;
  padding: 6px;
}
.kcol-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 10px; font-weight: 500; }
.kcount { font-family: var(--font-mono); font-size: 9px; color: var(--muted-foreground); font-weight: 400; }
.kcard {
  border: 1px solid var(--hairline);
  background: var(--background);
  border-radius: 3px;
  padding: 6px;
  margin-bottom: 6px;
}
.kcard:last-child { margin-bottom: 0; }
.ktext { font-size: 10.5px; line-height: 1.3; }
.krow { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.kchip {
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 1px 4px; border-radius: 2px;
  border: 1px solid color-mix(in oklab, var(--primary) 30%, transparent);
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 5%, transparent);
}
.kavatar { height: 12px; width: 12px; border-radius: 999px; background: color-mix(in oklab, var(--foreground) 60%, transparent); }

/* Footer */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--hairline);
  background: var(--background);
  z-index: 20;
}
.footer-links {
  padding: 10px 24px;
  display: flex; justify-content: center; align-items: center; gap: 28px;
}
@media (max-width: 640px) { .footer-links { gap: 20px; } }
.footer-links a {
  font-size: 11.5px; color: var(--muted-foreground);
  transition: color .15s;
}
.footer-links a:hover { color: var(--foreground); }

.footer-bottom {
  padding: 10px 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}
.copy {
  font-size: 11px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.brand-tm {
  font-size: 0.58em;
  letter-spacing: 0.02em;
  vertical-align: super;
  line-height: 0;
  margin-left: 1px;
  font-weight: 600;
}
.socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-shrink: 0;
}
.socials a {
  color: var(--muted-foreground);
  display: inline-flex;
  transition: color .15s;
}
.socials a:hover { color: var(--foreground); }
.socials svg { display: block; }
.socials__icon {
  display: inline-flex;
  color: color-mix(in oklab, var(--muted-foreground) 72%, transparent);
}

/* Drawer */
.ea-drawer-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: color-mix(in oklab, var(--foreground) 30%, transparent);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.ea-drawer-scrim.open { opacity: 1; pointer-events: auto; }

.ea-drawer {
  position: fixed; top: 0; right: 0; z-index: 50;
  height: 100%;
  width: 100%;
  background: var(--background);
  border-left: 1px solid var(--hairline);
  box-shadow: -16px 0 48px hsla(150, 11%, 20%, 0.12);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
@media (min-width: 640px) { .ea-drawer { width: 480px; } }
.ea-drawer.open { transform: translateX(0); }

.ea-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 16px;
}
.ea-drawer-eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.ea-drawer-eyebrow-text {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.24em;
  color: var(--muted-foreground); font-weight: 500;
}
.ea-drawer-close {
  height: 28px; width: 28px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--muted-foreground);
  transition: color .15s;
}
.ea-drawer-close:hover { color: var(--foreground); }

.ea-drawer-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ea-drawer-progress { padding: 0 28px; }
.progress-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.progress-bars .bar {
  height: 3px; border-radius: 999px;
  background: color-mix(in oklab, var(--foreground) 10%, transparent);
  transition: background-color .2s;
}
.progress-bars .bar.active { background: var(--primary); }
.step-meta { margin: 12px 0 0; font-size: 12.5px; color: var(--muted-foreground); }

.ea-drawer-scroll { flex: 1; overflow-y: auto; padding: 20px 28px 16px; }
.ea-drawer-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
  margin: 0; color: var(--foreground);
}
.ea-drawer-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--muted-foreground); }

.step { margin-top: 24px; }
.role-list { display: flex; flex-direction: column; gap: 10px; }
.role-item {
  width: 100%; text-align: left;
  padding: 16px; border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--background);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  transition: border-color .15s, background-color .15s;
}
.role-item:hover { border-color: color-mix(in oklab, var(--foreground) 30%, transparent); }
.role-item.selected {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 4%, transparent);
}
.role-item .role-title { font-size: 14px; font-weight: 500; color: var(--foreground); }
.role-item .role-desc { margin-top: 4px; font-size: 12.5px; color: var(--muted-foreground); line-height: 1.5; }
.role-radio {
  margin-top: 4px; height: 16px; width: 16px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--foreground) 20%, transparent);
  display: grid; place-items: center; flex-shrink: 0;
}
.role-item.selected .role-radio { border-color: var(--primary); }
.role-radio-inner { height: 8px; width: 8px; border-radius: 999px; background: var(--primary); display: none; }
.role-item.selected .role-radio-inner { display: block; }

.fields { display: flex; flex-direction: column; gap: 20px; }
.field-block { display: block; }
.field-label {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted-foreground); margin-bottom: 8px; font-weight: 500;
}
.req { color: var(--primary); margin-left: 2px; }
.field-block input, .field-block select {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field-block input:focus, .field-block select:focus {
  border-color: color-mix(in oklab, var(--primary) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 15%, transparent);
}
.field-block.has-error input, .field-block.has-error select { border-color: var(--primary); }

.field-error {
  margin: 6px 0 0; font-size: 12px; color: var(--primary);
  min-height: 0;
}
.field-error:empty { display: none; }

.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent input { margin-top: 2px; height: 16px; width: 16px; accent-color: var(--primary); }
.consent span { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.55; }

.ea-drawer-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--hairline);
  background: var(--background);
  display: flex; align-items: center; justify-content: space-between;
}
.ea-drawer-back {
  font-size: 13.5px; color: var(--muted-foreground);
  transition: color .15s;
}
.ea-drawer-back:hover { color: var(--foreground); }
.ea-drawer-next { padding: 10px 8px 10px 20px; }
.ea-drawer-next.submit { background: var(--primary); color: var(--primary-foreground); }
.ea-drawer-next.submit:hover { background: var(--primary-hover); }

.done { text-align: center; padding: 32px 16px; }
.done-check {
  margin: 0 auto;
  height: 40px; width: 40px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--primary) 40%, transparent);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 18px;
}
.done-title { margin: 20px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.done-sub { margin: 12px auto 0; font-size: 13.5px; color: var(--muted-foreground); max-width: 28rem; line-height: 1.65; }

/* Responsive tweaks */
@media (max-width: 1023px) {
  .hero-mocks { margin-top: 8px; }
}
@media (max-width: 640px) {
  .title { font-size: 32px; }
  .hero-mocks { height: 340px; }
  .footer-bottom {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .copy { white-space: normal; }
}
