/* ═══════════════════════════════════════════════════════
   WORKFLOWS PAGE — vertical-specific n8n examples
   Clean editorial layout. The canvas is the hero;
   everything around it is typographic + minimal.
   ═══════════════════════════════════════════════════════ */

.page-workflows {
  background: #0a0a0b;
  color: var(--ink);
  min-height: 100vh;
}

.page-workflows main {
  position: relative;
  z-index: 2;
}

/* ─── Nav ───────────────────────────────────────────── */

.nav--workflows {
  background: rgba(10, 10, 11, 0.82);
  border-bottom: 1px solid rgba(244, 241, 236, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-back {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  justify-self: end;
  transition: color 0.25s ease;
}

.nav-back:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */

.wf-hero {
  padding: 11rem 2rem 5rem;
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.wf-hero__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  margin-bottom: 1.75rem;
}

.wf-hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

.wf-hero__title em {
  color: var(--ink-muted);
  font-style: italic;
}

.wf-hero__lede {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-muted);
  font-weight: 300;
}

.wf-hero__lede strong {
  color: var(--ink);
  font-weight: 500;
}

/* ─── Pillars — slim inline row ─────────────────────── */

.wf-hero__pillars {
  list-style: none;
  margin: 4rem auto 0;
  padding: 2.5rem 0 0;
  border-top: 1px solid rgba(244, 241, 236, 0.06);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 54rem;
  text-align: left;
}

.wf-hero__pillars li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wf-pillar__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.wf-hero__pillars li strong {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: -0.005em;
}

.wf-hero__pillars li span:not(.wf-pillar__num) {
  font-size: 0.825rem;
  line-height: 1.6;
  color: var(--ink-muted);
  font-weight: 300;
}

@media (max-width: 800px) {
  .wf-hero__pillars { grid-template-columns: 1fr; gap: 2rem; }
}

/* ═══════════════════════════════════════════════════════
   TABS — sticky, minimal
   ═══════════════════════════════════════════════════════ */

.wf-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 1rem 1rem;
  margin: 4rem 0 0;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(244, 241, 236, 0.05);
  border-bottom: 1px solid rgba(244, 241, 236, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.wf-tabs::-webkit-scrollbar { display: none; }

.wf-tab {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color 0.25s ease;
  position: relative;
}

.wf-tab:hover { color: var(--ink); }

.wf-tab.is-active {
  color: var(--ink);
}

.wf-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 1.5rem;
  right: 1.5rem;
  height: 1px;
  background: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   WORKFLOW SECTION
   ═══════════════════════════════════════════════════════ */

.wf {
  padding: 10rem 2rem 10rem;
  max-width: 88rem;
  margin: 0 auto;
  position: relative;
}

.wf + .wf::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 4rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(244, 241, 236, 0.18) 50%,
    transparent 100%
  );
  transform: translateX(-50%) translateY(-50%);
}

.wf + .wf {
  border-top: 1px solid rgba(244, 241, 236, 0.04);
}

/* ─── Head — typographic, no boxes ──────────────────── */

.wf-head {
  max-width: 52rem;
  margin: 0 auto 4rem;
}

.wf-vert {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.wf-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.wf-summary {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

/* ─── Meta — flat typographic stats, not boxed ──────── */

.wf-meta {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 3rem;
  justify-content: start;
  padding: 1.75rem 0 0;
  border-top: 1px solid rgba(244, 241, 236, 0.06);
  margin: 0;
}

.wf-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wf-meta dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

.wf-meta dd {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}

@media (max-width: 720px) {
  .wf-meta {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 2rem;
  }
}

/* ─── Disclaimer — subtle footnote, not alert ───────── */

.wf-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  max-width: 52rem;
  margin: 0 auto 2.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--ink-dim);
  font-style: italic;
}

.wf-disclaimer strong {
  color: var(--ink-muted);
  font-weight: 400;
  font-style: normal;
}

.wf-disclaimer__dot {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* ─── Canvas — framed, spacious ─────────────────────── */

.wf-canvas-wrap {
  position: relative;
  border: 1px solid rgba(244, 241, 236, 0.06);
  background:
    radial-gradient(ellipse at center, rgba(212, 55, 40, 0.03) 0%, transparent 65%),
    linear-gradient(180deg, #0d0d11 0%, #08080b 100%);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 241, 236, 0.12) transparent;
}

.wf-canvas-wrap::-webkit-scrollbar { height: 6px; }
.wf-canvas-wrap::-webkit-scrollbar-track { background: transparent; }
.wf-canvas-wrap::-webkit-scrollbar-thumb {
  background: rgba(244, 241, 236, 0.12);
  border-radius: 3px;
}

.wf-canvas {
  min-width: 1400px;
  height: 720px;
  position: relative;
}

.wf-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── SVG node styling (unchanged — only touch layout) ─ */

.wf-node { cursor: pointer; }

.wf-node-tile {
  fill: #14141c;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.wf-node:hover .wf-node-tile {
  filter: drop-shadow(0 0 20px var(--node-color, rgba(212, 55, 40, 0.7)));
}

.wf-node-icon { pointer-events: none; }

.wf-node-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
}

.wf-node-op {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-muted);
  text-anchor: middle;
}

