/**
 * CobWeb CRM — public feature pages (/features/{slug}). Extends marketing-home-v2.css (tokens, .hv-*).
 * The hero demo itself is styled by addon-landing.css (.lp-*), shared with the in-app add-on page.
 */

/* —— Hero —— */
/* Hidden before first paint while GSAP loads (flag set in v2/_head.php); the intro reveals them. */
.hv-motion [data-ft-hero],
.hv-motion [data-ft-stage] { visibility: hidden; }

.hv-ft-hero {
  position: relative;
  padding-block: 56px 72px;
  background:
    radial-gradient(45% 60% at 15% 10%, rgba(47, 91, 234, 0.08), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--hv-tint) 100%);
  border-bottom: 1px solid var(--hv-line);
  overflow: hidden;
}
.hv-ft-hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1100px) {
  .hv-ft-hero-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.2fr); gap: 56px; }
}
.hv-ft-crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 0.875rem; color: var(--hv-muted); }
.hv .hv-ft-crumbs a { color: var(--hv-muted); text-decoration: none; }
.hv .hv-ft-crumbs a:hover { color: var(--hv-navy); }
.hv .hv-ft-title { max-width: 18ch; }
.hv-ft-accent { color: var(--hv-blue); }
.hv-ft-points { margin-top: 24px; }
.hv-ft-points li { font-size: 1rem; }
.hv-ft-hero .hv-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hv-ft-stage { position: relative; min-width: 0; padding-block: 24px; }
.hv-ft-stage::before {
  content: "";
  position: absolute;
  inset: 0 6% 0 -4%;
  border-radius: 28px;
  background: var(--hv-navy);
  transform: rotate(-2deg);
  opacity: 0.06;
}
.hv-ft-lp { position: relative; }
.hv-ft-lp .lp-demo { box-shadow: var(--hv-shadow-lg); border-color: var(--hv-line-strong); }
.hv-ft-lp .lp-steps { margin-top: 16px; }
.hv-ft-lp .lp-step { font-size: 0.875rem; }

.hv-ft-chip {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 8px;
  padding-inline: 10px 14px;
  background: #fff;
  border: 1px solid var(--hv-line);
  border-radius: 999px;
  box-shadow: var(--hv-shadow);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hv-navy-ink);
  white-space: nowrap;
  pointer-events: none;
}
.hv-ft-chip-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--hv-green-soft); color: var(--hv-green); }
.hv-ft-chip--1 { inset-block-start: 0; inset-inline-start: -12px; }
.hv-ft-chip--2 { inset-block-start: 0; inset-inline-end: 6%; }
.hv-ft-chip--2 .hv-ft-chip-icon { background: var(--hv-blue-soft); color: var(--hv-blue); }
.hv-ft-chip--3 { inset-block-end: 104px; inset-inline-start: -16px; }
.hv-ft-chip--3 .hv-ft-chip-icon { background: var(--hv-amber-soft); color: var(--hv-amber); }
@media (max-width: 1199px) { .hv-ft-chip--2 { inset-inline-end: 0; } }
@media (max-width: 767px) {
  .hv-ft-hero { padding-block: 32px 48px; }
  .hv-ft-stage { padding-block: 8px 0; }
  .hv-ft-stage::before { display: none; }
  .hv-ft-chip { display: none; }
  .hv-ft-hero .hv-hero-actions .hv-btn { flex: 1 1 100%; }
}

/* —— Before / after —— */
.hv-ft-compare { display: grid; gap: 16px; align-items: stretch; }
@media (min-width: 900px) {
  .hv-ft-compare { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 24px; }
}
.hv-ft-col { padding: 28px; border-radius: var(--hv-radius-lg); background: #fff; border: 1px solid var(--hv-line); }
.hv-ft-col h3 { margin: 0 0 20px; font-size: 1.125rem; }
.hv-ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hv-ft-col li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.0625rem; }
.hv-ft-mark { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; }
.hv-ft-col--before { color: var(--hv-muted); }
.hv-ft-col--before h3 { color: var(--hv-muted); }
.hv-ft-col--before .hv-ft-mark { background: #fdecea; color: #b42318; }
.hv-ft-col--after { border-color: var(--hv-navy); box-shadow: var(--hv-shadow); }
.hv-ft-col--after .hv-ft-mark { background: var(--hv-green-soft); color: var(--hv-green); }
.hv-ft-compare-arrow { display: grid; place-items: center; align-self: center; justify-self: center; width: 48px; height: 48px; border-radius: 50%; background: var(--hv-navy); color: #fff; }
@media (max-width: 899px) { .hv-ft-compare-arrow { transform: rotate(-90deg); } }
@media (max-width: 575px) { .hv-ft-col { padding: 20px; } }

/* —— How it works: steps on a line that fills on scroll —— */
.hv-ft-how-wrap { position: relative; }
.hv-ft-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; position: relative; }
.hv-ft-how-line { position: absolute; background: var(--hv-line); border-radius: 2px; overflow: hidden; }
.hv-ft-how-line i { position: absolute; inset: 0; background: var(--hv-blue); }
.hv-ft-how-step { position: relative; }
.hv-ft-how-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--hv-line-strong);
  color: var(--hv-navy);
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.hv-ft-how-step.is-on .hv-ft-how-node { border-color: var(--hv-blue); background: var(--hv-blue); color: #fff; }
.hv-ft-how-num { display: block; margin-top: 16px; font-size: 0.8125rem; font-weight: 600; color: var(--hv-blue); }
.hv .hv-ft-how-step h3 { margin: 4px 0 0; font-size: 1.1875rem; }
.hv-ft-how-step p { margin: 8px 0 0; color: var(--hv-muted); }
@media (min-width: 900px) {
  .hv-ft-how { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .hv-ft-how-line { inset-block-start: 27px; inset-inline: 28px calc(25% - 4px); height: 3px; }
  .hv-ft-how-line i { transform-origin: right center; }
}
@media (max-width: 899px) {
  .hv-ft-how-step { padding-inline-start: 76px; min-height: 56px; }
  .hv-ft-how-node { position: absolute; inset-inline-start: 0; inset-block-start: 0; }
  .hv-ft-how-num { margin-top: 0; }
  .hv-ft-how-line { inset-inline-start: 27px; inset-block: 28px 40px; width: 3px; }
  .hv-ft-how-line i { transform-origin: center top; }
}

/* —— Scenarios —— */
.hv-ft-scen { background: #fff; border: 1px solid var(--hv-line); border-radius: var(--hv-radius-lg); box-shadow: var(--hv-shadow); overflow: hidden; }
.hv-ft-scen-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--hv-line); background: var(--hv-tint); overflow-x: auto; scrollbar-width: none; }
.hv-ft-scen-tabs::-webkit-scrollbar { display: none; }
.hv-ft-scen-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 0 auto;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--hv-radius);
  background: transparent;
  color: var(--hv-muted);
  font: 600 0.9375rem/1.2 var(--hv-font);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.hv-ft-scen-tab:hover { color: var(--hv-navy); }
