/* Advanced Inventory marketing site — aligned with app brand
   Primary teal #0F766E · Accent warm orange #EA580C · Material-like surfaces */

:root,
[data-theme="light"] {
  --teal: #0f766e;
  --teal-dark: #0d9488;
  --teal-deep: #115e59;
  --warm: #ea580c;
  --warm-soft: #ffedd5;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --nav-hover-bg: #f0fdfa;
  --code-bg: #f1f5f9;
  --code-text: #334155;
  --note-bg: #f0fdfa;
  --note-border: #99f6e4;
  --note-text: #115e59;
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 960px;
}

/* Greyscale surfaces (Material-like dark), brand teal/orange only on accents */
[data-theme="dark"] {
  --teal: #2dd4bf;
  --teal-dark: #5eead4;
  --teal-deep: #99f6e4;
  --warm: #fb923c;
  --warm-soft: #7c2d12;
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #e8e8e8;
  --muted: #a3a3a3;
  --border: #2e2e2e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.35);
  --nav-hover-bg: #2a2a2a;
  --code-bg: #2a2a2a;
  --code-text: #d4d4d4;
  --note-bg: #1a1a1a;
  --note-border: #333333;
  --note-text: #2dd4bf;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--teal);
}

a:hover {
  color: var(--teal-deep);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo-link img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.logo-link:hover {
  color: var(--teal);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--teal-deep);
  background: var(--nav-hover-bg);
}

.nav .btn-nav {
  background: var(--teal);
  color: #fff !important;
  margin-left: 4px;
}

[data-theme="dark"] .nav .btn-nav {
  color: #042f2e !important;
}

.nav .btn-nav:hover {
  background: var(--teal-deep);
}

[data-theme="dark"] .nav .btn-nav:hover {
  background: var(--teal-dark);
  color: #042f2e !important;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  color: var(--teal-deep);
  border-color: var(--teal);
  background: var(--nav-hover-bg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Main */
main {
  flex: 1;
  padding: 40px 0 64px;
}

/* Hero */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 24px 0 16px;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    padding: 40px 0 24px;
  }
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.hero .lead {
  margin: 0 0 28px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
}

.hero-visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: min(220px, 70%);
  height: auto;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

[data-theme="dark"] .btn-primary {
  color: #042f2e;
}

.btn-primary:hover {
  background: var(--teal-deep);
  color: #fff;
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--teal-dark);
  color: #042f2e;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}

.btn-warm {
  background: var(--warm);
  color: #fff;
}

.btn-warm:hover {
  background: #c2410c;
  color: #fff;
}

/* Cards / sections */
.section {
  margin-top: 48px;
}

.section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.section .sub {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 36rem;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card .card-actions {
  margin-top: 16px;
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.page-intro {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 36rem;
  font-size: 1.1rem;
}

/* Lists */
.prose ol,
.prose ul {
  padding-left: 1.25rem;
  color: var(--muted);
}

.prose li {
  margin: 10px 0;
}

.prose p {
  color: var(--muted);
  max-width: 40rem;
}

.note {
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--note-text);
  font-size: 0.95rem;
  margin: 24px 0 0;
}

.note a {
  color: var(--note-text);
  font-weight: 600;
}

code,
.path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0;
  margin-top: auto;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 14px;
}

.site-footer a:hover {
  color: var(--teal);
}

.accent-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warm);
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }
}
