/* cortexcrm.app — shared styles */

:root {
  /* Cream theme (default) */
  --bg: #f7f4ee;
  --bg-2: #efeae0;
  --paper: #fffdf7;
  --ink: #0e0e10;
  --ink-2: #2a2a2e;
  --muted: #6b6a66;
  --rule: #1a1a1c;
  --hair: rgba(14,14,16,0.10);
  --hair-strong: rgba(14,14,16,0.22);
  --accent: #2a4f3f;          /* forest, ties to wordmark */
  --accent-ink: #f7f4ee;
  --warn: #b34a23;
  --grad-1: #6a26e3;
  --grad-2: #c11eff;
  --grad-3: #38c6f1;
  --grad-4: #ffcb05;
  --grad-5: #e92502;
  --shadow-card: 0 1px 0 rgba(14,14,16,.04), 0 12px 32px -16px rgba(14,14,16,.18);
  --shadow-elev: 0 30px 60px -30px rgba(14,14,16,.35);
  --radius: 4px;
  --maxw: 1240px;
  --pad-section: 120px;
}

html.theme-light {
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --paper: #ffffff;
  --ink: #0a0b0d;
  --ink-2: #1f2126;
  --muted: #5a6068;
  --hair: rgba(10,11,13,.08);
  --hair-strong: rgba(10,11,13,.16);
  --accent: #1d4ed8;
}

html.theme-dark {
  --bg: #0c0d10;
  --bg-2: #15171b;
  --paper: #14161a;
  --ink: #f4f1ea;
  --ink-2: #d6d2c7;
  --muted: #8b8a83;
  --rule: #f4f1ea;
  --hair: rgba(244,241,234,.10);
  --hair-strong: rgba(244,241,234,.22);
  --accent: #82c8a0;
}

html.accent-mono {
  --accent: #0e0e10;
}
html.theme-dark.accent-mono {
  --accent: #f4f1ea;
}

html.density-dense {
  --pad-section: 80px;
}
html.density-airy {
  --pad-section: 160px;
}

html.type-serif {
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --display-tracking: -0.01em;
}
html:not(.type-serif) {
  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display-tracking: -0.035em;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

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

.mono {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-feature-settings: "ss01", "calt";
  letter-spacing: 0;
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--ink);
  opacity: .55;
}

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ───── Nav ───── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 19px;
}
.nav-brand .mark {
  width: 26px; height: 26px;
  display: inline-block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.nav-cta {
  color: #fff;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.nav-cta:hover { opacity: .9; }
.nav-cta .cta-short { display: none; }

/* ───── Mobile nav (hamburger + drawer) ───── */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 60;
  opacity: 0;
  transition: opacity .2s ease;
}
.nav-overlay.is-open { opacity: 1; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--bg);
  border-left: 1px solid var(--hair);
  z-index: 70;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}
.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
}
.nav-drawer-close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
  padding: 4px 8px;
}
.nav-drawer-close:hover { color: var(--ink); }
.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
}
.nav-drawer-links a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 16px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hair);
}
.nav-drawer-links a:hover,
.nav-drawer-links a.is-active { color: var(--ink); }
.nav-drawer-links a:last-child { border-bottom: 0; }
.nav-drawer-links a.nav-drawer-cta {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  color: #fff;
  border-bottom: 0;
  justify-content: center;
  font-size: 15px;
}
.nav-drawer-links a.nav-drawer-cta:hover { color: #fff; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  line-height: 1;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair-strong);
}
.btn-secondary:hover { background: var(--bg-2); }
.btn-grad {
  position: relative;
  color: white;
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2) 35%, var(--grad-3) 65%, var(--grad-4) 85%, var(--grad-5));
  background-size: 200% 100%;
}
.btn-grad:hover { background-position: 100% 0; }

/* ───── Section helpers ───── */
.section {
  padding: var(--pad-section) 0;
  border-top: 1px solid var(--hair);
}
.section--flush { border-top: 0; }

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--display-tracking);
  line-height: 0.95;
  margin: 0;
}
.h-1 { font-size: clamp(48px, 8vw, 112px); }
.h-2 { font-size: clamp(38px, 5vw, 64px); }
.h-3 { font-size: clamp(24px, 2.4vw, 32px); }

.lede {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
}

/* ───── Brand mark (gradient) ───── */
.brand-mark {
  display: inline-block;
}

/* ───── Stamp (one-time price) ───── */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stamp .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
}

/* ───── Footer ───── */
.footer {
  border-top: 1px solid var(--hair);
  padding: 80px 0 60px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h5 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin: 0 0 10px; }
.footer a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14.5px;
}
.footer a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ───── Card ───── */
.card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 6px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* ───── Marquee receipt ───── */
.receipt {
  background: var(--paper);
  border: 1px solid var(--hair-strong);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 28px 32px;
  position: relative;
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}
.receipt::before, .receipt::after {
  content: "";
  position: absolute;
  left: 0; right: 0; height: 12px;
  background: radial-gradient(circle at 6px 6px, var(--bg) 5px, transparent 6px);
  background-size: 12px 12px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}
.receipt::before { top: -6px; }
.receipt::after  { bottom: -6px; }
.receipt h4 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.receipt .row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed var(--hair);
}
.receipt .row:last-child { border-bottom: 0; }
.receipt .total {
  font-weight: 700;
  font-size: 15px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 0 !important;
}

/* ───── Tweaks panel basic styling left to component ───── */

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-cta .cta-full { display: none; }
  .nav-cta .cta-short { display: inline; }
  .nav-toggle { display: block; margin-left: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .shell { padding: 0 20px; }
  .nav-inner { padding: 14px 20px; gap: 12px; }
}

@media (max-width: 329px) {
  .nav-inner > .nav-cta { display: none; }
  .nav-toggle { margin-left: auto; }
  .nav-drawer-links a.nav-drawer-cta { display: flex; }
}
