/* Mound Creek Digital — site styles. Dark theme only (see color-scheme in base.html). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0d1012;            /* keep in sync with BG in scripts/build_assets.py */
  --bg-alt: #121619;
  --bg-paper: #171b1e;
  --surface: #161a1d;
  --surface-2: #1c2125;
  --line: #262c31;
  --line-strong: #353d44;
  --text: #eceae6;
  --muted: #a0a7ad;
  --faint: #737b82;
  --accent: #e09a52;
  --accent-strong: #eba96a;
  --accent-ink: #1a1108;
  --accent-soft: rgba(224, 154, 82, 0.12);
  --ok: #6fcf97;
  --danger: #ef7d6d;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
.icon { display: inline-block; flex: none; vertical-align: middle; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

::selection { background: var(--accent); color: var(--accent-ink); }

ul, ol { margin: 0; padding: 0; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 780px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--muted); line-height: 1.6; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none;
}
.text-link .icon { transition: transform 0.2s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }

/* ---------- Buttons ---------- */

.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h);
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 0.98rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { --btn-h: 38px; padding: 0 15px; font-size: 0.9rem; }
.btn-lg { --btn-h: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }

.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }

.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }

.btn[disabled], fieldset[disabled] .btn { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font: 700 1.12rem/1 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; }
.brand-name span { color: var(--accent); }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: transparent; color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn-bars { display: grid; gap: 4px; width: 18px; }
.menu-btn-bars i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.menu-btn[aria-expanded="true"] .menu-btn-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Desktop: the popover nav is always shown inline. */
.nav,
.nav[popover] {
  display: flex; align-items: center; gap: 28px;
  position: static; inset: auto;
  margin: 0; padding: 0; border: 0;
  width: auto; height: auto;
  background: transparent; color: inherit; overflow: visible;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 4px; border-radius: 2px; background: var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }

  .nav[popover] {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    width: auto; max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.7);
  }
  .nav[popover]:popover-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-links a { padding: 12px 8px; font-size: 1.08rem; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--accent); }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .btn { --btn-h: 48px; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--paper {
  background: var(--bg-paper);
  border-block: 1px solid var(--line);
  position: relative; overflow: hidden;
}

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-foot { margin-top: 32px; color: var(--muted); }

.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)); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start;
}
.split--center { align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.45em; }
.card p { color: var(--muted); }

.card-link {
  display: flex; flex-direction: column;
  color: inherit; text-decoration: none;
  transition: border-color 0.2s, transform 0.25s var(--ease), background-color 0.2s;
}
.card-link:hover { color: inherit; border-color: rgba(224, 154, 82, 0.45); background: var(--surface-2); transform: translateY(-2px); }
.card-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 18px;
  color: var(--accent); font-weight: 600; font-size: 0.95rem;
}
.card-link:hover .card-more .icon { transform: translateX(3px); }
.card-more .icon { transition: transform 0.2s var(--ease); }

.icon-chip {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(224, 154, 82, 0.22);
}
.icon-chip--lg { width: 58px; height: 58px; border-radius: 15px; }
.icon-chip--ok { background: rgba(111, 207, 151, 0.12); color: var(--ok); border-color: rgba(111, 207, 151, 0.3); }

.checklist { list-style: none; display: grid; gap: 14px; margin: 24px 0; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--accent); margin-top: 3px; }
.checklist span { color: var(--muted); }
.checklist strong { color: var(--text); }
.checklist--tight { gap: 10px; margin: 14px 0; font-size: 0.98rem; }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip-list li {
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); font-size: 0.85rem;
}

