/* NuMacros marketing site — values match design/web exports */

:root {
  --nm-ground: #0a0a0a;
  --nm-panel: #111111;
  --nm-panel-alt: #161616;
  --nm-border: #262626;
  --nm-input-border: #333333;
  --nm-text: #f5f5f5;
  --nm-secondary: #a1a1a1;
  --nm-muted: #8a8a8a;
  --nm-primary-bg: #ebebeb;
  --nm-primary-fg: #171717;
  --nm-secondary-bg: #262626;
  --nm-protein: #8ec5ff;
  --nm-carbs: #f2a93b;
  --nm-fat: #a66bf0;
  --nm-bar-track: #2a2a2a;
  --nm-accent: #c8f169;
  --nm-error: #ff8a80;
  --nm-mobile-link: #c8c8c8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--nm-ground);
  color: var(--nm-text);
  font-family: "Geist", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--nm-secondary);
  text-decoration: none;
}

a:hover {
  color: #ffffff;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #f5f5f5;
  outline-offset: 2px;
}

input::placeholder {
  color: var(--nm-muted);
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.nm-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--nm-ground);
  color: var(--nm-text);
}

.nm-shell > main {
  flex: 1 0 auto;
  width: 100%;
}

.nm-mono {
  font-family: "Geist Mono", monospace;
}

/* Header */
.nm-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  flex-wrap: wrap;
}

.nm-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--nm-text);
  font-weight: 500;
  font-size: 15px;
}

.nm-brand:hover {
  color: var(--nm-text);
}

.nm-brand b {
  font-weight: 700;
}

/* Centre nav on the page width (not between logo and CTA). */
.nm-nav-center {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nm-nav-link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
}

.nm-nav-link[aria-current="page"] {
  color: var(--nm-text);
}

.nm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.nm-btn-primary {
  background: var(--nm-primary-bg);
  color: var(--nm-primary-fg);
}

.nm-btn-primary:hover {
  color: var(--nm-primary-fg);
}

.nm-btn-secondary {
  background: var(--nm-secondary-bg);
  color: var(--nm-text);
}

.nm-btn-secondary:hover {
  color: var(--nm-text);
}

.nm-nav-mobile {
  display: none;
}

.nm-nav-mobile .ico-close {
  display: none;
}

.nm-nav-mobile[open] .ico-open {
  display: none;
}

.nm-nav-mobile[open] .ico-close {
  display: block;
}

.nm-menu-toggle {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nm-text);
}

.nm-mobile-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 10;
  padding: 0 16px 20px;
  border-top: 1px solid var(--nm-border);
  border-bottom: 1px solid var(--nm-border);
  background: var(--nm-ground);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.nm-mobile-link {
  box-sizing: content-box; /* 56px content + 1px border = 57px, matching the design */
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  border-bottom: 1px solid var(--nm-border);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nm-mobile-link);
}

.nm-mobile-link[aria-current="page"] {
  color: var(--nm-text);
}

.nm-mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-top: 16px;
  border-radius: 8px;
  background: var(--nm-primary-bg);
  color: var(--nm-primary-fg);
  font-size: 15px;
  font-weight: 500;
}

.nm-mobile-cta:hover {
  color: var(--nm-primary-fg);
}

@media (max-width: 640px) {
  .nm-desktop-only {
    display: none !important;
  }

  .nm-nav-mobile {
    display: block;
  }
}

/* Footer */
.nm-footer {
  border-top: 1px solid var(--nm-border);
  padding: 56px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.nm-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nm-footer nav a {
  padding: 12px 10px;
}

.nm-footer-copy {
  color: var(--nm-muted);
}

/* Forms */
.nm-input {
  flex: 1 1 220px;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nm-input-border);
  border-radius: 8px;
  background: var(--nm-ground);
  color: var(--nm-text);
  font-family: inherit;
  font-size: 14px;
}

.nm-input[aria-invalid="true"] {
  border-color: var(--nm-error);
}

.nm-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nm-form-error {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--nm-error);
}

.nm-form-success {
  margin: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--nm-text);
}

.nm-card {
  border: 1px solid var(--nm-border);
  border-radius: 12px;
  background: var(--nm-panel);
  padding: 24px;
}