.wf-node-key {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-anchor: start;
}

.wf-edge {
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

.wf-edge-glow {
  fill: none;
  stroke-width: 6;
  opacity: 0.18;
  filter: blur(2px);
  pointer-events: none;
}

.wf-edge-dashed {
  stroke-dasharray: 6, 5;
  opacity: 0.55;
}

.wf-edge-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--ink-dim);
  text-anchor: middle;
  pointer-events: none;
}

.wf-spark {
  pointer-events: none;
  filter: drop-shadow(0 0 4px currentColor);
}

.wf-branch-bg {
  fill: rgba(244, 241, 236, 0.02);
  stroke: rgba(244, 241, 236, 0.06);
  stroke-dasharray: 4, 4;
}

.wf-branch-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  fill: var(--ink-dim);
  text-anchor: start;
}

/* ─── Tooltip ───────────────────────────────────────── */

.wf-tip {
  position: fixed;
  pointer-events: none;
  padding: 0.65rem 0.85rem;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(244, 241, 236, 0.12);
  border-left: 2px solid var(--accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink);
  max-width: 18rem;
  line-height: 1.4;
  z-index: 100;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wf-tip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wf-tip strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

/* ═══════════════════════════════════════════════════════
   BOTTOM CTA
   ═══════════════════════════════════════════════════════ */

.wf-cta {
  padding: 9rem 2rem 7rem;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  border-top: 1px solid rgba(244, 241, 236, 0.05);
}

.wf-cta__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.wf-cta__title em {
  color: var(--accent);
  font-style: italic;
}

.wf-cta__lede {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 3rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Assurances — clean inline row ─────────────────── */

.wf-cta__assurances {
  list-style: none;
  margin: 0 auto 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(244, 241, 236, 0.06);
  border-bottom: 1px solid rgba(244, 241, 236, 0.06);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  max-width: 38rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 300;
}

.wf-cta__assurances li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  line-height: 1.5;
}

.wf-cta__check {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid rgba(92, 228, 140, 0.35);
  color: #5ce48c;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 2px;
  background: transparent;
}

@media (max-width: 640px) {
  .wf-cta__assurances { grid-template-columns: 1fr; }
}

.wf-cta__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.wf-cta__back-row {
  margin-top: 2.5rem;
  text-align: center;
}

.wf-cta__back {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.25s ease;
}

.wf-cta__back:hover { color: var(--ink); }

/* ─── Ghost CTA variant ─────────────────────────────── */

.examples-cta--ghost {
  border-color: rgba(244, 241, 236, 0.18) !important;
  background: linear-gradient(
    135deg,
    rgba(244, 241, 236, 0.04) 0%,
    rgba(244, 241, 236, 0.01) 100%
  ) !important;
}
.examples-cta--ghost .examples-cta__arrow { color: var(--ink-muted); }
.examples-cta--ghost:hover {
  border-color: rgba(244, 241, 236, 0.45) !important;
  background: linear-gradient(
    135deg,
    rgba(244, 241, 236, 0.08) 0%,
    rgba(244, 241, 236, 0.02) 100%
  ) !important;
  box-shadow: 0 18px 40px -22px rgba(244, 241, 236, 0.25) !important;
}
.examples-cta--ghost:hover .examples-cta__arrow { color: var(--ink); }

/* ─── Toast ─────────────────────────────────────────── */

.sf-toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translate(-50%, 14px);
  padding: 0.85rem 1.25rem;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(244, 241, 236, 0.12);
  border-left: 2px solid var(--accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
}
.sf-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ─── Reveal-on-scroll ──────────────────────────────── */

.wf-canvas-wrap, .wf-head, .wf-cta {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.wf-canvas-wrap.is-visible,
.wf-head.is-visible,
.wf-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ────────────────────────────────────── */

@media (max-width: 900px) {
  .wf { padding: 5rem 1.5rem 4rem; }
  .wf-hero { padding: 8rem 1.5rem 4rem; }
  .nav--workflows { padding: 1rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wf-canvas-wrap, .wf-head, .wf-cta {
    opacity: 1;
    transform: none;
  }
}