.badge {
  display: inline-block; vertical-align: middle;
  padding: 3px 10px; border-radius: 999px;
  font: 600 0.74rem/1.5 var(--font-body); letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06); color: var(--muted);
  border: 1px solid var(--line-strong);
}
.badge--soon { background: var(--accent-soft); color: var(--accent); border-color: rgba(224, 154, 82, 0.35); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 120px) clamp(64px, 9vw, 120px);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/contours.svg") center / cover no-repeat;
  opacity: 0.9;
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 720px; height: 720px; right: -160px; top: -200px;
  background: radial-gradient(closest-side, rgba(224, 154, 82, 0.14), transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero-copy h1 { margin-bottom: 0.4em; }
.hero-copy .lead { max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-actions--center { justify-content: center; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 36px; color: var(--muted); font-size: 0.95rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .icon { color: var(--accent); }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: min(100%, 440px); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5)); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: min(70%, 300px); }
}

.page-hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 48px);
  isolation: isolate; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/contours.svg") 70% 40% / cover no-repeat;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.page-hero h1 { max-width: 920px; }
.page-hero .lead { max-width: 720px; }
.page-hero--center { text-align: center; padding-bottom: clamp(64px, 9vw, 112px); }
.page-hero--center h1, .page-hero--center .lead { margin-inline: auto; }
.page-hero--center .icon-chip { margin-inline: auto; }

.error-code {
  font: 800 clamp(4.5rem, 14vw, 8rem)/1 var(--font-display);
  letter-spacing: -0.05em; margin-bottom: 0.2em;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
}

/* ---------- Manifesto / principles ---------- */

.manifesto { max-width: 900px; }
.manifesto-quote { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; }
.manifesto-quote span { color: var(--accent); }
.manifesto-lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }

.principles {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--line-strong);
}
.principles li { padding: 28px 28px 0 0; }
.principles li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.principles p { color: var(--muted); }
.principle-num { display: block; font: 700 0.9rem/1 var(--font-display); color: var(--accent); margin-bottom: 14px; letter-spacing: 0.06em; }
.manifesto-foot { margin-top: 48px; color: var(--faint); font-size: 0.95rem; }