.hv-ft-scen-tab.is-active { background: #fff; border-color: var(--hv-line); color: var(--hv-navy); box-shadow: var(--hv-shadow-sm); }
.hv-ft-scen-tab:focus-visible { outline: 3px solid rgba(47, 91, 234, 0.35); outline-offset: 1px; }
.hv-ft-scen-timer { position: absolute; inset-inline: 12px; inset-block-end: 4px; height: 2px; border-radius: 1px; background: var(--hv-blue); transform: scaleX(0); transform-origin: right center; }
.hv-ft-scen-panel { display: grid; gap: 32px; padding: 32px; align-items: center; }
.hv-ft-scen-panel[hidden] { display: none; }
@media (min-width: 900px) {
  .hv-ft-scen-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 48px; }
}
@media (max-width: 575px) { .hv-ft-scen-panel { padding: 20px; } }
.hv .hv-ft-scen-copy h3 { margin: 0; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); line-height: 1.25; }
.hv-ft-scen-copy p { margin: 12px 0 0; font-size: 1.0625rem; color: var(--hv-muted); }
.hv .hv-ft-result {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--hv-radius);
  background: var(--hv-green-soft);
  color: var(--hv-navy-ink);
  font-weight: 600;
}
.hv-ft-result small { display: block; font-size: 0.75rem; font-weight: 600; color: var(--hv-green); }
.hv-ft-result-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--hv-green); }

.hv-ft-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
  padding: 20px;
  border-radius: var(--hv-radius-lg);
  background: #f2f5f0;
  border: 1px solid var(--hv-line);
  justify-content: center;
}
.hv-ft-feed .hv-bubble { font-size: 0.9375rem; }
.hv-ft-btnrow {
  align-self: flex-start;
  width: min(82%, 280px);
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
  color: #027eb5;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  box-shadow: var(--hv-shadow-sm);
}
.hv-ft-sys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--hv-line);
  color: var(--hv-navy);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}
.hv-ft-sys .hv-icon { color: var(--hv-blue); }
.hv-ft-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--hv-radius);
  background: #fff;
  border: 1px solid var(--hv-line);
  font-size: 0.9rem;
}
.hv-ft-row b, .hv-ft-row small { display: block; }
.hv-ft-row small { color: var(--hv-muted); font-size: 0.8125rem; }
.hv-ft-row-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--hv-radius-sm); background: var(--hv-blue-soft); color: var(--hv-blue); }

/* —— Good to know —— */
.hv-ft-know { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.hv-ft-know li { display: flex; gap: 12px; align-items: flex-start; color: var(--hv-text); }
.hv-ft-know .hv-icon { margin-top: 2px; color: var(--hv-blue); }

/* —— Related features —— */
.hv-ft-related { display: grid; gap: 12px; }
@media (min-width: 640px) { .hv-ft-related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hv-ft-related { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hv a.hv-ft-related-card { color: inherit; text-decoration: none; align-items: center; }
.hv-ft-related-card > span:nth-child(2) { flex: 1; min-width: 0; }
.hv-ft-related-card .hv-int-logo { color: var(--hv-blue); background: var(--hv-blue-soft); border-color: transparent; }
.hv-ft-related-arrow { color: var(--hv-muted); transition: transform 0.2s ease, color 0.2s ease; }
.hv-ft-related-card:hover .hv-ft-related-arrow { color: var(--hv-navy); transform: translateX(-3px); }

@media (prefers-reduced-motion: reduce) {
  .hv-ft-scen-timer { display: none; }
}
