/* HiSRE marketing site — plain CSS, no build step. Palette mirrors the
   product dashboard (slate neutrals + emerald accent) so the marketing
   site and the app feel like the same product. */

:root {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --accent: #059669;
  --accent-strong: #047857;
  --accent-bg: #d1fae5;
  --accent-glow: rgba(16, 185, 129, 0.18);
  --red: #dc2626;
  --red-bg: #fee2e2;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;
    --bg-elevated: #0f172a;
    --bg-subtle: #0b1220;
    --border: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --accent: #34d399;
    --accent-strong: #6ee7b7;
    --accent-bg: #022c22;
    --accent-glow: rgba(52, 211, 153, 0.14);
    --red: #f87171;
    --red-bg: rgba(127, 29, 29, 0.35);
    --amber: #fbbf24;
    --amber-bg: rgba(120, 53, 15, 0.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

/* Grid/flex items default to min-width:auto, which stops text content from
   shrinking below its natural (unbroken) width -- causes real overflow at
   narrow viewports otherwise, since the item refuses to size down to its
   grid track. */
.hero-grid > *,
.problem-grid > *,
.feature-grid > *,
.step-grid > * {
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 10px 0;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child {
  border-bottom: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 0.98rem;
}

/* ---------- sections ---------- */

section {
  padding: 96px 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 700;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
}

.section-head .lede {
  margin: 0 auto;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -160px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
  }
}

.hero-copy {
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- mock dashboard ---------- */

.mock {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.mock-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mock-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  margin-left: 5px;
}

.mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mock-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-subtle);
}

.mock-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mock-name {
  font-size: 0.78rem;
  font-weight: 600;
}

.pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pill-run {
  background: var(--accent-bg);
  color: var(--accent-strong);
}

.pill-stop {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-faint);
}

.pill-warn {
  background: var(--amber-bg);
  color: var(--amber);
}

.mock-sub {
  font-size: 0.66rem;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.spark {
  width: 100%;
  height: 28px;
  display: block;
}

.spark path.line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
}

.spark path.area {
  fill: var(--accent);
  opacity: 0.12;
  stroke: none;
}

/* ---------- problem ---------- */

.problem-grid,
.feature-grid,
.step-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .step-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.problem-card .icon,
.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--red-bg);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card .icon {
  background: var(--accent-bg);
  color: var(--accent-strong);
}

.card h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  font-weight: 650;
}

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

.bg-subtle-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- how it works ---------- */

.step {
  position: relative;
  padding-top: 8px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.install-line {
  margin-top: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: nowrap;
}

.install-line span {
  color: var(--accent-strong);
}

/* ---------- feature mock snippets ---------- */

.feature-mock {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  padding: 10px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.feature-mock code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
}

/* ---------- demo / calendly ---------- */

.demo-shell {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  max-width: 760px;
  margin: 0 auto;
}

.calendly-inline-widget {
  min-width: 280px;
  height: 700px;
}

.demo-fallback {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.footer-row .brand {
  font-size: 0.95rem;
}

/* ---------- responsive nav ---------- */

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  /* Two nav-cta buttons no longer fit alongside the brand + toggle at
     this width -- the mobile dropdown has its own full-width copies. */
  .nav-cta .btn {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  section {
    padding: 64px 0;
  }
  .hero {
    padding: 56px 0 40px;
  }
}

.nav-mobile-cta {
  width: 100%;
  margin-top: 6px;
  text-align: center;
}

/* ---------- blog ---------- */

.blog-hero {
  padding: 64px 0 40px;
  text-align: center;
}

.blog-list {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  padding-bottom: 80px;
}

@media (min-width: 720px) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.blog-date {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 10px;
  display: block;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
}

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

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.article-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
}

.article-back:hover {
  color: var(--text);
}

.article header {
  margin-bottom: 40px;
}

.article h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.article .blog-date {
  margin-bottom: 16px;
}

.article-body p {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 22px;
}

.article-body h2 {
  font-size: 1.4rem;
  margin: 40px 0 16px;
}

.article-body ul {
  color: var(--text-muted);
  font-size: 1.02rem;
  padding-left: 22px;
  margin: 0 0 22px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-cta {
  margin-top: 48px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  text-align: center;
}

.article-cta p {
  margin: 0 0 16px;
  color: var(--text-muted);
}