@media (max-width: 780px) {
  .principles { grid-template-columns: 1fr; }
  .principles li, .principles li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Steps ---------- */

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.step {
  position: relative;
  padding: 26px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.step p { color: var(--muted); font-size: 0.98rem; }
.step-num {
  display: block; margin-bottom: 18px;
  font: 800 2.2rem/1 var(--font-display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px var(--accent);
}
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Tech flow diagram ---------- */

.flow {
  margin: 0;
  display: grid; justify-items: stretch; gap: 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
}
.flow-node {
  display: grid; gap: 2px;
  padding: 18px 20px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.flow-node strong { font-family: var(--font-display); font-size: 1.05rem; }
.flow-node span { color: var(--muted); font-size: 0.92rem; }
.flow-node--accent { border-color: var(--accent); background: linear-gradient(180deg, rgba(224, 154, 82, 0.12), rgba(224, 154, 82, 0.03)); }
.flow-node--accent span { color: var(--accent); }
.flow-hosted { padding: 34px 14px 14px; border: 1px dashed rgba(224, 154, 82, 0.5); border-radius: var(--radius); position: relative; }
.flow-tag {
  position: absolute; top: 10px; left: 14px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
}
.flow-arrow { justify-self: center; width: 2px; height: 34px; background: var(--line-strong); position: relative; }
.flow-arrow::after {
  content: ""; position: absolute; left: 50%; bottom: -1px;
  width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg);
  border-right: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong);
}

/* ---------- Founder ---------- */

.about-teaser { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-hero { display: grid; grid-template-columns: 1fr 320px; gap: clamp(32px, 6vw, 72px); align-items: end; }
@media (max-width: 880px) {
  .about-teaser, .about-hero { grid-template-columns: 1fr; }
  .founder-card { max-width: 360px; }
}

.founder-card {
  padding: 32px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.monogram {
  display: grid; place-items: center;
  width: 84px; height: 84px; margin-bottom: 22px;
  border-radius: 50%;
  font: 700 1.9rem/1 var(--font-display); letter-spacing: -0.02em;
  color: var(--accent-ink); background: var(--accent);
}
.founder-name { font: 700 1.35rem/1.2 var(--font-display); margin-bottom: 4px; }
.founder-role { color: var(--muted); margin-bottom: 14px; }
.founder-place { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 0.92rem; }
.founder-place .icon { color: var(--accent); }

/* ---------- Plans ---------- */

.plan-mini { position: relative; }
.plan-mini--featured { border-color: rgba(224, 154, 82, 0.5); background: linear-gradient(180deg, rgba(224, 154, 82, 0.07), var(--surface) 60%); }
.plan-tag { color: var(--accent) !important; font-weight: 600; margin-bottom: 0.8em; }
.plan-note { font-size: 0.93rem; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }

.plans { align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  padding: clamp(26px, 3.5vw, 38px);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.plan--featured { border-color: var(--accent); background: linear-gradient(180deg, rgba(224, 154, 82, 0.08), var(--surface) 50%); }
.plan h2 { font-size: 1.9rem; margin-bottom: 0.2em; }
.plan-audience { color: var(--muted); }
.plan-sub { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 24px 0 0; }
.plan-changes { color: var(--muted); font-size: 0.97rem; padding: 16px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.plan-changes strong { color: var(--text); }
.plan-price { color: var(--faint); font-size: 0.93rem; margin-top: auto; padding-top: 20px; }
.plan .btn { margin-top: 16px; align-self: flex-start; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font: 700 1.05rem/1.2 var(--font-display); background: var(--surface-2); }
.compare tbody th { font-weight: 500; color: var(--text); }
.compare td { width: 26%; }
.cell-text { color: var(--muted); font-size: 0.95rem; }
.cell-yes { color: var(--accent); }
.cell-no { color: var(--faint); }
.which { margin-top: 28px; }

.faq { display: grid; gap: 10px; margin-top: 24px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--font-display); color: var(--accent); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 20px; color: var(--muted); }

/* ---------- Portfolio ---------- */

.empty-note { max-width: 720px; padding: clamp(24px, 4vw, 40px); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-note p:not(.lead) { color: var(--muted); }

.project-card img { border-radius: var(--radius-sm); margin-bottom: 18px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.project-client { color: var(--accent) !important; font-weight: 600; font-size: 0.95rem; }
.shots { display: grid; gap: 20px; margin-bottom: 48px; }
.shots img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.project-body { display: grid; grid-template-columns: 1fr 320px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.project-meta h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 0; }
.project-meta .chip-list { margin-bottom: 24px; }
.project-meta .chip-list:last-child { margin-bottom: 0; }
@media (max-width: 880px) { .project-body { grid-template-columns: 1fr; } }

.wireframe {
  margin: 0; display: grid; gap: 12px;
  padding: 24px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--surface);
}
.wireframe span {
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 0.85rem; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px;
}
.wf-shot span { min-height: 160px; background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, 0.02) 12px 24px); }
.wf-row, .wf-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wf-block span { min-height: 80px; }
.wf-chips span { border-radius: 999px; padding: 8px; }
.wf-link span { color: var(--accent); border-color: rgba(224, 154, 82, 0.4); }
.wireframe figcaption { color: var(--faint); font-size: 0.88rem; text-align: center; margin-top: 4px; }

/* ---------- Portal band / CTA ---------- */

.portal-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
}
.portal-band > div { max-width: 680px; }
.portal-band p:not(.eyebrow) { color: var(--muted); }
@media (max-width: 780px) { .portal-band { flex-direction: column; align-items: flex-start; } }

.cta { padding-block: clamp(56px, 8vw, 104px); }
.cta-card {
  position: relative; overflow: hidden; isolation: isolate;
  text-align: center;
  padding: clamp(40px, 7vw, 80px) clamp(22px, 5vw, 64px);
  border: 1px solid rgba(224, 154, 82, 0.35);
  border-radius: calc(var(--radius) + 10px);
  background: radial-gradient(120% 100% at 50% 0%, rgba(224, 154, 82, 0.16), transparent 60%), var(--surface);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("../img/contours.svg") center / cover no-repeat; opacity: 0.5;
}
.cta-card h2 { max-width: 760px; margin-inline: auto; }
.cta-card > p { max-width: 640px; margin-inline: auto; color: var(--muted); font-size: 1.12rem; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 32px 0 24px; }
.cta-note { color: var(--faint) !important; font-size: 0.92rem !important; }

/* ---------- Prose / about ---------- */

.prose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.prose-layout--single { grid-template-columns: minmax(0, 760px); }
@media (max-width: 880px) { .prose-layout { grid-template-columns: 1fr; } }

.prose { max-width: 720px; }
.prose p, .prose li { color: var(--muted); }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-top: 1.8em; }
.prose > h2:first-child, .prose > .notice + h2 { margin-top: 0; }
.prose .notice + h2 { margin-top: 1.4em; }
.prose strong { color: var(--text); }

.notice {
  padding: 16px 20px; margin-bottom: 2em;
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--text) !important;
}


/* ---------- Services ---------- */

.pill-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pill-nav a {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); text-decoration: none; font-size: 0.93rem;
  background: rgba(13, 16, 18, 0.6);
}
.pill-nav a:hover { color: var(--text); border-color: var(--accent); }