.nm-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.nm-card-support {
  margin: 2px 0 16px;
  color: var(--nm-secondary);
}

/* Content columns */
.nm-col {
  max-width: 672px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.nm-col-calc {
  max-width: 864px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Post row */
.nm-post-list {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--nm-border);
}

.nm-post-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 20px 0;
  border-top: 1px solid var(--nm-border);
  color: var(--nm-text);
}

.nm-post-row:hover {
  color: var(--nm-text);
}

.nm-post-meta {
  flex: 0 0 112px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--nm-secondary);
}

.nm-post-body {
  flex: 1 1 320px;
}

.nm-post-title {
  display: block;
  font-weight: 500;
}

.nm-post-excerpt {
  display: block;
  margin-top: 2px;
  color: var(--nm-secondary);
}

/* Segmented / chips */
.nm-seg {
  display: flex;
  gap: 8px;
}

.nm-seg-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--nm-secondary-bg);
  color: var(--nm-text);
}

.nm-seg-btn[aria-pressed="true"],
.nm-chip[aria-current="true"] {
  background: var(--nm-primary-bg);
  color: var(--nm-primary-fg);
}

.nm-chip {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--nm-secondary-bg);
  color: var(--nm-text);
}

.nm-chip:hover {
  color: var(--nm-text);
}

.nm-chip[aria-current="true"]:hover {
  color: var(--nm-primary-fg);
}

.nm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Field labels in calculator */
.nm-field-label {
  display: block;
  font-size: 14px;
  color: var(--nm-secondary);
  margin-bottom: 8px;
}

.nm-field-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nm-input-border);
  border-radius: 8px;
  background: var(--nm-ground);
  color: var(--nm-text);
  font-family: "Geist Mono", monospace;
  font-size: 14px;
}

.nm-field-select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--nm-input-border);
  border-radius: 8px;
  background: var(--nm-ground);
  color: var(--nm-text);
  font-family: inherit;
  font-size: 14px;
}

.nm-hidden {
  display: none !important;
}

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

/* Article body (rendered Markdown) */
.nm-article {
  font-size: 17px;
  line-height: 28px;
  color: #d4d4d4;
}

.nm-article > :first-child {
  margin-top: 0;
}

.nm-article > :last-child {
  margin-bottom: 0;
}

.nm-article p {
  margin: 0 0 20px;
}

.nm-article h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  line-height: 30px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nm-text);
}

.nm-article h3 {
  margin: 32px 0 10px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nm-text);
}

.nm-article a {
  color: var(--nm-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nm-article a:hover {
  color: #ffffff;
}

.nm-article ul,
.nm-article ol {
  margin: 0 0 20px;
  padding-left: 1.25em;
}

.nm-article li {
  margin: 0 0 8px;
}

.nm-article li:last-child {
  margin-bottom: 0;
}

.nm-article img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--nm-border);
  border-radius: 12px;
}

.nm-article code {
  font-family: "Geist Mono", monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--nm-panel-alt);
  color: var(--nm-text);
}

.nm-article pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--nm-border);
  border-radius: 12px;
  background: var(--nm-panel);
}

.nm-article pre code {
  padding: 0;
  background: transparent;
  font-size: 14px;
  line-height: 22px;
}

.nm-article .nm-pullquote {
  margin: 32px 0;
  padding: 0;
  border: none;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--nm-text);
}

.nm-article .nm-pullquote p {
  margin: 0;
}

.nm-article .nm-callout {
  margin: 32px 0;
  border: 1px solid var(--nm-border);
  border-radius: 12px;
  background: var(--nm-panel);
  padding: 20px 24px;
}

.nm-article .nm-callout-title {
  font-size: 13px;
  line-height: 20px;
  color: var(--nm-secondary);
}

.nm-article .nm-callout-title + .nm-callout-body {
  margin-top: 12px;
}

.nm-article .nm-callout-body > :first-child {
  margin-top: 0;
}

.nm-article .nm-callout-body > :last-child {
  margin-bottom: 0;
}

.nm-article .nm-callout-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 24px;
  color: var(--nm-text);
}

.nm-article .nm-callout-body li {
  display: flex;
  gap: 12px;
  margin: 0;
}

.nm-article .nm-callout-body li > strong:first-child {
  flex: 0 0 72px;
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--nm-protein);
}
