/* =============================================
   TRIGADA AI — Performance Page Styles
   ============================================= */

/* --- Hero (transparency-style two-column) --- */
.perf-hero {
  background-color: #0A112A;
}

.verified-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 768px) {
  .verified-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-16);
  }
}

.verified-video {
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .verified-video {
    max-width: none;
  }
}

.verified-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.verified-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.verified-content > p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.perf-disclaimer {
  font-size: 0.8125rem !important;
  color: var(--text-muted) !important;
}

/* --- Results section --- */
.results-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: var(--space-12);
  align-items: start;
}

@media (min-width: 1024px) {
  .results-content {
    grid-template-columns: 1fr 1.15fr;
    gap: var(--space-12);
  }
}

.results-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 200ms ease, transform 200ms ease, background-color 200ms ease;
}

.result-item:hover {
  background: var(--bg-elevated);
  border-color: var(--brand-primary);
  transform: translateX(4px);
}

/* Icon + title sit together in a header row; description spans full width below */
.result-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.result-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: rgba(255, 122, 61, 0.12);
  border: 1px solid rgba(255, 122, 61, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.result-icon svg {
  width: 21px;
  height: 21px;
  color: var(--brand-primary);
}

.result-item h3 {
  font-size: 1.0625rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.25;
}

.result-item p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* =============================================
   Portfolio Growth chart
   ============================================= */
.growth-chart {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: visible;
}

/* --- Header: title + balance toggle --- */
.gc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.gc-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
}

/* Subtitle sits on its own full-width line below the header so it never
   competes with the balance toggle (avoids the truncation/crowding). */
.gc-subtitle {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 1.25rem 0;
  max-width: 60ch;
}

.gc-sub-start {
  color: var(--text-primary);
  font-weight: 600;
}

.gc-balance {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  align-items: flex-end;
}

