/* Hiventiq + Bzz marketing — proposal
   Palette modeled on the Bzz desktop history UI (gold + black/ivory).
   - Dark:  deep charcoal background, gold #d4a017 / amber accent
   - Light: warm ivory background, deeper gold for AA contrast
   - Type:  system / Inter-like sans, tight tracking */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:              #0f0f10;
  --bg-deep:         #08080a;
  --bg-panel:        #161618;
  --bg-panel-raised: #1c1c1f;
  --bg-input:        #121214;
  --bg-hover:        #232328;

  --border:        #2c2c30;
  --border-dim:    #1f1f22;
  --border-strong: #3d3d42;

  --text:       #e6e2d6;
  --text-head:  #f7f3e8;
  --text-muted: #a39e8e;
  --text-dim:   #7a7669;
  --text-faint: #57544a;

  --primary:       #e0a921;   /* gold */
  --primary-hover: #f0bd3a;
  --primary-soft:  rgba(224, 169, 33, 0.14);
  --primary-glow:  rgba(224, 169, 33, 0.10);
  --primary-deep:  #b88514;

  --on-primary:    #1a1408;   /* dark text on gold buttons */

  --success:    #6cc88a;
  --success-bg: rgba(108, 200, 138, 0.16);
  --warning:    #e2b84d;
  --warning-bg: rgba(226, 184, 77, 0.16);
  --danger:     #ef6b73;
  --danger-bg:  rgba(239, 107, 115, 0.16);

  --focus-ring: rgba(224, 169, 33, 0.34);
  --header-bg:  rgba(15, 15, 16, 0.85);

  --hex-stroke: rgba(224, 169, 33, 0.08);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg:              #f8f5ec;
  --bg-deep:         #efe9d8;
  --bg-panel:        #ffffff;
  --bg-panel-raised: #ffffff;
  --bg-input:        #ffffff;
  --bg-hover:        #f1ecdc;

  --border:        #ddd4ba;
  --border-dim:    #e8e1cb;
  --border-strong: #b7ac8b;

  --text:       #2a2620;
  --text-head:  #15110a;
  --text-muted: #6b6453;
  --text-dim:   #8a8470;
  --text-faint: #aaa491;

  --primary:       #a37408;   /* deeper gold for AA on ivory */
  --primary-hover: #855e06;
  --primary-soft:  rgba(163, 116, 8, 0.10);
  --primary-glow:  rgba(163, 116, 8, 0.08);
  --primary-deep:  #6b4c04;

  --on-primary:    #fffaf0;

  --success:    #1a6f3a;
  --success-bg: rgba(26, 111, 58, 0.10);
  --warning:    #8a6612;
  --warning-bg: rgba(138, 102, 18, 0.10);
  --danger:     #b32530;
  --danger-bg:  rgba(179, 37, 48, 0.10);

  --focus-ring: rgba(163, 116, 8, 0.28);
  --header-bg:  rgba(248, 245, 236, 0.88);

  --hex-stroke: rgba(163, 116, 8, 0.10);
}

:root {
  --page-max-width: 1140px;
  --radius: 10px;
  --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}
code { background: var(--bg-input); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-dim); }

/* ── Layout primitives ─────────────────────────── */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

section { padding: 64px 0; }
section.compact { padding: 40px 0; }
section.tight-top,
section.hero.tight-top { padding-top: 24px; }
section.tight-bot,
section.hero.tight-bot { padding-bottom: 24px; }

/* Soft tonal wash that fades the page into a section without a hard band.
   Use on a section to give it a gradient continuation from the preceding block. */
section.wash {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-panel) 60%);
}

h1, h2, h3, h4 { color: var(--text-head); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.25rem); margin-bottom: 18px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; color: var(--text); }
p.lede { font-size: 1.18rem; color: var(--text-muted); max-width: 680px; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.gold { color: var(--primary); }

/* ── Honeycomb backdrop (subtle, decorative) ───── */
.honeycomb {
  position: relative;
  isolation: isolate;
}
.honeycomb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 70% 60% at 20% 0%, var(--primary-glow), transparent 60%),
    radial-gradient(ellipse 50% 50% at 100% 100%, var(--primary-glow), transparent 60%);
  pointer-events: none;
}

/* ── Header / nav ──────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dim);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 20px;
}
.brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-head);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.015em;
}
.brand img.brand-mark { width: 32px; height: 32px; }
.brand .brand-text { line-height: 1; }
.brand .brand-text .sub { display: block; font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-top: 3px; letter-spacing: 0.06em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text-head); text-decoration: none; }
.nav a.active { color: var(--text-head); }
.nav a.btn, .nav a.btn:hover { color: var(--on-primary); }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.toggle-btn:hover { color: var(--text-head); border-color: var(--border-strong); background: var(--bg-hover); }
.toggle-btn.icon-only { width: 32px; padding: 0; justify-content: center; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--primary);
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--on-primary);
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: transparent;
  color: var(--primary);
}
.btn.secondary:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn.ghost:hover { color: var(--text-head); border-color: var(--border-strong); background: var(--bg-hover); }
.btn.lg { padding: 14px 28px; font-size: 1rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  padding: 64px 0 72px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, var(--primary-glow), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, var(--primary-glow), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border-dim);
  position: relative;
  overflow: hidden;
}
.hero h1 { max-width: 880px; }
@media (min-width: 720px) {
  .hero h1 { max-width: none; }
}
.hero .lede { margin: 22px 0 36px; max-width: 720px; font-size: 1.22rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Hero hex-mark — large faded honeycomb-style watermark */
.hero-mark {
  position: absolute;
  right: -120px;
  top: -60px;
  width: 520px;
  opacity: 0.10;
  pointer-events: none;
  filter: drop-shadow(0 0 40px var(--primary-glow));
}
@media (max-width: 980px) { .hero-mark { display: none; } }