.service-block {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start;
  padding-block: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}
.service-block:first-child { padding-top: 0; }
.service-block:last-child { border-bottom: 0; padding-bottom: 0; }
.service-intro > p:not(.lead) { color: var(--muted); }
.fit { padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.fit strong { color: var(--text); }
.service-list h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
@media (max-width: 880px) { .service-block { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .form-layout { grid-template-columns: 1fr; } }

.inquiry {
  display: grid; gap: 22px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; align-content: start; }
.field label { font-weight: 600; font-size: 0.95rem; }
.req { color: var(--accent); }
.opt { color: var(--faint); font-weight: 400; font-size: 0.85rem; margin-left: 4px; }

input, select, textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
::placeholder { color: var(--faint); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #46505a; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 154, 82, 0.2); }
[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.9rem; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[disabled] input { opacity: 0.55; cursor: not-allowed; }

.banner { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 500; }
.banner--error { background: rgba(239, 125, 109, 0.1); border: 1px solid rgba(239, 125, 109, 0.4); color: #f5b3a8; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 6px; }
.form-note { color: var(--faint); font-size: 0.9rem; margin: 0; }

.form-aside { display: grid; gap: 20px; position: sticky; top: calc(var(--header-h) + 24px); }
.form-aside h2 { font-size: 1.3rem; }
@media (max-width: 960px) { .form-aside { position: static; } }

.mini-steps { list-style: none; display: grid; gap: 16px; margin: 18px 0; }
.mini-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.mini-steps span {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.9rem;
}
.mini-steps p { margin: 3px 0 0; font-size: 0.97rem; }
.mini-steps strong { color: var(--text); }
.aside-note { font-size: 0.9rem; color: var(--faint) !important; }

.next-card { margin-top: 40px; text-align: center; }
.next-card h2 { font-size: 1.4rem; }

/* ---------- Client portal ---------- */

.portal-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px clamp(32px, 5vw, 64px);
  grid-template-areas: "status login" "features login";
  align-items: start;
}
.portal-status { grid-area: status; display: grid; gap: 14px; justify-items: start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.portal-status p { color: var(--muted); }
.portal-status strong { color: var(--text); }
.login-card {
  grid-area: login;
  padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
}
.login-card h2 { font-size: 1.5rem; }
.login-form fieldset { display: grid; gap: 18px; }
.login-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 18px; color: var(--faint); font-size: 0.9rem; }
.login-note .icon { margin-top: 3px; color: var(--accent); }
.portal-features { grid-area: features; }
.portal-features h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.portal-features > p { color: var(--muted); }
.feature-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.feature-grid h3 { font-size: 1.08rem; }
.feature-grid .badge { margin-left: 6px; }
@media (max-width: 960px) {
  .portal-layout { grid-template-columns: 1fr; grid-template-areas: "status" "login" "features"; }
}
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer { padding-block: 64px 32px; border-top: 1px solid var(--line); background: var(--bg-alt); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.footer-brand img { width: 120px; margin-bottom: 18px; }
.footer-brand p { color: var(--muted); max-width: 340px; }
.footer-place { display: flex; align-items: center; gap: 6px; color: var(--faint) !important; margin-top: 14px; }
.footer-place .icon { color: var(--accent); }
.footer-title { font: 600 0.8rem/1 var(--font-body); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 18px; }
.footer-col ul { list-style: none; display: grid; gap: 10px; color: var(--muted); }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 28px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 0.88rem;
}
.footer-bottom p { margin: 0; }
.footer-legal { list-style: none; display: flex; gap: 20px; }
.footer-legal a { color: var(--faint); text-decoration: none; }
.footer-legal a:hover { color: var(--text); }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Signed-in portal & admin ---------- */

.app-bar { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.app-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; min-height: 56px; padding-block: 8px; }
.app-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.app-nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.app-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.app-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.app-user { display: flex; align-items: center; gap: 12px; }
.app-user-name { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.app-user-name .icon { color: var(--accent); }

.app-main { padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 96px); }
.app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 32px; }
.app-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 0; }
.app-head .eyebrow { margin-bottom: 0.6rem; }
.app-sub { color: var(--muted); margin: 8px 0 0; }
.app-section { margin-top: 40px; }
.app-section > h2, .card > h2 { font-size: 1.25rem; margin-bottom: 16px; }
.count { display: inline-block; min-width: 1.6em; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--muted); font: 600 0.82rem/1.6 var(--font-body); text-align: center; vertical-align: middle; }
.empty { color: var(--muted); padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.muted-note { color: var(--faint) !important; font-size: 0.9rem; }

.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.quick { padding: 22px; }
.quick .icon-chip { width: 40px; height: 40px; margin-bottom: 14px; }
.quick h2 { font-size: 1.08rem; margin-bottom: 6px; }
.quick p { font-size: 0.94rem; }
@media (max-width: 780px) { .quick-grid { grid-template-columns: 1fr; } }

.req-list { list-style: none; display: grid; gap: 8px; }
.req-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: inherit; text-decoration: none; transition: border-color 0.15s, background-color 0.15s;
}
.req-row:hover { color: inherit; border-color: rgba(224, 154, 82, 0.45); background: var(--surface-2); }
.card .req-row { background: var(--bg); }
.req-main { display: grid; gap: 3px; min-width: 0; }
.req-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; color: var(--faint); font-size: 0.86rem; }
.req-meta strong { color: var(--muted); font-weight: 600; }
.req-meta .icon { display: inline; vertical-align: -2px; }

