/* ═══════════════════════════════════════════════════════════════
   ORBTI Product / Service Pages — Shared Styles
   Extends design-system/main.css for individual product pages.
   Used by: Core, Pulse, Horizon, CRM, Academy
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reuse nav dropdown styles from landing ─── */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: var(--space-3xs); cursor: pointer; }
.nav-chevron { width: 10px; height: 6px; transition: transform var(--duration-base) var(--ease-default); }
.nav-dropdown-trigger[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + var(--space-xs)); left: 50%; transform: translateX(-50%);
  min-width: 280px; padding: var(--space-2xs); background: var(--color-surface-deep);
  border: 1px solid var(--color-border-subtle); border-radius: var(--radius-l);
  box-shadow: var(--shadow-xl); opacity: 0; visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity var(--duration-base) var(--ease-default), visibility var(--duration-base) var(--ease-default), transform var(--duration-base) var(--ease-snappy);
  z-index: var(--z-dropdown);
}
.nav-dropdown-trigger[aria-expanded="true"] + .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-item { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-xs) var(--space-s); border-radius: var(--radius-m); color: var(--color-text-secondary); transition: background-color var(--duration-fast) var(--ease-default), color var(--duration-fast) var(--ease-default); }
.nav-dropdown-item:hover { background: var(--color-coral-bg); color: var(--color-text); }
.nav-dropdown-icon { width: 24px; height: 24px; flex-shrink: 0; }
.nav-dropdown-title { display: block; font-size: var(--text-body-s); font-weight: var(--weight-semibold); color: var(--color-text); }
.nav-dropdown-desc { display: block; font-size: var(--text-body-xs); color: var(--color-text-muted); }

/* ─── Button arrow ─── */
.btn-arrow { display: inline-block; transition: transform var(--duration-base) var(--ease-snappy); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ─── Section narrow ─── */
.section-narrow { max-width: var(--container-narrow); margin-inline: auto; }

/* ─── Footer Legal ─── */
.footer-legal { display: flex; gap: var(--space-2xs); align-items: center; }
.footer-legal a { color: var(--color-text-faint); font-size: var(--text-body-xs); transition: color var(--duration-fast) var(--ease-default); }
.footer-legal a:hover { color: var(--color-coral-sunset); }
.footer-legal span { color: var(--color-text-faint); font-size: var(--text-body-xs); }


/* ═══════════════════════════════════════════════════
   PRODUCT HERO — Simple dark with icon + split text
   ═══════════════════════════════════════════════════ */

.product-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-surface-deep);
  background: var(--gradient-hero);
}

.product-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-2xl)) var(--site-margin) var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

/* Alternative: single-column hero with section-inner */
.product-hero .section-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: calc(var(--nav-height) + var(--space-2xl));
  padding-bottom: var(--space-2xl);
}

.product-hero-content {
  max-width: 720px;
}

.product-hero-content .product-hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  align-items: flex-start;
}

.product-hero-content .product-hero-icon {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 30px rgba(232, 112, 75, 0.2));
}

.product-hero-content .display-xl {
  font-size: clamp(2.5rem, 1.8rem + 2.5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: var(--tracking-display);
}

.product-hero-content .body-xl {
  color: var(--color-text-secondary);
  max-width: 540px;
}

.product-hero-content .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.product-hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  align-items: flex-start;
}

.product-hero-text .pill {
  margin-bottom: var(--space-3xs);
}

.product-hero-headline {
  font-size: clamp(2.5rem, 1.8rem + 2.5vw, 4.5rem);
  font-weight: var(--weight-black);
  line-height: 1.08;
  letter-spacing: var(--tracking-display);
  color: var(--color-text);
  margin: 0;
}

.product-hero-subtitle {
  font-size: var(--text-body-xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0;
}

.product-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.product-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-hero-icon {
  width: clamp(200px, 25vw, 320px);
  height: clamp(200px, 25vw, 320px);
  opacity: 0.9;
  filter: drop-shadow(0 0 40px rgba(232, 112, 75, 0.15));
}

.product-hero-image {
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.product-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}


/* ═══════════════════════════════════════════════════
   PROBLEM SECTION — Provocative text block
   ═══════════════════════════════════════════════════ */

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


/* ═══════════════════════════════════════════════════
   HOW IT WORKS — 3 blocks timeline
   ═══════════════════════════════════════════════════ */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
  margin-top: var(--space-xl);
}

.how-block {
  position: relative;
  padding: var(--space-l) 0;
}

.how-block::before {
  content: attr(data-step);
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-display-m);
  font-weight: var(--weight-black);
  color: var(--color-coral-sunset);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: var(--space-s);
}

.how-block-title {
  font-size: var(--text-body-l);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
}

.how-block-text {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}


/* ═══════════════════════════════════════════════════
   FEATURES — Tabs with auto-rotate or grid
   ═══════════════════════════════════════════════════ */

.features-tabs {
  display: flex;
  flex-direction: column;
  gap: var(--space-l);
  margin-top: var(--space-xl);
}

.features-tab-nav {
  display: flex;
  gap: var(--space-3xs);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: var(--space-2xs);
}

.features-tab-btn {
  position: relative;
  padding: var(--space-xs) var(--space-s);
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-default);
}

.features-tab-btn:hover,
.features-tab-btn.active {
  color: var(--color-coral-sunset);
}

.features-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: calc(-1 * var(--space-2xs) - 1px);
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-coral-sunset);
}

.features-tab-panel {
  display: none;
  animation: tab-fade-in var(--duration-base) var(--ease-default);
}

