:root {
  --paper: #f4f1ea;
  --ink: #17231d;
  --coral: #ff5b35;
  --muted: #637169;
  --card: #fffefa;
  --line: #d8ddd7;
  --success: #35a66f;
  --shadow: 0 1.5rem 4rem rgb(23 35 29 / 10%);
  --radius: 1.5rem;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgb(23 35 29 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 35 29 / 3%) 1px, transparent 1px);
  background-size: 2.25rem 2.25rem;
  mask-image: linear-gradient(to bottom, #000, transparent 44rem);
  pointer-events: none;
}

button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.02; letter-spacing: -.045em; }
h1 { margin-bottom: 1.4rem; font-size: clamp(3.25rem, 12vw, 7.3rem); font-weight: 760; }
h2 { margin-bottom: 1rem; font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 720; }
h3 { margin-bottom: .65rem; font-size: clamp(1.35rem, 5vw, 2rem); }

:focus-visible {
  outline: .2rem solid var(--coral);
  outline-offset: .22rem;
}

.shell {
  width: min(calc(100% - 2rem), 76rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--card);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(216 221 215 / 70%);
  background: rgb(244 241 234 / 82%);
  backdrop-filter: blur(1rem);
}

.nav {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 850;
  letter-spacing: -.015em;
}

.brand::after {
  width: .48rem;
  height: .48rem;
  margin: .45rem 0 0 .15rem;
  border-radius: 50%;
  background: var(--coral);
  content: "";
}

.menu-toggle {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span { font-size: 1.15rem; }

.nav-menu {
  position: absolute;
  top: calc(100% + .5rem);
  left: 1rem;
  right: 1rem;
  display: grid;
  gap: .2rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgb(255 254 250 / 98%);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-.5rem);
  transition: opacity .2s, transform .2s, visibility .2s;
}

.nav-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.nav-menu > a { min-height: 2.75rem; display: flex; align-items: center; padding: .65rem .85rem; border-radius: 999px; }

.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 760;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}

