/* ───────────────────────────────────────────────────────────────
   Hero — side-by-side text + Loom video
   ─────────────────────────────────────────────────────────────── */

.hero-section { padding-bottom: 80px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 64px;
}

.hero-video-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 30px 80px -30px rgba(15, 23, 42, 0.35),
    0 50px 120px -40px color-mix(in oklch, var(--accent), transparent 60%);
}
.hero-video iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.hero-video-caption {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

/* Old app-dashboard styles (kept in file but unused on hero now) */

.hero-app {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 20px 60px -25px rgba(15, 23, 42, 0.18),
    0 50px 100px -50px rgba(59, 130, 246, 0.25);
  text-align: left;
}

/* Window chrome */
.hero-app-chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E5E7EB;
}
.hero-app-dots { display: flex; gap: 6px; }
.hero-app-dots span:nth-child(1) { background: #FCA5A5; }
.hero-app-dots span:nth-child(2) { background: #FCD34D; }
.hero-app-dots span:nth-child(3) { background: #6EE7B7; }
.hero-app-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.hero-app-url {
  justify-self: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: #94A3B8;
}
.hero-app-live {
  justify-self: end;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: #94A3B8;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.1em;
}

/* Body — sidebar + main */
.hero-app-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 720px;
  background: #FAFBFC;
}

/* Sidebar */
.hero-app-side {
  background: #1F2434;
  color: #E5E7EB;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 14px;
  position: relative;
}
.hero-app-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 8px;
}
.hero-app-brand-text {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}
.hero-app-side-collapse {
  margin-left: auto;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.hero-app-project {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  color: #E5E7EB;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.hero-app-project-ico { color: #94A3B8; display: inline-flex; }
.hero-app-project-arr { margin-left: auto; color: #94A3B8; display: inline-flex; }

.hero-app-nav {
  display: flex; flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.hero-app-navitem {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #94A3B8;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-align: left;
}
.hero-app-navitem:hover { background: rgba(255,255,255,0.04); color: #E5E7EB; }
.hero-app-navitem[data-active="true"] {
  background: rgba(255,255,255,0.94);
  color: #1F2434;
  font-weight: 500;
}
.hero-app-navitem[data-active="true"] .hero-app-navitem-ico { color: var(--brand-blue, #3B82F6); }
.hero-app-navitem-ico {
  display: inline-flex;
  color: #94A3B8;
}
.hero-app-navitem:hover .hero-app-navitem-ico { color: #CBD5E1; }

.hero-app-side-footer {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.hero-app-sub {
  background: rgba(252, 211, 77, 0.08);
  border: 1px solid rgba(252, 211, 77, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 3px;
}
.hero-app-support {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: #16A34A;
  color: #FFFFFF;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* Main area */
.hero-app-main {
  background: #FAFBFC;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hero-app-mainhead {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 24px 16px;
  background: #FAFBFC;
  border-bottom: 1px solid #E5E7EB;
}
.hero-app-h {
  margin: 0;
  font-family: var(--ff-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1F2434;
}
.hero-app-sh {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: #94A3B8;
}
.hero-app-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.hero-app-btn:hover { background: #F8FAFC; border-color: #CBD5E1; }
.hero-app-btn-date { font-family: var(--ff-mono); font-size: 11.5px; }

.hero-app-content {
  padding: 16px 20px 20px;
  display: flex; flex-direction: column;
  min-width: 0;
}

/* KPI rows */
.app-kpi-row {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.app-kpi {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.app-kpi-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px;
}
.app-kpi-label {
  font-family: var(--ff-text);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #94A3B8;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 4px;
  flex: 1;
  min-width: 0;
}
.app-kpi-info {
  color: #CBD5E1;
  display: inline-flex;
}
.app-kpi-badge {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #FFFFFF;
  flex-shrink: 0;
}
.app-kpi-value {
  font-family: var(--ff-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #1F2434;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.app-kpi-sub {
  font-size: 10px;
  color: #94A3B8;
  font-family: var(--ff-mono);
  line-height: 1.3;
}
.app-kpi-trend {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 3px;
  margin-top: 2px;
}
.app-kpi-trend.up { color: #16A34A; }
.app-kpi-trend.down { color: #EF4444; }
.app-conv-pick {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 10.5px;
  color: #64748B;
  cursor: pointer;
  width: fit-content;
}

/* Generic app card (chart / table containers) */
.app-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.app-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}
.app-card-head h4 {
  margin: 0;
  font-family: var(--ff-text);
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}
.app-legend {
  display: inline-flex; align-items: center; gap: 5px;
  color: #64748B;
  font-size: 11px;
}
.app-legend i {
  display: inline-block;
  width: 8px; height: 2px;
  border-radius: 1px;
}

.app-search {
  width: 100%;
  padding: 8px 14px 8px 32px;
  background: #FFFFFF
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><circle cx='6' cy='6' r='3.5' stroke='%2394A3B8' stroke-width='1.4'/><path d='M8.7 8.7 L12 12' stroke='%2394A3B8' stroke-width='1.4' stroke-linecap='round'/></svg>") 11px center no-repeat;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12.5px;
  color: #475569;
  outline: none;
}
.app-search::placeholder { color: #94A3B8; }

/* Table */
.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.app-table th {
  text-align: left;
  font-family: var(--ff-text);
  font-size: 10.5px;
  font-weight: 500;
  color: #94A3B8;
  padding: 10px 8px;
  border-bottom: 1px solid #E5E7EB;
  letter-spacing: 0.02em;
}
.app-table td {
  padding: 11px 8px;
  border-bottom: 1px solid #F1F5F9;
  color: #1F2434;
  font-variant-numeric: tabular-nums;
}
.app-table tr:last-child td { border-bottom: 0; }
.app-table td:first-child { font-size: 12px; }
.app-table td:not(:first-child):not(:nth-child(2)) {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: #475569;
}
.app-table th:nth-child(n+3) { text-align: left; }
.app-chnl-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #DBEAFE;
  color: #2563EB;
  font-size: 11px;
  font-weight: 500;
}

/* Dark theme adjustments for hero-app — keep app authentic (light app on light landing OK; on dark landing add a glow) */
[data-theme="dark"] .hero-app {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 30px 80px -30px rgba(0,0,0,0.55),
    0 50px 120px -40px rgba(59, 130, 246, 0.3);
}

/* ───────────────────────────────────────────────────────────────
   Demo video modal
   ─────────────────────────────────────────────────────────────── */
.demo-modal-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  animation: demo-overlay-in 0.25s ease;
}
@keyframes demo-overlay-in { from { opacity: 0; } to { opacity: 1; } }
.demo-modal {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  animation: demo-modal-in 0.3s cubic-bezier(.2,.7,.2,1);
}
@keyframes demo-modal-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.demo-modal iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
.demo-modal-close {
  position: absolute;
  top: -52px; right: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #FFFFFF;
  font-size: 22px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  font-family: var(--ff-text);
  line-height: 1;
}
.demo-modal-close:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
}

/* ───────────────────────────────────────────────────────────────
   Responsive
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-app-body { grid-template-columns: 64px 1fr; min-height: 600px; }
  .hero-app-side { padding: 14px 8px; }
  .hero-app-brand-text,
  .hero-app-side-collapse,
  .hero-app-project span:not(.hero-app-project-ico):not(.hero-app-project-arr),
  .hero-app-navitem span:not(.hero-app-navitem-ico),
  .hero-app-sub,
  .hero-app-support span:not(:first-child) {
    display: none;
  }
  .hero-app-project, .hero-app-navitem, .hero-app-support {
    justify-content: center;
    padding: 10px;
  }
  .app-kpi-row { grid-template-columns: repeat(2, 1fr) !important; }
  .demo-modal { aspect-ratio: 9 / 16; max-width: 380px; }
  .demo-modal-close { top: -48px; }
}