.features-tab-panel.active {
  display: block;
}

@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.features-tab-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-l);
  align-items: start;
}

.features-tab-text h3 {
  font-size: var(--text-display-s);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.features-tab-text p {
  font-size: var(--text-body-m);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}

.features-tab-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.features-tab-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2xs);
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}

.features-tab-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-coral-sunset);
  flex-shrink: 0;
  margin-top: 0.55em;
}


/* ═══════════════════════════════════════════════════
   USE CASES — Card grid
   ═══════════════════════════════════════════════════ */

.usecase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.usecase-card {
  padding: var(--space-l);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-l);
  background: var(--color-surface-base);
  transition: border-color var(--duration-base) var(--ease-default);
}

.usecase-card:hover {
  border-color: var(--color-coral-sunset);
}

.usecase-card h4 {
  font-size: var(--text-body-l);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
}

.usecase-card p {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}


/* ═══════════════════════════════════════════════════
   METRICS — Stats grid
   ═══════════════════════════════════════════════════ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.metric-card {
  text-align: center;
  padding: var(--space-l) var(--space-m);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-l);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: var(--text-display-m);
  font-weight: var(--weight-bold);
  color: var(--color-coral-sunset);
  line-height: 1;
}

.metric-label {
  font-size: var(--text-body-s);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-top: var(--space-2xs);
}

.metric-context {
  font-size: var(--text-body-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3xs);
}


/* ═══════════════════════════════════════════════════
   PRICING — Cards
   ═══════════════════════════════════════════════════ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.pricing-card {
  padding: var(--space-l);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-l);
  background: var(--color-surface-base);
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: var(--color-coral-sunset);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Mais popular';
  position: absolute;
  top: calc(-1 * var(--space-2xs));
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-surface-deep);
  background: var(--color-coral-sunset);
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-m);
}

.pricing-name {
  font-size: var(--text-body-l);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3xs);
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: var(--text-display-s);
  font-weight: var(--weight-bold);
  color: var(--color-coral-sunset);
  margin-bottom: var(--space-xs);
}

.pricing-desc {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
  margin-bottom: var(--space-m);
  flex: 1;
}


/* ═══════════════════════════════════════════════════
   CROSS NAVIGATION — Links to sibling products
   ═══════════════════════════════════════════════════ */

.cross-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  flex-wrap: wrap;
  padding: var(--space-m) 0;
}

.cross-nav-label {
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.cross-nav a {
  color: var(--color-text-secondary);
  font-size: var(--text-body-s);
  transition: color var(--duration-fast) var(--ease-default);
  padding: var(--space-3xs) var(--space-xs);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-m);
}

.cross-nav a:hover {
  color: var(--color-coral-sunset);
  border-color: var(--color-coral-sunset);
}


/* ═══════════════════════════════════════════════════
   CTA FINAL (reused pattern)
   ═══════════════════════════════════════════════════ */

.cta-product {
  border-top: 1px solid var(--color-border-subtle);
}


/* ═══════════════════════════════════════════════════
   PROBLEM CARDS (CRM page)
   ═══════════════════════════════════════════════════ */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.problem-card {
  padding: var(--space-l);
  border-left: 3px solid var(--color-coral-sunset);
  background: var(--color-surface-base);
  border-radius: 0 var(--radius-l) var(--radius-l) 0;
}

.problem-card h4 {
  font-size: var(--text-body-l);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
}

.problem-card p {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}


/* ═══════════════════════════════════════════════════
   BEFORE/AFTER TABLE (Academy page)
   ═══════════════════════════════════════════════════ */

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-l);
}

.comparison-table th {
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-xs) var(--space-s);
  border-bottom: 1px solid var(--color-border-subtle);
}

.comparison-table td {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  padding: var(--space-xs) var(--space-s);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.comparison-table td:last-child {
  color: var(--color-coral-sunset);
  font-weight: var(--weight-semibold);
}


/* ═══════════════════════════════════════════════════
   FORMATS GRID (Academy page)
   ═══════════════════════════════════════════════════ */

.format-card {
  padding: var(--space-l);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-l);
  background: var(--color-surface-base);
}

.format-duration {
  font-family: var(--font-mono);
  font-size: var(--text-label-m);
  color: var(--color-coral-sunset);
  letter-spacing: var(--tracking-mono);
  margin-bottom: var(--space-2xs);
}

.format-card h4 {
  font-size: var(--text-body-l);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2xs);
}

.format-card p {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}

.format-ideal {
  font-family: var(--font-mono);
  font-size: var(--text-label-s);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-label);
  margin-top: var(--space-s);
}


/* ═══════════════════════════════════════════════════
   FEATURES GRID (alternative to tabs, CRM/Academy)
   ═══════════════════════════════════════════════════ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-m);
  margin-top: var(--space-xl);
}

.feature-block {
  padding: var(--space-l);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-l);
  transition: border-color var(--duration-base) var(--ease-default);
}

.feature-block:hover {
  border-color: rgba(232, 112, 75, 0.3);
}

.feature-block h4 {
  font-size: var(--text-body-l);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3xs);
}

.feature-block p {
  font-size: var(--text-body-s);
  color: var(--color-text-secondary);
  line-height: var(--leading-body);
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .product-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-height) + var(--space-xl));
  }

  .product-hero-text {
    align-items: center;
  }

  .product-hero-actions {
    justify-content: center;
  }

  .product-hero-visual {
    order: -1;
  }

  .product-hero-icon {
    width: 160px;
    height: 160px;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .features-tab-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}
