/* Nordo — design system */
:root {
  --ink: #111214;
  --ink-2: #3a3d44;
  --muted: #6b6f78;
  --line: #e6e4df;
  --line-2: #d8d5ce;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --sunk: #f3f1ec;
  --accent: #2f4bd8;
  --accent-ink: #ffffff;
  --accent-soft: #eef1fd;
  --ok: #1d7a4f;
  --ok-soft: #e8f5ee;
  --warn: #9a5b00;
  --warn-soft: #fdf3e2;
  --bad: #b3261e;
  --bad-soft: #fcebea;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(17, 18, 20, .04), 0 8px 24px rgba(17, 18, 20, .06);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; }
h1.display { font-size: clamp(44px, 7vw, 88px); }
h2.display { font-size: clamp(34px, 4.6vw, 56px); }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 620px; }
em.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; display: flex; align-items: center; gap: 9px; }
.logo-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 6px 6px auto auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a.link { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--ink); background: var(--sunk); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; }
  .nav.open { display: flex; }
  .nav .btn { margin-top: 6px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .15s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #26282d; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #2640c2; }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }
.btn-danger { background: transparent; border-color: #efc9c6; color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-xs { height: 30px; padding: 0 11px; font-size: 13px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Sections */
section.block { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head p { max-width: 460px; margin: 0; }

/* Hero */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .actions { margin-top: 32px; }
.hero-note { margin-top: 22px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hero-note span::before { content: "✓"; margin-right: 6px; color: var(--ok); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card.pad-lg { padding: clamp(22px, 3vw, 36px); }
.card.flat { box-shadow: none; }
.card.raised { box-shadow: var(--shadow); }
.card h3 { font-size: 18px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Tracker preview (hero) */
.preview { position: relative; }
.preview .card { box-shadow: 0 30px 60px -20px rgba(17, 18, 20, .18), 0 2px 6px rgba(17, 18, 20, .05); }
.preview .float { position: absolute; right: -14px; bottom: -22px; width: 230px; }
@media (max-width: 920px) { .preview .float { right: 8px; } }

/* Progress */
.progress { height: 8px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.progress.accent > i { background: var(--accent); }
.big-num { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-accent { background: var(--accent-soft); color: var(--accent); }
.b-dark { background: var(--ink); color: #fff; }

/* Portfolio */
.work-card { display: block; text-decoration: none; }
.work-card .shot { aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--sunk); position: relative; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.work-card:hover .shot { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(17, 18, 20, .25); }
.work-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.work-card .meta { padding: 14px 2px 0; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.work-card h3 { font-size: 18px; }
.placeholder-shot { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background: repeating-linear-gradient(135deg, var(--sunk) 0 12px, #efede7 12px 24px); color: var(--muted); font-size: 14px; }
.placeholder-shot b { display: block; color: var(--ink-2); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.mock { position: absolute; inset: 14px; background: var(--surface); border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.mock .bar { height: 22px; border-bottom: 1px solid var(--line); display: flex; gap: 5px; align-items: center; padding: 0 9px; }
.mock .bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }

/* Process */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 26px; border-top: 1px solid var(--line-2); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--serif); font-size: 28px; color: var(--muted); display: block; margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* CTA */
.cta { background: var(--ink); color: #fff; border-radius: 24px; padding: clamp(36px, 6vw, 72px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.cta .muted { color: #a8abb3; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }
.cta .btn-ghost { color: #fff; border-color: #44474f; }
.cta .btn-ghost:hover { background: #1f2125; border-color: #fff; }
.cta .btn-light { background: #fff; color: var(--ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; margin-top: 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Forms */
.field { display: block; }
.field + .field { margin-top: 18px; }
.label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.hint { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface);
  padding: 12px 14px; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(17, 18, 20, .06); }
.input.invalid, .textarea.invalid { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 13.5px; margin-top: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; transition: all .15s; }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--ink); }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; }
.file-list li .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Wizard */
.wizard-steps { display: flex; gap: 6px; margin-bottom: 28px; }
.wizard-steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); transition: background .3s; }
.wizard-steps i.done { background: var(--ink); }
.wizard-panel { animation: fadeUp .4s cubic-bezier(.2, .7, .2, 1); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 32px; gap: 12px; }

/* Alerts and states */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14.5px; background: var(--sunk); border: 1px solid var(--line); }
.alert-bad { background: var(--bad-soft); border-color: #f2cfcc; color: #7d1d17; }
.alert-ok { background: var(--ok-soft); border-color: #c8e6d5; color: #145a3a; }
.alert-warn { background: var(--warn-soft); border-color: #f2dfbd; color: #6c4000; }
.alert-accent { background: var(--accent-soft); border-color: #d6ddfa; color: #1f337f; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 17px; }
.skeleton { background: linear-gradient(90deg, var(--sunk) 0%, #ebe9e3 50%, var(--sunk) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; box-shadow: var(--shadow); animation: fadeUp .3s; }
.toast.bad { background: var(--bad); }

/* App shell (dashboard/admin) */
.app-main { padding-top: 36px; padding-bottom: 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; margin-left: 6px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 980px) { .layout-2 { grid-template-columns: 1fr; } .layout-2 > aside { order: -1; } }
@media (max-width: 620px) {
  .grid-4.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-4.stats .stat { padding: 14px; }
  .grid-4.stats .v { font-size: 18px; }
}
.sticky { position: sticky; top: 88px; }
@media (max-width: 980px) { .sticky { position: static; } }

.stat { padding: 18px 20px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }

.list-row { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s; }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { background: var(--sunk); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* Action needed */
.actions-card { border-color: #d6ddfa; background: linear-gradient(180deg, #f6f8ff, #fff); }
.action-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #e3e8fb; }
.action-item:first-of-type { border-top: 0; }
.action-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(47, 75, 216, .08); } }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline > li { position: relative; padding: 0 0 26px 40px; }
.timeline > li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline > li:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; font-size: 12px; }
.tl-completed .tl-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.tl-in_progress .tl-dot { border-color: var(--accent); }
.tl-in_progress .tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.tl-awaiting_feedback .tl-dot { border-color: var(--warn); background: var(--warn-soft); }
.tl-awaiting_feedback .tl-dot::after { content: "!"; color: var(--warn); font-weight: 700; }
.tl-completed::before { background: var(--ink) !important; }
.tl-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.tl-title { font-weight: 600; font-size: 16px; }
.tl-not_started .tl-title { color: var(--muted); }
.tl-body { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; }

/* Deliverables */
.deliv { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; background: var(--paper); }
.deliv.awaiting { border-color: #f2dfbd; background: #fffbf3; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumb { width: 108px; height: 76px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: block; background: var(--sunk); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; text-decoration: none; max-width: 100%; }
.file-chip:hover { border-color: var(--ink); }

/* Messages */
.thread { display: flex; flex-direction: column; gap: 14px; max-height: 560px; overflow-y: auto; padding: 4px 2px 8px; }
.msg { max-width: 86%; }
.msg .bubble { padding: 11px 14px; border-radius: 14px; background: var(--sunk); white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.msg.me { align-self: flex-end; }
.msg.me .bubble { background: var(--ink); color: #fff; }
.msg .who { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.msg.me .who { text-align: right; }
.event { align-self: center; font-size: 12.5px; color: var(--muted); text-align: center; max-width: 90%; }
.event::before { content: "• "; }
.composer { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(17, 18, 20, .45); display: grid; place-items: center; z-index: 90; padding: 16px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: 18px; max-width: 560px; width: 100%; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); animation: fadeUp .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes fade { from { opacity: 0; } }

/* Prose */
.prose { white-space: pre-wrap; color: var(--ink-2); }
.case-body h2 { font-size: 22px; margin-bottom: 10px; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-list li { padding-left: 26px; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 2px; background: var(--accent); }

/* Reveal animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

table.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }

.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; }
