/* HeyData — components. Confident ink: solid cards, one accent, generous radius. */

/* ---- panel ---- */

.panel {
  position: relative;
  padding: var(--space-6);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-enter) var(--ease-out),
              box-shadow var(--dur-enter) var(--ease-out),
              transform var(--dur-enter) var(--ease-out);
}
.panel:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-lift);
}

/* ---- buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 50px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  border: 1px solid var(--line);
  transition: color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out),
              background var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-enter) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-grad);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--accent) 55%, transparent);
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 16px 34px -10px color-mix(in srgb, var(--accent) 65%, transparent);
}

.btn-ghost {
  color: var(--ink);
  background: var(--bg-panel);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.nav-cta { min-height: 42px; padding-inline: var(--space-5); }

/* ---- hero crosstab card ---- */

.crosstab {
  margin: 0;
  padding: var(--space-6);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
}

.crosstab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.crosstab-question {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.sound-toggle {
  flex: none;
  height: 34px;
  padding: 0 var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-faint);
  transition: color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out);
}
.sound-toggle::before { content: '♪'; font-size: 12px; opacity: .6; }
.sound-toggle:hover { color: var(--ink-dim); border-color: var(--ink-faint); }
.sound-toggle[aria-pressed="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}
.sound-toggle[aria-pressed="true"]::before { opacity: 1; }

/* ---- pills / tabs ---- */

.banner, .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.pill, .tab {
  min-height: 38px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-panel);
  font-size: var(--fs-small);
  color: var(--ink-dim);
  transition: color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out),
              background var(--dur-micro) var(--ease-out);
}
.pill:hover, .tab:hover { color: var(--ink); border-color: var(--ink-faint); }
.pill[aria-selected="true"], .tab[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.pill.is-hint { animation: hint 1.8s var(--ease-out) 2; }
@keyframes hint {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  45% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }
}

/* ---- small deliverable/tool tags — capability chips ---- */
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  color: var(--ink-dim);
  font-size: 13px;
}

/* ---- chart ---- */

.chart { position: relative; width: 100%; }
.chart canvas { width: 100%; height: auto; }
.chart-lg {
  margin-block: var(--space-6);
  padding: var(--space-6);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.takeaway {
  margin: var(--space-3) 0 var(--space-1);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--ink);
  min-height: 3em;
}
.takeaway b { color: var(--accent); font-weight: 600; }

.chart-fallback { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.chart-fallback th, .chart-fallback td {
  border: 1px solid var(--line);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}
.chart-fallback td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- poll ---- */

.poll-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-3);
  padding: var(--space-2) 0;
  font-size: var(--fs-small);
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.poll-open::before { content: '+'; color: var(--accent); font-weight: 700; }
.poll-open:hover { color: var(--accent); border-bottom-color: var(--accent); }

.poll[hidden] { display: none; }
.poll {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-elev);
  display: grid;
  gap: var(--space-3);
}
.poll fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.poll legend {
  padding: 0 0 var(--space-3);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-faint);
}
.poll label {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 38px;
  font-size: var(--fs-small);
  color: var(--ink-dim);
  cursor: pointer;
}
.poll label:hover { color: var(--ink); }
.poll input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.poll select {
  min-height: 42px; padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--bg-deep); border: 1px solid var(--line);
  font-size: var(--fs-small);
}
.poll-msg { font-size: var(--fs-label); color: var(--accent); margin: 0; }

/* ---- service list: solid card grid, one accent ---- */

.grid { display: grid; gap: var(--space-4); }

.service {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color var(--dur-enter) var(--ease-out),
              box-shadow var(--dur-enter) var(--ease-out),
              transform var(--dur-enter) var(--ease-out);
}
.service:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-lift);
}
.service:hover .num { color: var(--accent); }

.service .viz {
  grid-column: 2;
  grid-row: 4;
  margin-top: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elev);
}
.service .viz canvas { display: block; width: 100%; }

.service .num {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .06em;
  color: var(--ink-faint);
  padding-top: 3px;
  transition: color var(--dur-micro) var(--ease-out);
}
.service h3 {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: var(--space-2);
  text-align: left;
}
.service p {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink-dim);
  font-size: var(--fs-small);
  margin: 0;
  max-width: 58ch;
}
.service .tags { grid-column: 2; grid-row: 3; }

/* ---- process pipeline ---- */

