/* ============================================================
   Diselma marketing site — shared styles
   Palette
   --pine    #10331F  deep green (structure, footer, headings on light)
   --green   #1F8A4C  Diselma green (primary actions, accents)
   --leaf    #35A968  hover / secondary green
   --mint    #E8F3EC  tinted sections, chips
   --paper   #FAFAF7  page background
   --ink     #17211B  body text
   --line    #D9E4DC  hairlines
   --lime    #A7DB7A  data-flow highlight
   ============================================================ */

:root {
  --pine: #10331F;
  --green: #1F8A4C;
  --leaf: #35A968;
  --mint: #E8F3EC;
  --paper: #FAFAF7;
  --ink: #17211B;
  --muted: #55655B;
  --line: #D9E4DC;
  --lime: #A7DB7A;
  --radius: 10px;
  --maxw: 1120px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16.5px;
}

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

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--pine); line-height: 1.12; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.18rem; font-weight: 700; }

p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--leaf); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }

/* pipeline eyebrow labels */
.pipe {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--green);
  background: var(--mint);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 14px;
}

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--pine); letter-spacing: -0.02em; }
.brand img { height: 34px; width: auto; display: block; }
footer.site .brand img { filter: brightness(0) invert(1); height: 30px; }
.brand .node {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--green);
  position: relative; flex: none;
}
.brand .node::before, .brand .node::after {
  content: ""; position: absolute; background: #fff; border-radius: 2px;
}
.brand .node::before { width: 12px; height: 3px; left: 7px; top: 8px; }
.brand .node::after  { width: 12px; height: 3px; left: 7px; top: 15px; }

nav.links { display: flex; align-items: center; gap: 26px; font-weight: 500; font-size: 0.98rem; }
nav.links a { color: var(--ink); }
nav.links a:hover, nav.links a.active { color: var(--green); }
nav.links a.btn-solid, nav.links a.btn-solid:hover { color: #fff; }

/* nav "Solutions" / "Platform" dropdowns */
.nav-drop { position: relative; }
.nav-drop > summary {
  list-style: none; cursor: pointer; color: var(--ink); user-select: none;
  display: flex; align-items: center; gap: 5px;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: "▾"; font-size: 0.65em; color: var(--muted); transition: transform 0.15s; }
.nav-drop:hover > summary, .nav-drop[open] > summary, .nav-drop.active > summary { color: var(--green); }
.nav-drop[open] > summary::after { transform: rotate(180deg); }
.nav-drop-panel {
  position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(16, 51, 31, 0.14);
  padding: 16px; display: grid; gap: 4px 24px;
  z-index: 60;
}
.nav-drop-panel.cols-2 { grid-template-columns: 1fr 1fr; width: min(560px, 90vw); }
.nav-drop-panel.cols-4 { grid-template-columns: repeat(4, 1fr); width: min(760px, 92vw); }
.nav-drop-group { display: flex; flex-direction: column; gap: 2px; }
/* flat-grid: each group's label/items become direct grid children so row 2
   aligns across columns regardless of how many lines row 1's text wraps to */
.nav-drop-panel.flat-grid > .nav-drop-group { display: contents; }
.nav-drop-panel.flat-grid > .nav-drop-group > .nav-drop-group-label { grid-row: 1; }
.nav-drop-panel.flat-grid > .nav-drop-group > a:nth-of-type(1) { grid-row: 2; }
.nav-drop-panel.flat-grid > .nav-drop-group > a:nth-of-type(2) { grid-row: 3; }
.nav-drop-panel.flat-grid > .nav-drop-viewall { grid-row: 4; }
.nav-drop-group-label {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); padding: 4px 12px 8px;
}
.nav-drop-panel a { display: block; padding: 9px 12px; border-radius: 8px; }
.nav-drop-panel a:hover, .nav-drop-panel a.active { background: var(--mint); }
.nav-drop-panel a strong { display: block; font-family: var(--font-display); color: var(--pine); font-size: 0.9rem; }
.nav-drop-panel a:hover strong, .nav-drop-panel a.active strong { color: var(--green); }
.nav-drop-panel a span { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 3px; line-height: 1.4; }
.nav-drop-viewall {
  grid-column: 1 / -1; margin-top: 6px; padding: 10px 12px 0 !important;
  border-top: 1px solid var(--line); border-radius: 0 !important;
  font-family: var(--font-display); font-weight: 700; font-size: 0.84rem; color: var(--green) !important;
}
.nav-drop-viewall:hover, .nav-drop-viewall.active { background: none !important; color: var(--leaf) !important; }