.button--primary, .nav-menu .button { background: var(--coral); color: #fff; box-shadow: 0 .7rem 1.5rem rgb(255 91 53 / 22%); }
.button--secondary { border-color: var(--line); background: var(--card); color: var(--ink); }
.button--small { padding-inline: 1rem; }

.eyebrow, .section-number {
  margin-bottom: 1rem;
  color: var(--coral);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: calc(100svh - 4.75rem);
  display: grid;
  align-items: center;
  gap: 2.5rem;
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
}

.hero::after {
  position: absolute;
  top: 2rem;
  right: -1rem;
  z-index: -1;
  width: 20rem;
  aspect-ratio: 1;
  border: 1px solid rgb(255 91 53 / 28%);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgb(255 91 53 / 4%), 0 0 0 8rem rgb(255 91 53 / 3%);
  content: "";
}

.hero-copy, .hero-preview, .demo-workspace > *, .steps > *, .use-cards > * { min-width: 0; }
.hero-lead { max-width: 42rem; margin-bottom: 1.5rem; color: var(--muted); font-size: clamp(1.08rem, 2.8vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1.2rem; }

.upload {
  position: relative;
  display: grid;
  gap: .45rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 1.15rem;
  background: rgb(255 254 250 / 58%);
  transition: border-color .2s, background .2s, transform .2s;
}

.upload-label {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .6rem .8rem;
  border-radius: .8rem;
  background: var(--card);
  font-weight: 760;
  text-align: center;
  cursor: pointer;
}

.upload input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload:focus-within { outline: .2rem solid var(--coral); outline-offset: .2rem; }
.upload-hint, .upload-status { margin: 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.upload-status { color: var(--ink); }
.upload-progress { width: 100%; height: .45rem; display: none; accent-color: var(--coral); }
.upload-zone.is-dragging { border-color: var(--coral); background: rgb(255 91 53 / 8%); transform: translateY(-2px); }
.upload-zone.is-error { border-color: #bf3f28; background: #fff3ef; }
.upload-zone.is-error .upload-status { color: #a62e1c; }
.upload-zone.is-processing .upload-progress, .upload-zone.is-complete .upload-progress { display: block; }
.upload-zone.is-processing { border-color: var(--coral); }
.upload-zone.is-complete { border-color: var(--success); background: rgb(53 166 111 / 8%); }
.upload-zone.is-complete .upload-status { color: #24734e; }
.privacy-note { margin: .75rem 0 0; color: var(--muted); font-size: .8rem; }

.hero-preview {
  position: relative;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transform: rotate(1.3deg);
}

.hero-preview::before {
  position: absolute;
  top: -.7rem;
  left: 2rem;
  width: 4rem;
  height: 1.3rem;
  background: rgb(255 91 53 / 30%);
  content: "";
  transform: rotate(-5deg);
}

.preview-label { color: var(--coral); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-preview ul { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.hero-preview li { padding: .85rem 0; border-top: 1px solid var(--line); }

.how, .uses { padding-block: clamp(5rem, 12vw, 9rem); }
.section-heading { max-width: 54rem; margin-bottom: clamp(2.2rem, 6vw, 4rem); }
.section-heading > p:last-child { max-width: 43rem; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }

.steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { min-height: 17rem; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 .8rem 2rem rgb(23 35 29 / 5%); }
.steps li:nth-child(2) { background: var(--ink); color: var(--card); }
.steps li p { margin-bottom: 0; color: var(--muted); }
.steps li:nth-child(2) p { color: #b8c1bc; }
.step-number { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; margin: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-size: .8rem; font-weight: 800; }

.demo {
  position: relative;
  padding: clamp(2rem, 6vw, 5rem);
  overflow: hidden;
  border-radius: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink);
  color: var(--card);
  box-shadow: 0 2rem 5rem rgb(23 35 29 / 18%);
}

.demo::before {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 254 250 / 12%) .7px, transparent .7px);
  background-size: 8px 8px;
  content: "";
  pointer-events: none;
}

.demo > * { position: relative; }
.demo .section-heading > p:last-child, .demo-disclaimer { color: #b8c1bc; }
.demo-workspace { display: grid; gap: 1rem; background: var(--ink); }
.demo-document, .demo-chat { position: relative; min-height: 32rem; padding: clamp(1.25rem, 4vw, 2rem); overflow: hidden; border: 1px solid rgb(255 254 250 / 14%); border-radius: 1.35rem; background: #202e27; transition: border-color .25s var(--ease), transform .25s var(--ease); }
.demo-document header { display: grid; gap: .2rem; padding-bottom: 1.1rem; border-bottom: 1px solid rgb(255 254 250 / 14%); }
.demo-document header p, .demo-document header span { margin: 0; color: #aeb9b3; font-size: .78rem; }
.demo-document header h3 { margin: 0; overflow-wrap: anywhere; }
.demo-summary { padding-top: 1.4rem; }
.demo-summary h4 { color: #ffb19f; }
.demo-summary > p { color: #d6ddd9; }
.demo-summary ul { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.demo-summary li { padding: .85rem; border: 1px solid rgb(255 254 250 / 10%); border-radius: .85rem; }
.demo-alert { margin-top: 1rem; padding: 1rem; border-left: .22rem solid var(--coral); border-radius: .5rem; background: rgb(255 91 53 / 10%); }
.demo-alert p { margin: .35rem 0 0; color: #d6ddd9; }
.redaction-note { margin: 1rem 0 0; color: #aeb9b3; font-size: .78rem; }
.demo-chat { display: flex; flex-direction: column; }
.message { max-width: 92%; margin-top: .8rem; padding: .9rem 1rem; border-radius: 1rem; }
.message p { margin: 0; }
.message--question { align-self: flex-end; background: var(--coral); }
.message--answer { align-self: flex-start; background: var(--card); color: var(--ink); }
.message--answer a { display: inline-flex; min-height: 2.75rem; align-items: center; margin-top: .65rem; color: #a3321e; font-weight: 750; }
.suggested-questions { margin-top: auto; padding-top: 1.5rem; }
.suggested-questions p { margin-bottom: .6rem; color: #aeb9b3; font-size: .8rem; }
.suggested-questions button { min-height: 2.75rem; margin: 0 .4rem .5rem 0; padding: .6rem .8rem; border: 1px solid rgb(255 254 250 / 18%); border-radius: 999px; background: transparent; color: var(--card); cursor: pointer; }
.suggested-questions button.is-selected, .suggested-questions button[aria-pressed="true"] { border-color: var(--coral); background: rgb(255 91 53 / 16%); }
.ask-form { display: grid; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgb(255 254 250 / 14%); }
.ask-form > .ask-label { margin: 0; font-size: .82rem; font-weight: 750; }
.ask-form > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.ask-form input { min-width: 0; min-height: 2.75rem; flex: 1 1 12rem; padding: .65rem .8rem; border: 1px solid rgb(255 254 250 / 20%); border-radius: .8rem; background: rgb(255 254 250 / 9%); color: var(--card); }
.ask-form input::placeholder { color: #aeb9b3; }
.ask-form input:disabled, .ask-form button:disabled { cursor: not-allowed; opacity: .58; }
.ask-form > p { margin: 0; color: #aeb9b3; font-size: .78rem; }
.demo-workspace.is-loading .demo-document::after,
.demo-workspace.is-loading .demo-chat::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgb(255 255 255 / 8%) 42%, rgb(255 255 255 / 14%) 50%, rgb(255 255 255 / 8%) 58%, transparent 75%);
  background-size: 220% 100%;
  content: "";
  animation: result-shimmer 1.15s linear infinite;
  pointer-events: none;
}
@keyframes result-shimmer { to { background-position: -220% 0; } }
.demo-disclaimer { margin: 1.2rem 0 0; font-size: .78rem; }

.use-cards { display: grid; gap: 1rem; }
.use-cards article { min-height: 15rem; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgb(255 254 250 / 72%); transition: border-color .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease); }
.use-cards article > span { margin-bottom: auto; color: var(--coral); font-size: .75rem; font-weight: 850; }
.use-cards article p { margin-bottom: 0; color: var(--muted); }
.privacy-panel { display: grid; grid-template-columns: auto 1fr; gap: 1rem; margin-top: 1rem; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.privacy-panel > div:first-child { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%; background: rgb(53 166 111 / 14%); color: var(--success); font-weight: 900; }
.privacy-panel h3 { font-size: 1.3rem; }
.privacy-panel p { margin-bottom: 0; color: var(--muted); }

.final-cta {
  position: relative;
  margin-bottom: 1rem;
  padding: clamp(3rem, 10vw, 7rem) 1.25rem;
  overflow: hidden;
  border-radius: clamp(1.5rem, 4vw, 3rem);
  background: var(--coral);
  color: #fff;
  text-align: center;
}

.final-cta::before, .final-cta::after { position: absolute; border: 1px solid rgb(255 255 255 / 30%); border-radius: 50%; content: ""; }
.final-cta::before { width: 18rem; aspect-ratio: 1; top: -11rem; left: -7rem; }
.final-cta::after { width: 11rem; aspect-ratio: 1; right: -5rem; bottom: -6rem; }
.final-cta > * { position: relative; }
.final-cta .eyebrow { color: #fff; }
.final-cta h2 { max-width: 58rem; margin-inline: auto; }
.final-cta > p:not(.eyebrow) { max-width: 38rem; margin-inline: auto; }
.upload--final { max-width: 36rem; margin: 1.6rem auto 0; border-color: rgb(255 255 255 / 48%); background: rgb(255 255 255 / 12%); }
.upload--final .button { background: var(--ink); color: var(--card); box-shadow: none; }
.upload--final .upload-hint, .upload--final .upload-status { color: #fff; }
.upload--final.is-complete .upload-status { color: #fff; }

.footer { min-height: 7rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.footer p { width: 100%; margin: 0; color: var(--muted); font-size: .8rem; }

.reveal { opacity: 0; filter: blur(.45rem); transform: translateY(1.4rem); transition: opacity .65s var(--ease), filter .65s var(--ease), transform .65s var(--ease); }
.reveal.is-visible { opacity: 1; filter: none; transform: none; }

@media (min-width: 48rem) {
  .shell { width: min(calc(100% - 4rem), 76rem); }
  .menu-toggle { display: none; }
  .nav-menu { position: static; display: flex; align-items: center; gap: .3rem; padding: 0; border: 0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .nav-menu > a:not(.button) { padding-inline: .75rem; }
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .65fr); gap: clamp(2rem, 6vw, 5rem); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-workspace { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .privacy-panel { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 1.75rem; }
  .footer p { width: auto; }
}

@media (min-width: 64rem) {
  .use-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-2px); box-shadow: 0 1rem 2rem rgb(23 35 29 / 15%); }
  .nav-menu > a:not(.button):hover { background: rgb(23 35 29 / 6%); }
  .suggested-questions button:hover { border-color: var(--coral); }
  .use-cards article:hover { border-color: var(--coral); box-shadow: 0 1rem 2.5rem rgb(23 35 29 / 9%); transform: translateY(-.25rem); }
  .demo-document:hover, .demo-chat:hover { border-color: rgb(255 254 250 / 26%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
  .demo-workspace.is-loading .demo-document::after, .demo-workspace.is-loading .demo-chat::after { display: none; }
}
