/* ============================================================
   Leahy Consulting Documentation — hub styles
   Shared by the front page, product section pages, knowledge-base
   articles and the 404 page.

   The palette mirrors the Material for MkDocs "indigo" theme used
   by the product documentation sites (reference: MRP Orders
   Drilldown), so hub pages and doc sites read as one system.
   ============================================================ */

:root {
  --primary: #4051B5;
  --primary-dark: #303FA1;
  --primary-light: #5D6CC0;
  --accent: #526CFE;
  --accent-soft: #8C9EFF;
  --danger: #EF5350;
  --warn: #FFA726;
  --success: #66BB6A;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #1f2430;
  --text-muted: #5a6072;
  --border: #e0e3ef;
  --footer-bg: #1e2233;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(32, 41, 84, .07), 0 4px 14px rgba(32, 41, 84, .05);
  --shadow-hover: 0 4px 10px rgba(32, 41, 84, .10), 0 10px 28px rgba(32, 41, 84, .09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── Header ── */
.site-header {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(20, 26, 66, .25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #fff;
}
.brand:hover { text-decoration: none; color: #fff; }

.brand img { display: block; border-radius: 8px; }

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand-name small {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  opacity: .78;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-nav a {
  color: #fff;
  font-size: .85rem;
  opacity: .92;
  white-space: nowrap;
}
.header-nav a:hover { opacity: 1; color: #fff; }

/* ── Hero ── */
.hero {
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 78%, var(--primary-light) 100%);
  color: #fff;
  padding: 3.2rem 0 3.8rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* faint pulse line echoing the Pulse product mark */
  content: "";
  position: absolute;
  inset: auto 0 6%;
  height: 130px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 120' preserveAspectRatio='none'%3E%3Cpolyline points='0,90 120,60 200,78 320,24 440,66 560,10 640,40' stroke='%23ffffff' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='.14'/%3E%3C/svg%3E") center / cover no-repeat;
  pointer-events: none;
}
.hero h1 {
  margin: 0 0 .55rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.hero p {
  margin: 0;
  max-width: 47rem;
  font-size: 1.05rem;
  opacity: .88;
}
.hero .container { position: relative; z-index: 1; }

/* ── Sections ── */
.section { padding: 2.6rem 0 1rem; }
.section:last-of-type { padding-bottom: 2.8rem; }

.section > .container > h2 {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
  color: var(--primary-dark);
}
.section-lede {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 47rem;
}

/* ── Card grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem 1.1rem;
  box-shadow: var(--shadow);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
a.card { color: inherit; }
a.card:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-soft);
}

.card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.card-head img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.card h3 { margin: 0; font-size: 1.04rem; color: var(--primary-dark); line-height: 1.3; }

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

.card-cta {
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: .15rem;
}
a.card:hover .card-cta { color: var(--primary-dark); }

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .14rem .5rem;
  border-radius: 99px;
  white-space: nowrap;
}
.badge-soon { background: #fff3e0; color: #b26a00; border: 1px solid #ffe0b2; }
.badge-live { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* ── Breadcrumbs ── */
.breadcrumbs {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 1.4rem 0 0;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { margin: 0 .35rem; opacity: .6; }

/* ── Product page hero ── */
.product-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.3rem 0 .4rem;
}
.product-head img { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.product-head h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--primary-dark);
  line-height: 1.25;
}

.product-tagline {
  margin: 0 0 1.7rem;
  color: var(--text-muted);
  max-width: 50rem;
  font-size: 1rem;
}

/* ── Subsection headings on section/article pages ── */
.subhead {
  margin: 2.1rem 0 .8rem;
  font-size: 1.13rem;
  color: var(--primary-dark);
}
.subhead:first-of-type { margin-top: 1.6rem; }

/* ── Notice panel ── */
.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 0 0 1.6rem;
  box-shadow: var(--shadow);
  max-width: 50rem;
}
.notice h2 { margin: 0 0 .3rem; font-size: 1rem; color: var(--primary-dark); }
.notice p { margin: 0; font-size: .9rem; color: var(--text-muted); }
.notice-info { border-left-color: var(--primary); }

/* ── Link list ── */
.link-list {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  max-width: 50rem;
}
.link-list li + li { margin-top: .55rem; }
.link-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.link-list a:hover {
  text-decoration: none;
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-hover);
}
.link-list strong { color: var(--primary-dark); }
.link-list small { display: block; color: var(--text-muted); }

/* ── Article (knowledge-base) pages ── */
.article {
  max-width: 50rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.3rem 2.2rem;
  margin: 1.5rem 0 2.2rem;
}
.article > h1 {
  margin: 0 0 .4rem;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--primary-dark);
}
.article .article-meta {
  margin: 0 0 1.4rem;
  font-size: .82rem;
  color: var(--text-muted);
}
.article h2 {
  margin: 1.9rem 0 .6rem;
  font-size: 1.18rem;
  color: var(--primary-dark);
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--border);
}
.article h3 { margin: 1.4rem 0 .45rem; font-size: 1.02rem; color: var(--primary-dark); }
.article p, .article li { font-size: .93rem; }
.article ul, .article ol { padding-left: 1.35rem; }
.article li + li { margin-top: .25rem; }
.article code {
  background: #f0f1f8;
  border-radius: 4px;
  padding: .1em .4em;
  font-size: .85em;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.3rem;
  font-size: .88rem;
}
.article th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: .5rem .75rem;
}
.article td { padding: .45rem .75rem; border-bottom: 1px solid var(--border); }
.article tr:nth-child(even) td { background: #f7f8fc; }

.article .tip {
  border-left: 4px solid var(--primary);
  background: #f4f6ff;
  border-radius: 0 8px 8px 0;
  padding: .7rem 1rem;
  margin: 1rem 0;
  font-size: .9rem;
}
.article .tip strong { color: var(--primary-dark); }

/* ── 404 ── */
.error-page {
  text-align: center;
  padding: 5rem 1.25rem 6rem;
}
.error-page h1 { font-size: 3rem; margin: 0 0 .5rem; color: var(--primary-dark); }
.error-page p { color: var(--text-muted); margin: 0 0 1.5rem; }

.button {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: .55rem 1.2rem;
  border-radius: 8px;
  transition: background .15s;
}
.button:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

/* ── Footer ── */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, .75);
  margin-top: 2rem;
  padding: 1.6rem 0;
  font-size: .85rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: #fff; opacity: .85; }
.site-footer a:hover { opacity: 1; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.site-footer .fineprint {
  display: block;
  margin-top: .3rem;
  font-size: .74rem;
  opacity: .6;
  max-width: 46rem;
}

/* ── Contact table (services / support blocks) ── */
.contact-table td:first-child { white-space: nowrap; font-weight: 600; color: var(--primary-dark); }

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; }
  .hero { padding: 2.2rem 0 2.6rem; }
  .article { padding: 1.4rem 1.2rem 1.6rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