.gc-balance-cap {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.gc-bal-btns {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.gc-bal-btn {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.gc-bal-btn:hover {
  color: var(--text-primary);
}

.gc-bal-btn.is-active {
  color: #4A1B0C;
  background: var(--brand-primary);
  box-shadow: 0 2px 10px rgba(255, 122, 61, 0.35);
}

/* --- Legend --- */
.gc-legend {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.gc-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.gc-leg-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.gc-leg-value {
  background: linear-gradient(135deg, #FF7A3D, #FFB07A);
  box-shadow: 0 0 8px rgba(255, 122, 61, 0.5);
}

.gc-leg-return {
  background: linear-gradient(180deg, rgba(16, 217, 129, 0.85), rgba(16, 217, 129, 0.25));
}

/* --- Plot frame --- */
.gc-plot {
  position: relative;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 46px 34px 64px;
  margin-bottom: var(--space-6);
}

.gc-frame {
  position: relative;
  width: 100%;
  /* aspect-ratio is set inline to match the SVG viewBox (keeps strokes crisp) */
}

.gc-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.gc-grid-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.gc-bar {
  fill: url(#gcBar);
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: bottom;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.growth-chart.is-animated .gc-bar {
  transform: scaleY(1);
}

.gc-area {
  opacity: 0;
  transition: opacity 0.9s ease-out 0.45s;
}

.growth-chart.is-animated .gc-area {
  opacity: 1;
}

.gc-line {
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.gc-line-glow {
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.45;
  vector-effect: non-scaling-stroke;
}

.growth-chart.is-animated .gc-line,
.growth-chart.is-animated .gc-line-glow {
  transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.15, 1);
}

/* --- Overlay (points + value labels) --- */
.gc-overlay {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.gc-point {
  position: absolute;
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  background: var(--brand-primary);
  border: 2px solid var(--bg-base);
  box-shadow: 0 0 0 1px rgba(255, 122, 61, 0.4), 0 0 10px rgba(255, 122, 61, 0.55);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 4;
}

.gc-point.is-milestone {
  width: 14px;
  height: 14px;
}

.gc-point.is-start {
  background: var(--text-muted);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.growth-chart.is-animated .gc-point {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: gcPointIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

@keyframes gcPointIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.growth-chart.is-animated .gc-point:hover,
.growth-chart.is-animated .gc-point:focus-visible {
  transform: translate(-50%, -50%) scale(1.55);
  z-index: 30;
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 122, 61, 0.6), 0 0 16px rgba(255, 122, 61, 0.8);
}

/* Point tooltip (month / balance / return) */
.gc-point::after {
  content: attr(data-month) "\A" attr(data-bal) "\A" attr(data-ret);
  white-space: pre;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(4px);
  min-width: 96px;
  padding: 0.5rem 0.65rem;
  background: rgba(8, 11, 20, 0.97);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 40;
}

.gc-point:hover::after,
.gc-point:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gc-point.tip-right::after {
  left: 0;
  transform: translateX(-12%) translateY(4px);
}

.gc-point.tip-right:hover::after,
.gc-point.tip-right:focus-visible::after {
  transform: translateX(-12%) translateY(0);
}

.gc-point.tip-left::after {
  left: auto;
  right: 0;
  transform: translateX(12%) translateY(4px);
}

.gc-point.tip-left:hover::after,
.gc-point.tip-left:focus-visible::after {
  transform: translateX(12%) translateY(0);
}

/* Always-on value labels at milestones */
.gc-vlabel {
  position: absolute;
  transform: translate(-50%, -175%);
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  color: var(--brand-soft);
  background: rgba(255, 122, 61, 0.14);
  border: 1px solid rgba(255, 122, 61, 0.35);
  opacity: 0;
  transition: opacity 0.5s ease 1.3s;
  z-index: 3;
}

.growth-chart.is-animated .gc-vlabel {
  opacity: 1;
}

.gc-vlabel.is-end {
  color: #fff;
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 4px 16px rgba(255, 122, 61, 0.45);
  transform: translate(-62%, -175%);
}

.gc-vlabel.is-start {
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-color: var(--border);
  transform: translate(-8%, 55%);
}

/* --- Axes (HTML overlays, real font sizes) --- */
.gc-yaxis {
  position: absolute;
  top: 18px;
  bottom: 34px;
}

.gc-yaxis-left { left: 0; width: 64px; }
.gc-yaxis-right { right: 0; width: 46px; }

.gc-tick {
  position: absolute;
  transform: translateY(-50%);
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.gc-tick-y { right: 8px; text-align: right; }
.gc-tick-r { left: 8px; }

.gc-xaxis {
  position: absolute;
  left: 64px;
  right: 46px;
  bottom: 8px;
  height: 20px;
}

.gc-xlab {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gc-xlab-start { color: var(--text-muted); }

/* --- KPI tiles --- */
.gc-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.gc-kpi {
  text-align: center;
  padding: 1.25rem var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.gc-kpi-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.gc-kpi-value {
  display: block;
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.gc-kpi-value.gc-profit { color: var(--profit); }

/* --- Verified live track-record cards (mirrors the Our Algos page) --- */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.track-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color 200ms ease, transform 200ms ease, background-color 200ms ease;
}

.track-card:hover {
  border-color: var(--brand-primary);
  background: var(--bg-elevated);
  transform: translateY(-3px);
}

.track-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.track-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.track-card-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track-card-titles h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.track-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.track-metrics {
  margin: 0;
  border-top: 1px solid var(--border);
}

.track-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

.track-metric dt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.track-metric dd {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.track-metric dd.profit {
  color: var(--profit);
}

.track-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: auto;
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 600;
  color: #4A1B0C;
  background: var(--brand-primary);
  border-radius: var(--radius-md);
  transition: background-color 200ms ease, transform 200ms ease;
}

.track-link:hover {
  background: var(--brand-hover);
}

.track-link svg {
  flex-shrink: 0;
}

/* --- Footnote --- */
.gc-footnote {
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--text-muted);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.gc-footnote-title {
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .growth-chart { padding: 24px; }
}

@media (max-width: 768px) {
  .growth-chart { padding: 20px; }
  .gc-title { font-size: 1.375rem; }
  .gc-head { flex-direction: column; align-items: flex-start; }
  .gc-balance { align-items: flex-start; }
  .gc-plot { padding: 16px 38px 32px 56px; }
  .gc-yaxis-left { width: 56px; }
  .gc-yaxis-right { width: 38px; }
  .gc-xaxis { left: 56px; right: 38px; }
  .gc-kpis { grid-template-columns: 1fr; gap: var(--space-2); }
  .gc-kpi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: var(--space-4) 1.25rem;
  }
  .gc-kpi-label { margin-bottom: 0; }
}

@media (max-width: 480px) {
  .growth-chart { padding: 16px; }
  .gc-plot { padding: 14px 34px 30px 50px; }
  .gc-yaxis-left { width: 50px; }
  .gc-yaxis-right { width: 34px; }
  .gc-xaxis { left: 50px; right: 34px; }
  .gc-tick { font-size: 0.625rem; }
  .gc-xlab { font-size: 0.625rem; }
  .gc-kpi-value { font-size: 1.5rem; }
}
