:root {
  --navy: #0f172a;
  --navy-light: #1e293b;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --white: #ffffff;
  --background: #f8fafc;
  --border: #e2e8f0;
  --text: #334155;
  --text-light: #64748b;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 12px 35px rgba(15, 23, 42, 0.07);
  --container: 1160px;
  /* Shared UI rhythm: readable labels, comfortable controls, predictable space. */
  --font-caption: 12px;
  --font-meta: 14px;
  --font-ui: 16px;
  --control-min-height: 44px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-size: 18px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* Keep button typography at the original prototype scale. */
button,
.btn {
  font-size: 16px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.container {
  width: min(var(--container), 92%);
  margin: 0 auto;
}

.logo {
  font-size: 25px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--blue);
}

/* Shared Tendigi wordmark. Context rules keep the wide logo balanced in each shell. */
.brand-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 100%;
  min-height: var(--control-min-height);
  line-height: 0;
}

.brand-logo img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

.app-sidebar-brand .brand-logo img {
  width: 168px;
}

.auth-brand-row .brand-logo img {
  width: 190px;
}

.footer-brand .brand-logo img {
  width: 170px;
}

.btn {
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  border-color: var(--border);
  color: var(--navy);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: var(--background);
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 23px;
  margin-bottom: 18px;
}

.card h3 {
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 21px;
}

.card p {
  color: var(--text-light);
  font-size: 18px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-heading.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-heading h2 {
  color: var(--navy);
  font-size: clamp(35px, 4vw, 49px);
  line-height: 1.12;
  letter-spacing: -1.3px;
  margin: 16px 0;
}

.section-heading p {
  font-size: 20px;
  color: var(--text-light);
}

.grid-3,
.grid-4 {
  display: grid;
  gap: 22px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.success {
  color: var(--green);
  font-weight: 700;
}

.warning {
  color: var(--yellow);
  font-weight: 700;
}

.danger {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .marketing-nav .brand-logo img {
    width: 140px;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}
