/* Document Ops Portal — Owl Studio brand tokens.
   Reference: design-hub HeroSplit + slaney-dental-wexford visual language.
   Adapted for B2B SaaS niche: warm paper + dark ink + deep indigo accent.
   No purple gradients. No glassmorphism. No Inter-only.
*/

:root {
  /* Surface */
  --paper: #f8f5f0;
  --paper-alt: #efe9de;
  --ink: #1c1f24;
  --ink-soft: #2d3239;
  --muted: #6b665d;
  --line: #d8cfc1;
  --line-soft: #ede5d6;

  /* Accent — deep indigo, B2B-trust signal (per design-hub tech-saas preset) */
  --brand: #1d3557;
  --brand-hover: #14253f;
  --brand-soft: #e8eef6;
  --accent: #c08a3f;        /* warm amber pinch */

  /* Type scale */
  --display: 'Fraunces', 'Bodoni Moda', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  --fs-display: clamp(2.25rem, 4.5vw + 1rem, 4rem);
  --fs-h2: clamp(1.5rem, 2vw + 0.75rem, 2.25rem);
  --fs-h3: clamp(1.125rem, 1vw + 0.75rem, 1.375rem);
  --fs-body: clamp(1.0625rem, 0.4vw + 0.875rem, 1.125rem);
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;
  --fs-eyebrow: 0.75rem;

  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-base: 1.55;
  --lh-loose: 1.7;

  /* Spacing */
  --s-xs: 0.5rem;
  --s-s: 0.75rem;
  --s-m: 1rem;
  --s-l: 1.5rem;
  --s-xl: 2.5rem;
  --s-2xl: clamp(3rem, 6vw, 5rem);
  --s-3xl: clamp(4rem, 9vw, 7rem);

  /* Layout */
  --max-w: 1180px;
  --max-w-prose: 720px;
  --radius-card: 14px;
  --radius-button: 6px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 240ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============ NAV ============ */
.nav {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(248, 245, 240, 0.92);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-mark { color: var(--brand); }
.nav-cta {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: var(--fs-small);
}
.nav-cta a { color: var(--ink-soft); }
.nav-cta a:hover { color: var(--brand); }
.link-button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  color: var(--ink-soft);
  padding: 0;
}
.link-button:hover { color: var(--brand); }

/* ============ HERO (landing) ============ */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 24px clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 8%, transparent) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--s-m);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
}
.headline {
  font-family: var(--display);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--s-l);
}
.headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.lede {
  font-size: 1.125rem;
  line-height: var(--lh-base);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: var(--s-l);
}
.cta-row {
  display: flex;
  gap: var(--s-m);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--s-xl);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: var(--fs-small);
  padding: 12px 22px;
  border-radius: var(--radius-button);
  text-decoration: none;
  transition: background var(--duration) var(--ease),
              color var(--duration) var(--ease),
              transform 120ms var(--ease),
              box-shadow var(--duration) var(--ease);
  cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 53, 87, 0.25);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  background: var(--paper-alt);
  border-color: var(--ink-soft);
  color: var(--ink);
}

/* Trust strip — proof signals */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-l);
  padding-top: var(--s-l);
  border-top: 1px solid var(--line);
  font-size: var(--fs-label);
  color: var(--muted);
}
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-item strong { color: var(--ink); font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Hero illustration column */
.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--s-xl);
  box-shadow: 0 6px 30px rgba(28, 31, 36, 0.05),
              0 1px 4px rgba(28, 31, 36, 0.04);
  position: relative;
}
.hero-card-label {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.queue-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  margin-bottom: 10px;
  background: var(--paper);
  align-items: center;
}
.queue-row:last-child { margin-bottom: 0; }
.queue-row.review { border-color: var(--accent); background: #fef8ee; }
.queue-row.clean { border-color: #b6d4ad; background: #f3f9ee; }
.queue-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.queue-icon.ok { background: #d6e8c8; color: #3d6e1c; }
.queue-icon.flag { background: #f6e0a4; color: #8a5a06; }
.queue-icon.gate { background: var(--brand-soft); color: var(--brand); }
.queue-meta { display: flex; flex-direction: column; gap: 2px; }
.queue-title { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.queue-sub { font-size: 0.8125rem; color: var(--muted); }
.queue-status { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; }
.queue-status.ok { color: #3d6e1c; }
.queue-status.review { color: #8a5a06; }

/* ============ EXPLAIN BAND ============ */
.explain {
  background: var(--paper-alt);
  border-block: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 4rem) 24px;
}
.explain-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.explain h2 {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
  margin-bottom: var(--s-m);
  color: var(--ink);
}
.explain p { color: var(--ink-soft); margin-bottom: var(--s-m); max-width: 56ch; }

.compare {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--s-xl);
}
.compare-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.compare-row:last-child { border-bottom: none; }
.compare-row strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.9375rem; }
.compare-row p { font-size: 0.875rem; color: var(--muted); margin: 0; }
.compare-mark {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  width: 28px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
  padding-top: 1px;
}
.compare-mark.x { color: #b04a3a; }
.compare-mark.check { color: #3d6e1c; }

/* ============ AUTH (login / magic-link-sent) ============ */
.auth-shell {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: var(--s-2xl) 24px;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: clamp(2rem, 4vw, 3rem);
  max-width: 460px;
  width: 100%;
  box-shadow: 0 6px 30px rgba(28, 31, 36, 0.06);
}
.auth-card h1 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-s);
  color: var(--ink);
}
.auth-card p { color: var(--ink-soft); margin-bottom: var(--s-l); }
.auth-form { display: flex; flex-direction: column; gap: var(--s-m); }
.auth-form label {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-form input {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  border-radius: 6px;
  transition: border-color var(--duration) var(--ease);
}
.auth-form input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.auth-card .muted { font-size: 0.875rem; color: var(--muted); margin-top: var(--s-m); }

/* ============ DASHBOARD ============ */
.dashboard {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-2xl) 24px;
}
.dashboard h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: var(--s-xs);
}
.dashboard .meta {
  color: var(--muted);
  font-size: var(--fs-small);
  margin-bottom: var(--s-xl);
}
.dashboard .meta strong { color: var(--ink); font-weight: 600; }
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-m);
  margin-bottom: var(--s-xl);
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--s-l);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-num {
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.kpi-num.review { color: var(--accent); }
.kpi-lbl { color: var(--muted); font-size: var(--fs-small); }
.notice {
  margin-top: var(--s-l);
  padding: var(--s-l);
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--ink-soft);
}
.notice strong { color: var(--ink); }

/* ============ ADMIN ============ */
.admin {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s-2xl) 24px;
}
.admin h1 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: var(--s-l);
}
.admin h2 {
  font-family: var(--display);
  font-size: var(--fs-h3);
  font-weight: 500;
  margin: var(--s-xl) 0 var(--s-m);
}
.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.data th, .data td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-small);
}
.data tr:last-child td { border-bottom: none; }
.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper);
}
.data a { font-weight: 600; }
code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--paper-alt);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.8125rem;
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: var(--s-xl) 24px;
  background: var(--paper-alt);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-m);
  font-size: var(--fs-small);
  color: var(--muted);
}
.footer a { color: var(--ink-soft); }
.footer-meta { display: flex; gap: 18px; flex-wrap: wrap; }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { order: -1; max-width: 460px; }
  .explain-inner { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .nav-cta a:not(:last-child) { display: none; }
  .trust-strip { flex-direction: column; gap: var(--s-s); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