.pipeline { position: relative; display: grid; gap: 0; }
.pipe-rail {
  position: absolute;
  left: 15px; top: 20px; bottom: 20px;
  width: 1px;
  background: var(--line);
}
.pipe-packet {
  position: absolute;
  left: 12px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: top 40ms linear;
  z-index: 2;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  padding: var(--space-6) 0;
}
.step-node {
  position: relative;
  z-index: 1;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  transition: color 240ms var(--ease-out),
              border-color 240ms var(--ease-out),
              box-shadow 240ms var(--ease-out);
}
.step.is-hot .step-node {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.step h3 { margin-bottom: var(--space-2); transition: color 240ms var(--ease-out); }
.step.is-hot h3 { color: var(--accent); }
.step p { color: var(--ink-dim); font-size: var(--fs-small); margin: 0; }

/* ---- stats / ticks ---- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}
.stat-v {
  display: block;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.stat-k {
  display: block;
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--ink-faint);
}

.ticks { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }
.ticks li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--ink-dim);
  font-size: var(--fs-small);
}
.ticks li::before {
  content: '';
  position: absolute; left: 2px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tools { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--line); }

/* ---- FAQ ---- */

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-panel);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: border-color var(--dur-enter) var(--ease-out);
}
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
  padding: var(--space-6);
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color var(--dur-micro) var(--ease-out);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  flex: none;
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-elev);
  position: relative;
  transition: transform 240ms var(--ease-out), background-color 240ms var(--ease-out);
}
.faq-item summary::before {
  content: '';
  position: absolute;
  right: var(--space-6);
  width: 8px; height: 8px;
  margin-top: 10px;
  border-right: 1.5px solid var(--ink-dim);
  border-bottom: 1.5px solid var(--ink-dim);
  transform: rotate(45deg);
  transition: transform 240ms var(--ease-out), border-color 240ms var(--ease-out);
}
.faq-item[open] summary::after { background-color: color-mix(in srgb, var(--accent) 22%, var(--bg-elev)); }
.faq-item[open] summary::before { transform: rotate(225deg) translate(1px, 1px); border-color: var(--accent); }
.faq-item summary:hover { color: var(--accent); }
.faq-item p {
  color: var(--ink-dim);
  font-size: var(--fs-small);
  padding: 0 var(--space-6) var(--space-6) var(--space-6);
}

/* ---- forms ---- */

.contact-form { display: grid; gap: var(--space-4); max-width: 560px; }
.field { display: grid; gap: var(--space-2); }
.field label {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-faint);
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  transition: border-color var(--dur-micro) var(--ease-out),
              box-shadow var(--dur-micro) var(--ease-out);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
  outline: none;
}
.form-msg { font-size: var(--fs-label); color: var(--ink-dim); margin: 0; }

.contact-details dl { display: grid; gap: var(--space-2); margin: 0; }
.contact-details dt {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin-top: var(--space-4);
}
.contact-details dd {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--ink-dim);
}

/* ============ 640px+ ============ */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .service { grid-template-columns: auto 1fr; padding-inline: var(--space-6); }
}

/* ============ 960px+ ============ */
@media (min-width: 960px) {
  .grid-services { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}


/* ---- section backdrop: behta hua data, content ke peeche ---- */

.backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
.section > .container { position: relative; z-index: 1; }

/* ============ HERO ============ */

.hero-title {
  display: block;
  position: relative;
  min-height: 3.6em;
  margin-bottom: var(--space-6);
  text-wrap: normal;
}
.hero-title .t-ghost {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
.hero-title .t-live {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}
.hero-title .t-dim {
  color: var(--ink-faint);
  font-weight: 400;
}
.hero-title .t-cycle {
  display: inline-block;
  min-width: 6ch;
  color: var(--accent);
}
.hero-title .t-hot {
  color: var(--ink);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: 0 0 var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.hero-meta div { display: grid; gap: 2px; }
.hero-meta dt {
  font-size: 12px;
  color: var(--ink-faint);
  order: 2;
}
.hero-meta dd {
  margin: 0;
  order: 1;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

/* hero visual — ek confident glow halo peeche */
.hero-visual { position: relative; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: radial-gradient(50% 50% at 30% 20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 72%);
  filter: blur(30px);
  pointer-events: none;
}

/* scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--ink-faint);
}
.scroll-cue:hover { color: var(--accent); text-decoration: none; }
.scroll-cue span {
  width: 1px; height: 22px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: cueDrop 2.2s var(--ease-out) infinite;
}
@keyframes cueDrop {
  0%   { transform: scaleY(.2); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1);  transform-origin: top; opacity: 1; }
  100% { transform: scaleY(.2); transform-origin: bottom; opacity: 0; }
}

@media (max-width: 960px) {
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span { animation: none; }
}

@media (min-width: 961px) and (max-height: 1000px) {
  .hero { padding-block: calc(76px + var(--space-8)) var(--space-10); }
  .hero-meta { margin-bottom: var(--space-6); }
}

@media (min-width: 961px) and (max-height: 860px) {
  .hero-title { font-size: clamp(30px, 3.2vw, 46px); margin-bottom: var(--space-4); }
  .hero-copy .lead { font-size: 15px; }
  .hero-meta { gap: var(--space-6); margin-bottom: var(--space-5); padding-top: var(--space-3); }
  .hero-meta dd { font-size: clamp(18px, 1.8vw, 22px); }
  .scroll-cue { display: none; }
}


/* ---- live chart ka hover readout ---- */
.live-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: grid;
  gap: 1px;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elev);
  border: 1px solid var(--line-hot);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}
.live-tip b { color: var(--ink); font-weight: 600; font-size: 10px; letter-spacing: .04em; }
.live-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.live-tip .tip-row i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.live-tip .tip-row span { color: var(--ink-dim); }
.live-tip .tip-row em { margin-left: auto; color: var(--ink); font-style: normal; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.live-tip[hidden] { display: none; }
#live-chart canvas { cursor: crosshair; }