.status {
  flex: none; display: inline-block; padding: 3px 10px; border-radius: 999px;
  font: 600 0.78rem/1.5 var(--font-body); white-space: nowrap;
  border: 1px solid currentColor;
}
.status--lg { font-size: 0.9rem; padding: 6px 14px; }
.status--new { color: var(--accent); background: var(--accent-soft); }
.status--in_progress { color: #7cb7f0; background: rgba(124, 183, 240, 0.1); }
.status--waiting { color: #f0c96a; background: rgba(240, 201, 106, 0.1); }
.status--done { color: var(--ok); background: rgba(111, 207, 151, 0.1); }
.status--closed { color: var(--faint); background: transparent; }

.app-form { display: grid; gap: 22px; max-width: 760px; padding: clamp(22px, 4vw, 36px); }
.app-form .field-row { gap: 18px; }
.form-section { font-size: 0.82rem !important; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 8px 0 -6px !important; }
fieldset.field legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 500; transition: all 0.15s; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-hint { color: var(--faint); font-size: 0.86rem; margin: 0; }
.field--inline { display: flex; align-items: center; gap: 10px; }
.field--inline select { width: auto; }
.stack-form { display: grid; gap: 18px; }
.inline-form { display: grid; gap: 14px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.inline-form h3 { font-size: 1rem; margin: 0; }
.inline-form .btn, .stack-form > .btn { justify-self: start; }
.banner--ok { background: rgba(111, 207, 151, 0.1); border: 1px solid rgba(111, 207, 151, 0.4); color: #a9e6c3; margin-bottom: 18px; }
.login-card .banner { margin-bottom: 18px; }
.login-card--center { max-width: 440px; margin: 32px auto 0; text-align: left; }

.thread-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.thread-layout > div:only-child { grid-column: 1 / -1; max-width: 820px; }
@media (max-width: 900px) { .thread-layout { grid-template-columns: 1fr; } }
.thread { list-style: none; display: grid; gap: 12px; }
.msg { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.msg--team { border-color: rgba(224, 154, 82, 0.35); background: linear-gradient(180deg, rgba(224, 154, 82, 0.06), var(--surface)); }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.msg-head time { color: var(--faint); font-size: 0.86rem; margin-left: auto; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.reply { display: grid; gap: 14px; margin-top: 16px; }
.reply .btn { justify-self: start; }
.reply-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.reply .muted-note { margin: 0; }
.status-help dl { display: grid; gap: 14px; margin: 0; }
.status-help dt { margin: 0; }
.status-help dd { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; }
.status-help h2 { font-size: 1.05rem !important; }

.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 780px) { .account-grid { grid-template-columns: 1fr; } }
.account-plan { font: 700 1.5rem/1.2 var(--font-display); color: var(--text) !important; margin-bottom: 6px; }
.account-plan span { display: block; font: 600 0.95rem/1.4 var(--font-body); color: var(--accent); margin-top: 4px; }
.account-sub { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 22px 0 6px; }
.narrow-card { max-width: 520px; }
.people { list-style: none; display: grid; gap: 12px; margin-bottom: 14px; }
.people li { display: grid; gap: 2px; }
.people span { color: var(--muted); font-size: 0.93rem; overflow-wrap: anywhere; }
.people--admin li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.people--admin li > div:first-child { display: grid; gap: 2px; min-width: 0; }
.people--admin li.is-off { opacity: 0.55; }
.people-meta { font-size: 0.84rem !important; color: var(--faint) !important; }
.people-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.table-wrap--flat { background: transparent; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; }
.price-table tbody th { font-weight: 600; }
.price-table tbody th span { display: block; color: var(--muted); font-weight: 400; font-size: 0.92rem; margin-top: 2px; }
.price-table td { white-space: nowrap; text-align: right; }
.price-table thead th:last-child { text-align: right; }
.price-table td span { color: var(--faint); font-size: 0.9rem; }
.price-total { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-strong); text-align: right; color: var(--muted); }
.price-total strong { color: var(--text); font-size: 1.1rem; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-col { display: grid; gap: 20px; }
@media (max-width: 960px) { .admin-grid { grid-template-columns: 1fr; } }
.service-rows { list-style: none; display: grid; gap: 8px; }
.service-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.service-rows li > div:first-child { display: grid; gap: 2px; min-width: 0; }
.service-rows span { color: var(--muted); font-size: 0.9rem; }
.service-price { font-weight: 700; white-space: nowrap; }
.service-price span { font-weight: 400; color: var(--faint); }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--faint); cursor: pointer; }
.icon-btn:hover { color: var(--danger); border-color: rgba(239, 125, 109, 0.4); }

.link-card { max-width: 760px; display: grid; gap: 18px; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88rem; }
.link-facts { padding-left: 20px; color: var(--muted); display: grid; gap: 4px; font-size: 0.94rem; }
.link-card p:last-child { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Website demos ---------- */

.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.12em; }
.code-input::placeholder { letter-spacing: 0.12em; }
.demo-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em; }
.demo-hero .icon-chip { margin-bottom: 22px; }
.demo-current { justify-items: center; max-width: 440px; margin: 32px auto 0; text-align: center; }
.demo-foot { margin-top: 28px; color: var(--faint); font-size: 0.95rem; }
.demo-message { white-space: pre-line; }
.demo-notes { padding: clamp(22px, 4vw, 36px); }
.demo-notes h2 { font-size: 1.3rem; }
.demo-actions { justify-content: flex-start; margin: 24px 0 0; }