.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  border-radius: var(--radius); padding: 11px 22px; font-size: 0.98rem;
  border: 2px solid var(--green); transition: background 0.15s, color 0.15s;
}
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn-ghost { color: var(--green); background: transparent; }
.btn-ghost:hover { background: var(--mint); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }

.menu-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--pine); cursor: pointer; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--green); }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .actions { margin-top: 28px; }
.cta-band .actions { justify-content: center; }
.hero .fineprint { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }

/* animated flow diagram */
.flow-svg { width: 100%; height: auto; }
.flow-svg .wire { stroke: var(--line); stroke-width: 2; fill: none; }
.flow-svg .pulse {
  stroke: var(--green); stroke-width: 2.5; fill: none;
  stroke-dasharray: 10 130;
  animation: flowdash 3.2s linear infinite;
}
.flow-svg .pulse.d2 { animation-delay: 1.1s; stroke: var(--lime); }
.flow-svg .pulse.d3 { animation-delay: 2.2s; }
@keyframes flowdash { to { stroke-dashoffset: -140; } }
.flow-svg text { font-family: var(--font-mono); font-size: 11.5px; fill: var(--ink); }
.flow-svg .boxlabel { font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.flow-svg .core { fill: var(--pine); }
.flow-svg .coretext { fill: #fff; }
.flow-svg .node-box { fill: #fff; stroke: var(--line); }

/* ---------- sections ---------- */
section.band { padding: 70px 0; }
section.band.tint { background: var(--mint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.band.dark { background: var(--pine); }
section.band.dark h2, section.band.dark h3 { color: #fff; }
section.band.dark p { color: #C9DACF; }

.sec-head { max-width: 46rem; margin-bottom: 40px; }
.sec-head p { color: var(--muted); margin-top: 10px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card.code-card { min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
.card .pipe { margin-bottom: 12px; }

.tint .card { background: #fff; }

/* platform tiles */
.tile { display: block; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.tile:hover { border-color: var(--green); transform: translateY(-2px); color: inherit; }
.tile .tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.tile ul { margin: 12px 0 0 0; list-style: none; }
.tile ul li { font-size: 0.9rem; color: var(--muted); padding: 3px 0 3px 20px; position: relative; }
.tile ul li::before { content: "→"; position: absolute; left: 0; color: var(--green); font-family: var(--font-mono); }
.tile .more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--green); font-size: 0.92rem; }

/* capability lists on platform pages */
.cap-section { padding: 46px 0; border-bottom: 1px solid var(--line); }
.cap-section:last-of-type { border-bottom: 0; }
.cap-grid { display: grid; grid-template-columns: 260px 1fr; gap: 34px; }
.cap-grid .side h3 { position: sticky; top: 92px; }
.cap-grid .side .pipe { display: inline-block; }
.caps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.caps li {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px 12px 40px; position: relative; font-size: 0.95rem;
}
.caps li::before {
  content: "✓"; position: absolute; left: 14px; top: 11px;
  color: var(--green); font-weight: 700;
}
.caps li strong { display: block; font-family: var(--font-display); font-size: 0.97rem; color: var(--pine); }
.caps li span { color: var(--muted); font-size: 0.88rem; }

/* page hero (interior pages) */
.page-hero { padding: 60px 0 44px; border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-top: 12px; }
.crumbs { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.plan {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; display: flex; flex-direction: column;
}
.plan.featured { border: 2px solid var(--green); position: relative; }
.plan.featured .flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #fff; font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan.custom { background: var(--pine); border-color: var(--pine); }
.plan.custom h3, .plan.custom .price { color: #fff; }
.plan.custom .per, .plan.custom .who { color: #A9C4B2; }
.plan.custom li { color: #DCE9E0; }
.plan.custom li::before { color: var(--lime); }
.plan h3 { font-size: 1.25rem; }
.plan .who { font-size: 0.85rem; color: var(--muted); min-height: 42px; margin-top: 4px; }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 2.15rem; color: var(--pine); margin-top: 14px; letter-spacing: -0.02em; }
.plan .price sup { font-size: 1rem; font-weight: 600; }
.plan .per { font-size: 0.82rem; color: var(--muted); margin-bottom: 18px; }
.plan ul { list-style: none; margin: 0 0 24px; flex: 1; }
.plan ul li { padding: 6px 0 6px 24px; position: relative; font-size: 0.92rem; border-bottom: 1px dashed var(--line); }
.plan ul li:last-child { border-bottom: 0; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.plan .btn { text-align: center; }

.switch { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; width: max-content; margin: 24px 0 36px; background:#fff; }
.switch button { border: 0; background: transparent; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; padding: 9px 20px; cursor: pointer; color: var(--muted); }
.switch button.on { background: var(--green); color: #fff; }

/* comparison table */
table.compare { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.93rem; }
table.compare th, table.compare td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.compare thead th { background: var(--pine); color: #fff; font-family: var(--font-display); font-weight: 700; }
table.compare tbody th { font-weight: 600; color: var(--pine); width: 22%; }
table.compare td.hl { background: var(--mint); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* FAQ */
details.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px; }
details.faq summary { font-family: var(--font-display); font-weight: 700; color: var(--pine); cursor: pointer; }
details.faq p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

/* CTA band */
.cta-band { text-align: center; padding: 80px 0; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { margin-bottom: 26px; }

/* footer */
footer.site { background: var(--pine); color: #B9CFC1; padding: 54px 0 36px; font-size: 0.9rem; }
footer.site .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 26px; }
footer.site h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
footer.site a { color: #B9CFC1; display: block; padding: 3px 0; }
footer.site a:hover { color: var(--lime); }
footer.site .brand { color: #fff; margin-bottom: 10px; }
footer.site .legal { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 36px; padding-top: 20px; font-size: 0.8rem; color: #8FAB99; }

/* logo strip */
.logos { display: flex; flex-wrap: wrap; gap: 12px 14px; }
.logos span {
  font-family: var(--font-mono); font-size: 0.82rem; background: #fff;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; color: var(--muted);
}

/* steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step { counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); color: var(--green); font-size: 0.85rem;
  display: block; margin-bottom: 8px;
}
.step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* ---------- connector directory ---------- */
.conn-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 8px 0 6px; }
.conn-search input {
  width: 100%; max-width: 360px; padding: 11px 18px; border: 1px solid var(--line);
  border-radius: 999px; font-family: var(--font-body); font-size: 0.95rem; background: #fff; color: var(--ink);
}
.conn-search input:focus-visible { outline: 2px solid var(--leaf); border-color: var(--leaf); }
.conn-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.conn-filters button {
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.conn-filters button:hover { border-color: var(--green); color: var(--green); }
.conn-filters button.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.conn-jump { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 18px 0 38px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.conn-jump a { font-family: var(--font-mono); font-size: 0.76rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--muted); }
.conn-jump a:hover { color: var(--green); border-color: var(--green); }

.conn-section { margin-bottom: 46px; scroll-margin-top: 88px; }
.conn-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.conn-section-head h3 { color: var(--pine); }
.conn-section-head .count {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
  background: var(--mint); border: 1px solid var(--line); border-radius: 999px; padding: 2px 11px;
}
.conn-grid { column-count: 1; column-gap: 18px; }
@media (min-width: 640px) { .conn-grid { column-count: 2; } }
@media (min-width: 980px) { .conn-grid { column-count: 3; } }
.conn-card {
  break-inside: avoid; background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 15px 17px; margin: 0 0 14px;
}
.conn-card h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; color: var(--pine); margin-bottom: 5px; letter-spacing: -0.01em; }
.conn-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.conn-empty { display: none; text-align: center; color: var(--muted); padding: 50px 0; font-size: 0.98rem; }
.conn-empty.show { display: block; }

/* ---------- contact form ---------- */
.contact-form {
  display: flex; flex-direction: column; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--pine); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 400; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; background: var(--paper);
}
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--leaf); border-color: var(--leaf); }
.contact-form textarea { resize: vertical; min-height: 110px; font-family: inherit; }
.contact-form button { align-self: flex-start; }

/* responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .cap-grid .side h3 { position: static; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2, .steps, .plans, .caps { grid-template-columns: 1fr; }
  nav.links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; padding: 18px 24px; align-items: flex-start; gap: 16px; }
  nav.links.open { display: flex; }
  .menu-toggle { display: block; }
  .nav-drop { width: 100%; }
  .nav-drop-panel {
    position: static; transform: none; width: auto; margin-top: 10px;
    box-shadow: none; border: 0; padding: 0 0 0 4px; grid-template-columns: 1fr; gap: 0;
  }
  .nav-drop-group { margin-bottom: 8px; }
  .nav-drop-group-label { padding: 4px 0 4px; }
  .nav-drop-panel a { padding: 8px 0; }
  .nav-drop-panel.flat-grid > .nav-drop-group { display: flex; flex-direction: column; }
  .nav-drop-panel.flat-grid > .nav-drop-group > .nav-drop-group-label,
  .nav-drop-panel.flat-grid > .nav-drop-group > a { grid-row: auto; }
}
