/* ============================================
   ZINYE — ERP for growing businesses
   Design system
   ============================================ */

:root {
  /* Palette */
  --bg:        #f7f2e9;   /* warm cream */
  --bg-2:      #efe7d7;   /* deeper cream */
  --paper:     #fdfaf3;   /* light card */
  --ink:       #11231b;   /* near-black, green-tinted */
  --ink-2:     #2a3a32;
  --muted:     #6a7a71;
  --line:      #d9cfbb;
  --line-2:    #c7baa0;

  --emerald:        #0e6b4a;
  --emerald-deep:   #0a4d36;
  --emerald-tint:   #d4e4dc;
  --terra:          #c44a1f;
  --terra-tint:     #f3d8c9;
  --gold:           #b88a2c;

  /* Type */
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans:  "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale */
  --max:    1240px;
  --gutter: 32px;
  --r-sm:   6px;
  --r:      12px;
  --r-lg:   20px;
  --shadow-card: 0 1px 0 var(--line), 0 18px 40px -28px rgba(17,35,27,0.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -0.02em; }
h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; }
h4 { font-size: 20px; line-height: 1.2; }
p  { margin: 0; text-wrap: pretty; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  font-weight: 500;
}
.eyebrow-dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--terra);
  border-radius: 999px;
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.lead { font-size: 19px; color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--emerald-deep); }
.btn-emerald {
  background: var(--emerald);
  color: #f3f9f6;
}
.btn-emerald:hover { background: var(--emerald-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-link {
  background: transparent;
  color: var(--ink);
  padding: 0;
  height: auto;
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- Header ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.brand-dot {
  color: var(--terra);
  font-style: italic;
  margin-left: 1px;
}
.brand-mark {
  /* Kept for legacy references inside dashboard mocks; not used on site nav anymore. */
  width: 28px; height: 28px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-size: 17px;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 6px; height: 6px;
  background: var(--terra);
  border-radius: 50%;
  right: -2px; top: -2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.nav-link, .nav-trigger {
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.nav-link:hover, .nav-trigger:hover { background: var(--bg-2); }
.nav-link[aria-current="page"] { color: var(--terra); }
.nav-trigger .caret { font-size: 9px; opacity: 0.5; transition: transform .15s; }
.nav-item.open .nav-trigger { background: var(--bg-2); }
.nav-item.open .nav-trigger .caret { transform: rotate(180deg); }

.nav-item { position: relative; }
.mega {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 520px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(17,35,27,0.25);
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease;
  z-index: 60;
}
.mega-wide { width: 640px; }
.mega-narrow { width: 280px; padding: 16px; }
.nav-item.open .mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mega-head {
  padding: 0 4px 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.mega-head h4 {
  font-family: var(--serif);
  font-size: 22px;
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.mega-narrow .mega-list { grid-template-columns: 1fr; }
.mega-list a {
  display: block;
  padding: 12px;
  border-radius: 8px;
  transition: background .15s;
}
.mega-list a:hover { background: var(--bg-2); }
.mega-list a.on { background: var(--bg-2); }
.mega-name {
  display: block;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.mega-desc {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 3px;
}

.nav-cta {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-cta .signin { font-size: 14.5px; color: var(--ink-2); padding: 8px 10px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; align-items: center; text-align: center; }
.section-head .eyebrow { margin-bottom: 4px; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-dark {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: 40px;
}

/* ---------- Pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.pill-emerald { background: var(--emerald-tint); border-color: color-mix(in srgb, var(--emerald) 30%, transparent); color: var(--emerald-deep); }
.pill-terra   { background: var(--terra-tint);   border-color: color-mix(in srgb, var(--terra) 30%, transparent);   color: #8a2f10; }

/* ---------- Striped placeholder ---------- */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--ink) 5%, transparent) 0 8px,
      transparent 8px 16px),
    var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 180px;
}

/* ---------- Footer ---------- */
footer.foot {
  background: var(--ink);
  color: #c8d3cd;
  padding: 80px 0 36px;
  margin-top: 80px;
}
footer.foot a { color: #c8d3cd; }
footer.foot a:hover { color: #fff; }
.foot-top {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid #243630;
}
.foot-tag {
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.55;
  color: #97b3a5;
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.foot h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7b8a83;
  margin: 0 0 16px 0;
  font-weight: 500;
}
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.foot .brand { font-size: 26px; color: var(--bg); }
.foot .brand-dot { color: var(--terra); }
.foot .contact-ul li { display: grid; gap: 4px; }
.foot .contact-lab { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #7b8a83; }
.foot .socials { display: flex; gap: 8px; margin-top: 16px; }
.foot .socials a {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid #243630;
  border-radius: 8px;
  font-size: 14px;
}
.foot-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid #243630;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  color: #7b8a83;
  flex-wrap: wrap;
}

/* ---------- Utility ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }

.divider { height: 1px; background: var(--line); margin: 48px 0; }

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink-2);
}

/* ---------- Hero dashboard mock ---------- */
.mock {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-size: 12px;
}
.mock-bar {
  height: 36px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  background: linear-gradient(180deg, var(--bg-2), var(--paper));
}
.mock-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.mock-bar .dot:nth-child(1) { background: #e07a5f; }
.mock-bar .dot:nth-child(2) { background: #e2b73d; }
.mock-bar .dot:nth-child(3) { background: #6aa57f; }
.mock-bar .url {
  margin-left: 14px;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 11px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
}
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-top { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  :root { --gutter: 20px; }
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: scroll 38s linear infinite;
  align-items: center;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logo-chip {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink-2);
  opacity: 0.7;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.logo-chip small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