/* ── Panels / cards ────────────────────────────── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.panel-raised {
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.grid {
  display: grid;
  gap: 22px;
}
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* cols-4 stays as 1-up on phones, locks to 2x2 in the middle band, and only
   opens to 4-across on truly wide screens — avoids the awkward 3+1 wrap. */
@media (min-width: 720px) and (max-width: 1199px) {
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1200px) {
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Stat tiles ────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 960px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
}
.stat-tile {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
}
.stat-tile .big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-tile .label { color: var(--text-muted); font-size: 0.95rem; margin-top: 10px; font-weight: 500; }
.stat-tile .sublabel { color: var(--text-dim); font-size: 0.82rem; margin-top: 4px; }

/* ── Feature cards ─────────────────────────────── */
.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-card h3 { color: var(--text-head); min-height: 2.4em; }
.feature-card p { color: var(--text-muted); margin: 0; }
.feature-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 4px;
}
img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 .05em 0 .1em;
  vertical-align: -0.1em;
}

/* ── Hiventiq band (small parent-brand callout) ── */
.parent-band {
  background:
    linear-gradient(180deg, var(--bg-panel), var(--bg-deep));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.parent-band .pb-text { flex: 1 1 360px; }
.parent-band .pb-eyebrow { color: var(--primary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; display: block; }
.parent-band h3 { margin: 0 0 4px; color: var(--text-head); }
.parent-band p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ── Bzz first-release banner ─────────────────── */
.bzz-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--primary);
  text-decoration: none;
  border: 2px solid var(--primary);
  box-shadow: none;
}
.bzz-banner,
.bzz-banner:hover,
.bzz-banner:focus,
.bzz-banner:active,
.bzz-banner:visited {
  color: var(--primary) !important;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}
.bzz-banner .bb-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
.bzz-banner .bb-text { flex: 1 1 auto; min-width: 0; }
.bzz-banner .bb-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  display: block;
  margin-bottom: 4px;
}
.bzz-banner .bb-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--primary);
}
.bzz-banner .bb-sub {
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.9;
}
.bzz-banner .bb-arrow {
  font-size: 1.6rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.bzz-banner:hover .bb-arrow,
.bzz-banner:focus .bb-arrow { transform: none !important; }
@media (max-width: 560px) {
  .bzz-banner { padding: 18px 20px; gap: 16px; }
  .bzz-banner .bb-mark { width: 44px; height: 44px; flex-basis: 44px; }
  .bzz-banner .bb-title { font-size: 1.15rem; }
}

/* ── How-it-works steps ────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 22px; right: 22px;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  border: 1px solid var(--primary);
}
.step h3 { padding-right: 40px; }
.step p { margin: 0; color: var(--text-muted); }

/* ── CTA block ─────────────────────────────────── */
.cta-block {
  background:
    radial-gradient(ellipse at top, var(--primary-glow), transparent 70%),
    var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
}
.cta-block h2 { margin-bottom: 14px; }
.cta-block p.lede { margin: 0 auto 28px; }

/* ── Banded sections ───────────────────────────── */
.band {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}

/* ── Prose ─────────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; color: var(--text); font-size: 0.94rem; line-height: 1.55; }
.prose h1 { font-size: clamp(1.3rem, 2vw, 1.55rem); margin-bottom: 14px; }
.prose h2 { font-size: 1.15rem; margin: 36px 0 10px; }
.prose h3 { font-size: 1.02rem; margin: 24px 0 6px; }
.prose p { margin-bottom: 12px; }
.prose ul, .prose ol { margin: 0 0 14px 1.25rem; color: var(--text-muted); }
.prose li { margin: 5px 0; }

/* ── Contact form ──────────────────────────────── */
.form-grid {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
.form-grid label { font-size: 0.9rem; color: var(--text-muted); display: block; margin-bottom: 6px; font-weight: 500; }
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
}
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.form-grid textarea { min-height: 140px; resize: vertical; }

/* ── Footer ────────────────────────────────────── */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-dim);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: var(--text-head); margin-bottom: 14px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { padding: 5px 0; }
.footer-grid a { color: var(--text-muted); font-size: 0.93rem; }
.footer-grid a:hover { color: var(--text-head); text-decoration: none; }
.footer-grid p { color: var(--text-muted); font-size: 0.93rem; margin: 0 0 12px; max-width: 320px; }
.footer-brand { font-size: 1.1rem; font-weight: 700; color: var(--text-head); margin-bottom: 10px; display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; }
.footer-bottom {
  border-top: 1px solid var(--border-dim);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--text-dim); }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    align-items: flex-start;
  }
  .nav.open { display: flex; }
  .site-header { position: relative; }
  section { padding: 64px 0; }
  .hero { padding: 72px 0 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cta-block { padding: 40px 22px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
