/* ============================================================
   Gromex marketing site — shared styles
   Palette taken from brand.pdf:
     Gromex / Deep Cove (deep blue)
     Track  / Muted Blue
     Tender / Green Leaf
   Theme is selected via [data-theme] on <body>.
   ============================================================ */

:root {
  /* ---- Gromex (Deep Cove) — DEFAULT ---- */
  --gx-900: #080b3f;   /* deep cove */
  --gx-800: #10165c;
  --gx-700: #182079;
  --gx-600: #202b97;
  --gx-500: #2835b4;
  --gx-400: #3040d1;
  --gx-300: #8a92e5;
  --gx-200: #c8cbf1;
  --gx-100: #e5e7fa;
  --gx-50:  #f3f4fc;

  /* ---- Track (Muted Blue) ---- */
  --tk-900: #1f4a72;
  --tk-800: #316d9d;
  --tk-700: #4584af;
  --tk-500: #77afe3;
  --tk-300: #bad7f2;
  --tk-200: #e0edf9;
  --tk-100: #f1f7fd;

  /* ---- Tender (Green Leaf) ---- */
  --td-900: #2c5012;
  --td-800: #407018;
  --td-700: #60b929;
  --td-500: #80d447;
  --td-300: #c6f0a6;
  --td-200: #def6ca;
  --td-100: #f2fce9;

  /* ---- Active brand vars — overridden per page via [data-theme] ---- */
  --brand-900: var(--gx-900);
  --brand-800: var(--gx-800);
  --brand-700: var(--gx-700);
  --brand-500: var(--gx-500);
  --brand-400: var(--gx-400);
  --brand-300: var(--gx-300);
  --brand-200: var(--gx-200);
  --brand-100: var(--gx-100);
  --brand-50:  var(--gx-50);

  /* Neutrals */
  --ink-900: #0d1019;
  --ink-800: #1a2030;
  --ink-700: #3b4253;
  --ink-500: #6b7280;
  --ink-300: #d1d5db;
  --ink-200: #e7eaec;
  --ink-100: #f3f4f6;
  --ink-50:  #f9fafb;
  --paper:   #fbfbf8;     /* warm off-white, default */
  --paper-2: #f5f6f0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(13,16,25,.04), 0 1px 3px rgba(13,16,25,.06);
  --shadow-md: 0 2px 6px rgba(13,16,25,.05), 0 8px 24px rgba(13,16,25,.06);
  --shadow-lg: 0 8px 16px rgba(13,16,25,.06), 0 24px 48px rgba(13,16,25,.08);

  /* Onest is the brand typeface. */
  --font-heading: 'Onest', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Onest', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --max-w: 1240px;
}

/* Per-page brand themes */
body[data-theme="track"] {
  --brand-900: var(--td-900);
  --brand-800: var(--td-800);
  --brand-700: var(--td-700);
  --brand-500: var(--td-500);
  --brand-400: var(--td-500);
  --brand-300: var(--td-300);
  --brand-200: var(--td-200);
  --brand-100: var(--td-100);
  --brand-50:  var(--td-100);
  --paper:    #fbfdf8;
  --paper-2:  #f0f7ea;
}
body[data-theme="tender"] {
  --brand-900: var(--tk-900);
  --brand-800: var(--tk-800);
  --brand-700: var(--tk-700);
  --brand-500: var(--tk-500);
  --brand-400: var(--tk-500);
  --brand-300: var(--tk-300);
  --brand-200: var(--tk-200);
  --brand-100: var(--tk-100);
  --brand-50:  var(--tk-100);
  --paper:    #fbfdff;
  --paper-2:  #eef5fc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }

/* ---------- Layout ---------- */

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

@media (max-width: 720px) {
  .shell { padding: 0 24px; }
}
@media (max-width: 480px) {
  .shell { padding: 0 20px; }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,251,248,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--ink-200);
}
body[data-theme="track"]  .nav { background: rgba(251,253,255,.85); }
body[data-theme="tender"] .nav { background: rgba(251,253,248,.85); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.nav-left { display: flex; align-items: center; gap: 36px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-900); font-size: 18px; }
.nav-links { display: flex; gap: 28px; }
.nav-link { font-size: 14px; color: var(--ink-700); font-weight: 500; transition: color .15s; }
.nav-link:hover { color: var(--brand-700); }
.nav-link.is-active { color: var(--brand-800); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; color: var(--ink-700); }

