:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f8fafc;
  --card: #ffffff;
  --brand: #0e4d8a;
  --brand-deep: #0a3a68;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --warn: #b45309;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  overflow-x: hidden;
}
#offer,
#work,
#automations,
#praxis,
#sierra,
#belief {
  scroll-margin-top: 12px;
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* —— Top nav —— */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.nav-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.nav-brand strong {
  display: block;
  font-size: 15px;
}
.nav-brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  border-color: #cbd5e1;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-ghost {
  background: transparent;
}

/* —— Hero —— */
.hero {
  display: grid;
  gap: 28px;
  padding: 28px 0 40px;
}
@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.2fr 0.9fr;
    align-items: center;
  }
}
.hero-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.hero-lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 42ch;
  margin: 0 0 22px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.hero-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.portal-pick {
  display: grid;
  gap: 10px;
}
.portal-pick a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.portal-pick a:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 77, 138, 0.1);
  text-decoration: none;
}
.portal-pick strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.portal-pick span {
  font-size: 12.5px;
  color: var(--muted);
}

/* —— Sections —— */
.section {
  margin: 36px 0;
}
.section h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}
.section > p {
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 56ch;
}
.grid-3 {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.grid-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.card .tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card ul {
  margin: 10px 0 0;
  padding-left: 1.1em;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.card li {
  margin: 4px 0;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pill-row span {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
}
.band {
  background: linear-gradient(135deg, #0e4d8a 0%, #0a3a68 55%, #0f766e 120%);
  color: #e2e8f0;
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 24px;
  margin: 40px 0;
}
.band h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 1.3rem;
}
.band > p {
  color: #cbd5e1;
  margin: 0 0 18px;
  max-width: 52ch;
}
.band .grid-3 .card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}
.band .card h3 {
  color: #fff;
}
.band .card p,
.band .card li {
  color: #cbd5e1;
}
.band .card .tag {
  background: rgba(204, 251, 241, 0.18);
  color: #99f6e4;
}
.example {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 0;
}
.example strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}
.example span {
  font-size: 13.5px;
  color: var(--muted);
}
.cta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin: 36px 0 8px;
}
.cta-strip h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.cta-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.foot {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
}

/* —— Home: simple hero, belief, portfolio, Sierra Waves —— */
.hero-simple {
  grid-template-columns: 1fr;
  max-width: 40rem;
  padding: 40px 0 48px;
}
.hero-simple .hero-lead {
  max-width: 46ch;
  font-size: 1.08rem;
}
.hero-simple em {
  font-style: italic;
  font-family: var(--display);
}

.belief {
  margin: 0 0 12px;
  position: relative;
  color: #f8fafc;
}
.belief img {
  display: block;
  width: 100%;
  height: min(72vh, 560px);
  object-fit: cover;
  object-position: center 62%;
}
.belief figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 20px 36px;
  background: linear-gradient(to top, rgba(8, 18, 32, 0.88) 0%, rgba(8, 18, 32, 0.45) 58%, transparent 100%);
}
.belief-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #99f6e4;
  margin: 0 0 10px;
}
.belief blockquote {
  margin: 0;
  max-width: 40rem;
}
.belief blockquote p {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.35;
  font-weight: 400;
  margin: 0;
}
.belief-note {
  margin: 14px 0 0;
  max-width: 40rem;
  color: #cbd5e1;
  font-size: 14px;
}
@media (min-width: 720px) {
  .belief figcaption {
    padding: 64px max(20px, calc((100% - 1080px) / 2 + 20px)) 44px;
  }
}

.site-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .site-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.site-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.site-card:hover {
  text-decoration: none;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.site-card h3 {
  margin: 14px 16px 4px;
  font-size: 1rem;
}
.site-card p {
  margin: 0 16px 16px;
  color: var(--muted);
  font-size: 13.5px;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--line);
}
.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}
.browser-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center 18%;
}
.ah-preview {
  height: 180px;
  background: linear-gradient(180deg, #0b1f33 0%, #12324f 100%);
  color: #e2e8f0;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ah-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}
.ah-top span {
  color: #94a3b8;
  font-size: 11px;
}
.ah-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 1;
}
.ah-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ah-stat small {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ah-stat b {
  font-size: 13px;
  font-weight: 600;
}
.ah-row {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.ah-row.short {
  width: 62%;
}

.sierra {
  position: relative;
  margin: 48px 0 8px;
  color: #f8fafc;
  min-height: 420px;
  display: grid;
  align-items: end;
}
.sierra img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.sierra-shade {
  position: relative;
  padding: 72px 0 48px;
  background: linear-gradient(to top, rgba(8, 18, 32, 0.86) 0%, rgba(8, 18, 32, 0.32) 62%, transparent 100%);
}
.sierra-copy {
  padding-bottom: 8px;
}
.sierra h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 10px;
}
.sierra p {
  max-width: 42ch;
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: 1.02rem;
}
.btn-on-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.btn-on-dark:hover {
  border-color: #fff;
}

@media (max-width: 640px) {
  .nav-actions {
    display: none;
  }
  .hero-simple {
    max-width: none;
    padding: 24px 0 32px;
  }
  .hero h1 {
    font-size: 1.85rem;
  }
  .hero-lead {
    max-width: none;
  }
  .belief img {
    height: 220px;
  }
  .belief figcaption {
    position: static;
    background: #0b1a2b;
    padding: 24px 20px 28px;
  }
  .belief blockquote p {
    font-size: 1.25rem;
  }
  .sierra {
    min-height: 380px;
  }
}

/* —— Login —— */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(13, 148, 136, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(14, 77, 138, 0.1), transparent),
    var(--paper);
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px;
}
.login-card h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.login-card .sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}
.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.role-tabs button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}
.role-tabs button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(14, 77, 138, 0.25);
  border-color: var(--brand);
}
.err {
  display: none;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.err.show {
  display: block;
}

/* —— Portals —— */
.portal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #0f766e;
}
.badge.internal {
  background: #e0e7ff;
  color: #3730a3;
}
.project-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.project {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.project:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  text-decoration: none;
}
.project strong {
  display: block;
  margin-bottom: 4px;
}
.project span {
  font-size: 13px;
  color: var(--muted);
}
.project em {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  color: var(--brand);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 16px 0;
}
.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ink-soft);
}
.status.submitted {
  background: #dbeafe;
  color: #1e40af;
}
.status.quoted {
  background: #dcfce7;
  color: #166534;
}
.form-row {
  display: grid;
  gap: 10px;
}
@media (min-width: 560px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}
.line-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.line-item {
  display: grid;
  grid-template-columns: 1fr 80px auto;
  gap: 8px;
  align-items: center;
}
.line-item input {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