@media (max-width: 720px) {
  .nav-inner { flex-wrap: wrap; height: auto; padding: 14px 0; gap: 0; }
  .nav-left { width: 100%; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 12px 0 4px;
    margin-top: 12px;
    border-top: 1px solid var(--ink-200);
    order: 99;
  }
  .nav-links.is-open { display: flex; }
  .nav-link { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--ink-100); }
  .nav-link:last-child { border-bottom: none; }
  .nav-right {
    display: none;
    width: 100%;
    padding: 12px 0 0;
    border-top: 1px solid var(--ink-200);
    order: 100;
    flex-direction: column;
    gap: 8px;
  }
  .nav-right.is-open { display: flex; }
  .nav-right .btn { width: 100%; justify-content: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-700);
  color: white;
  border-color: var(--brand-700);
}
.btn-primary:hover { background: var(--brand-800); border-color: var(--brand-800); }
.btn-ghost { background: transparent; color: var(--ink-900); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-outline {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-300);
}
.btn-outline:hover { border-color: var(--brand-800); color: var(--brand-800); }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-disabled {
  background: var(--ink-100);
  color: var(--ink-500);
  border-color: var(--ink-200);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Eyebrow / pill labels ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-100);
  border: 1px solid var(--brand-300);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-800);
  font-weight: 500;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-700); }

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--ink-200);
  background: var(--paper-2);
  padding: 64px 0 32px;
  margin-top: 96px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--ink-700);
  padding: 4px 0;
}
.footer-col a:hover { color: var(--brand-800); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-200);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-500);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer.site-footer { padding: 40px 0 24px; margin-top: 48px; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Mock UI chrome ---------- */

.mock-window {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
}
.mock-dot { width: 12px; height: 12px; border-radius: 50%; }
.mock-dot.r { background: #ff5f57; }
.mock-dot.y { background: #ffbd2e; }
.mock-dot.g { background: #28c941; }
.mock-url {
  flex: 1;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-500);
  margin-left: 8px;
  text-align: center;
  max-width: 320px;
  margin-inline: auto;
}

/* ---------- Section utilities ---------- */

section.block { padding: 96px 0; }
section.block-sm { padding: 64px 0; }
@media (max-width: 720px) {
  section.block { padding: 64px 0; }
  section.block-sm { padding: 48px 0; }
}
@media (max-width: 480px) {
  section.block { padding: 48px 0; }
  section.block-sm { padding: 32px 0; }
}

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

.h-display {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
}
.h-section {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.h-card {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

@media (max-width: 480px) {
  .h-display { font-size: 32px; }
  .h-section { font-size: 24px; }
  .lead { font-size: 16px; max-width: 100%; }
  .card, .card-flat { padding: 16px; }
}

/* ---------- Grid motif ---------- */

body {
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--brand-800) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--brand-800) 8%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-grid {
  /* kept for any section that needs to re-layer the grid over a local background */
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--brand-800) 8%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--brand-800) 8%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-dots {
  background-image: radial-gradient(rgba(14,20,19,.12) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* ---------- Cards ---------- */

.card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-flat {
  background: var(--paper-2);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ---------- Minimal product card (simplified home page) ---------- */
.product-card-min {
  display: block;
  padding: 32px;
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  background: white;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.product-card-min:hover {
  transform: translateY(-2px);
  border-color: var(--ink-300);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

/* ---------- Legal/long-form prose pages ---------- */
.legal-prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 0 96px;
  color: var(--ink-800);
  font-size: 15.5px;
  line-height: 1.7;
}
.legal-prose h1 {
  font-family: var(--font-heading);
  font-size: 38px;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}
.legal-prose .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 32px;
}
.legal-prose h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 36px 0 12px 0;
  color: var(--ink-900);
}
.legal-prose h3 { font-size: 17px; margin: 24px 0 8px 0; color: var(--ink-900); }
.legal-prose p { margin: 0 0 14px 0; }
.legal-prose ul { margin: 0 0 16px 0; padding-left: 22px; }
.legal-prose li { margin-bottom: 6px; }
.legal-prose a:not(.btn) { color: var(--brand-700); }
.legal-prose strong { color: var(--ink-900); }

/* ---------- Responsive grid utilities ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.grid-about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.grid-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-steps { display: grid; gap: 24px; position: relative; }

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-hero { grid-template-columns: 1fr; gap: 32px; }
  .grid-about { grid-template-columns: 1fr; gap: 32px; }
  .grid-stats { grid-template-columns: 1fr; gap: 16px; }
  .grid-steps { grid-template-columns: repeat(2, 1fr); }
  .hero-home { padding: 64px 0 48px !important; }
  .cta-band-inner { padding: 32px !important; }
  .product-card { min-height: auto !important; padding: 24px !important; }
  .product-card h3 { font-size: 22px !important; }
  .pricing-amount { font-size: 48px !important; }
  .pricing-card { padding: 24px !important; }
  .step-circle { width: 48px !important; height: 48px !important; font-size: 18px !important; border-radius: 12px !important; }
  .step-connector { display: none !important; }
  .hero-card-3d { transform: none !important; }
}
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-steps { grid-template-columns: 1fr; }
  .grid-stats { grid-template-columns: 1fr; }
}

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