/* ==========================================================================
   Hero section (Figma node 5:1010)
   ========================================================================== */

.hero {
  position: relative;
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 16px 32px 64px;
  background-color: #f4f5f8;
  overflow: hidden;
}

.hero__text {
  max-width: 1220px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-family-display);
  max-width: 960px;
  margin-inline: auto;
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: var(--font-weight-regular);
  color: #2d2e33;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-family: var(--font-family-display);
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: var(--font-weight-regular);
  color: #6d6d72;
  line-height: 1.4;
  max-width: 780px;
  margin: 0 auto;
}

/* ==========================================================================
   Hero visual — dashboard mockup composition
   ========================================================================== */

.hero__visual {
  position: relative;
  width: 100%;
  max-width: 1040px;
  height: 720px;
  margin: 28px auto 0;
}

.hero__centerpiece {
  position: absolute;
  left: 50%;
  top: 110px;
  width: 460px;
  height: auto;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

.hero__centerpiece-art {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 1024px) {
  body.motion-enabled .hero__centerpiece,
  body.motion-enabled .dash-card {
    opacity: 0;
    will-change: transform, opacity;
    transition:
      opacity 0.96s ease,
      transform 1.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  body.motion-enabled .hero__centerpiece {
    transform: translateX(-50%) translate3d(0, 20px, 0) scale(0.9);
  }

  body.motion-enabled .dash-card {
    transform: translate3d(var(--hero-enter-x, 0), var(--hero-enter-y, 0), 0) scale(0.91);
  }

  body.motion-in .hero__centerpiece {
    opacity: 1;
    transform: translateX(-50%) translate3d(0, 0, 0) scale(1);
    transition-delay: 0.14s;
  }

  body.motion-in .dash-card {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition-delay: var(--hero-delay, 0s);
    animation: hero-card-float var(--hero-float-duration, 6.8s) ease-in-out infinite;
    animation-delay: calc(var(--hero-delay, 0s) + 0.9s + var(--hero-float-offset, 0s));
  }

  body.motion-in .hero__centerpiece-art {
    animation: hero-center-float 8.2s ease-in-out infinite;
    animation-delay: 0.88s;
  }
}

/* ---- Base card ---- */
.dash-card {
  position: absolute;
  background: var(--color-surface);
  border-radius: 18px;
  box-shadow:
    0 2px 4px rgba(91, 104, 133, 0.08),
    0 10px 24px rgba(91, 104, 133, 0.16);
  padding: 20px 22px;
  z-index: 3;
  font-size: var(--font-size-14);
  color: #323236;
}

.dash-card__title {
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: rgba(43, 43, 49, 0.84);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.dash-card__big {
  display: block;
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-24);
  color: var(--color-text);
  line-height: 1.2;
}

.dash-card__date {
  font-family: var(--font-family-display);
  font-size: 14px;
  color: #6f7074;
}

.dash-card__tag {
  display: block;
  font-family: var(--font-family-display);
  font-size: 18px;
  color: #44454a;
  margin-top: 4px;
}

.dash-card__spark {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 10px;
}

/* ==========================================================================
   Card: Current Balance (top-left)
   ========================================================================== */

.dash-card--balance {
  left: 40px;
  top: 40px;
  width: 340px;
  padding: 22px 24px;
  --hero-float-y: -8px;
}

.dash-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-background-tertiary);
  margin-bottom: 18px;
}

.dash-card__head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-card__amount {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-22);
  color: #3d3d3d;
  line-height: var(--line-height-32);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(210, 210, 210, 0.25);
  cursor: pointer;
}

.dash-card__details {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.dash-metric-col {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
}

.dash-metric {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dash-metric__icon {
  flex-shrink: 0;
}

.dash-metric__label {
  display: block;
  font-size: var(--font-size-12);
  color: var(--color-gray-02);
  line-height: 16px;
  margin-bottom: var(--spacing-100);
}

.dash-metric__value {
  display: block;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-16);
  color: #3d3d3d;
  line-height: var(--line-height-24);
}

/* Gauge */
.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.gauge svg {
  display: block;
}

.gauge__range {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 132px;
  font-family: var(--font-family-base);
}

.gauge__range span {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-04);
}

.gauge__range strong {
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.gauge__label {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-medium);
  color: #303135;
  margin: 0;
}

/* ==========================================================================
   Card: Storage Conditions (top-right)
   ========================================================================== */

.dash-card--storage {
  right: 40px;
  top: 40px;
  width: 340px;
  padding: 20px 20px 18px;
  --hero-float-y: -10px;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  list-style: none;
  margin: 0;
}

.bar-list li {
  display: grid;
  grid-template-columns: 30px 1fr 38px;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
}

.bar-list__icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.bar-list__icon--orange { background: #ffeada; }
.bar-list__icon--green  { background: #ddf9e4; }
.bar-list__icon--blue   { background: #e4f0ff; }

.bar-list__label {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-family-display);
  font-size: var(--font-size-14);
  color: #4b4b50;
}

.bar {
  grid-column: 2;
  grid-row: 1;
  display: block;
  height: 5px;
  background: #d6d6d6;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 2px;
}

.bar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.bar__fill--orange { background: #ff8a3c; }
.bar__fill--green  { background: #2bc255; }
.bar__fill--blue   { background: #70a6e8; }

.bar-list__value {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-family: var(--font-family-display);
  font-size: 14px;
  color: #55565a;
  text-align: right;
}

/* ==========================================================================
   Card: Project Contributors (bottom-left, with avatars)
   ========================================================================== */

.dash-card--contributors {
  left: 0;
  top: 370px;
  width: 340px;
  padding: 16px 16px 14px;
  --hero-float-y: -9px;
}

.contributor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contributor-list li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248, 248, 250, 0.98);
}

.contributor-list__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.04);
}

.contributor-list__name {
  font-size: var(--font-size-14);
  color: #000;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-100) var(--spacing-300);
  border-radius: 999px;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-medium);
  line-height: 16px;
}

.badge--purple { background: rgba(184, 153, 235, 0.18); color: #8a47fa; }
.badge--green  { background: rgba(113, 221, 140, 0.22); color: #29c04e; }
.badge--blue   { background: rgba(125, 187, 255, 0.22); color: #3a86da; }
.badge--yellow { background: rgba(255, 204, 0, 0.22);   color: #d4b125; }
.badge--gray   { background: rgba(0, 0, 0, 0.08);       color: rgba(0, 0, 0, 0.5); }

/* ==========================================================================
   Card: Historical Temp (center-right, small)
   ========================================================================== */

.dash-card--temp {
  left: 580px;
  top: 360px;
  width: 170px;
  padding: 16px 16px 12px;
  --hero-float-y: -7px;
}

.dash-card--temp .dash-card__big {
  font-size: 28px;
  line-height: 1.2;
  margin-top: 6px;
}

/* ==========================================================================
   Card: Quality Metrics (right — 3 overlapping circles)
   ========================================================================== */

.dash-card--quality {
  right: 0;
  top: 340px;
  width: 220px;
  padding: 18px 18px 18px;
  --hero-float-y: -11px;
}

.quality-circles {
  position: relative;
  width: 100%;
  height: 230px;
  margin-top: 6px;
}

.quality-circle {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  isolation: isolate;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border: 4px solid #fff;
  font-family: var(--font-family-base);
}

.quality-circle::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--ring-color, currentColor);
  opacity: 0.9;
  z-index: -1;
}

.quality-circle__pct {
  font-weight: var(--font-weight-regular);
  line-height: 1;
}

.quality-circle__name {
  line-height: 1;
  margin-top: 3px;
  opacity: 0.95;
}

.quality-circle--orange {
  width: 130px;
  height: 130px;
  background: linear-gradient(135deg, #ffb571 0%, #f39c3e 100%);
  --ring-color: #f39c3e;
  top: 12px;
  left: 48px;
  z-index: 3;
}
.quality-circle--orange .quality-circle__pct { font-size: 34px; }
.quality-circle--orange .quality-circle__name { font-size: 13px; }

.quality-circle--blue {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #63d1e8 0%, #3cb4d8 100%);
  --ring-color: #3cb4d8;
  top: 120px;
  left: 10px;
  z-index: 2;
}
.quality-circle--blue .quality-circle__pct { font-size: 18px; }
.quality-circle--blue .quality-circle__name { font-size: 11px; }

.quality-circle--purple {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, #c0a3ec 0%, #9d77e5 100%);
  --ring-color: #9d77e5;
  top: 126px;
  left: 132px;
  z-index: 1;
}
.quality-circle--purple .quality-circle__pct { font-size: 20px; }
.quality-circle--purple .quality-circle__name { font-size: 11px; }

/* ==========================================================================
   Card: 12 °C Optimal
   ========================================================================== */

.dash-card--optimal {
  left: 610px;
  top: 540px;
  width: 134px;
  padding: 18px 20px 16px;
  text-align: left;
  --hero-float-y: -8px;
}

.dash-card--optimal .dash-card__big {
  font-size: 24px;
  margin-bottom: 2px;
}

.dash-card--optimal .dash-card__icon {
  margin: 12px 0 8px;
}

/* ==========================================================================
   Card: Performance (bar chart)
   ========================================================================== */

.dash-card--performance {
  right: 40px;
  top: 568px;
  width: 160px;
  padding: 18px 20px 14px;
  --hero-float-y: -10px;
}

.perf-chart {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 110px;
  margin-top: 12px;
  padding-bottom: 22px;
}

.perf-chart::before,
.perf-chart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.perf-chart::before { top: 0; }
.perf-chart::after  { top: 50%; }

.perf-group {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex: 1;
  justify-content: center;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.12);
}

.perf-group__label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-family-base);
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 0.5px;
}

.perf-bar {
  display: block;
  width: 8px;
  border-radius: 2px;
  min-height: 4px;
}

.perf-bar--light { background: #c8d1f0; }
.perf-bar--dark  { background: #7a8ee0; }

/* ==========================================================================
   Card: Clock (floating small)
   ========================================================================== */

.dash-card--clock {
  right: 220px;
  top: 620px;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-300);
  box-shadow: var(--shadow-md);
  --hero-float-y: -9px;
}

/* ==========================================================================
   Card: Analysis Report (bottom wide pill)
   ========================================================================== */

.dash-card--report {
  left: 318px;
  top: -10px;
  width: 540px;
  display: grid;
  grid-template-columns: 1.05fr 1.3fr 0.95fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 18px;
  border-radius: 16px;
  --hero-float-y: -7px;
  z-index: 2;
}

.report__title {
  font-size: 14.9px;
  color: #000;
}

.report__industry,
.report__date {
  font-size: 14.9px;
  color: #727272;
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-200);
  padding: var(--spacing-100) var(--spacing-300);
  border-radius: 999px;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-medium);
}

.status-badge--red {
  background: #feedef;
  color: #ef292d;
}

.status-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================================
   CTA row (email + demo)
   ========================================================================== */

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.hero__cta .input {
  max-width: 306px;
  min-height: 40px;
  border-color: #e8e8eb;
  border-radius: 12px;
}

.hero__cta .btn {
  min-height: 40px;
  padding: 0 22px;
  border-radius: 12px;
  box-shadow:
    0 1px 1px rgba(15, 23, 42, 0.08),
    0 5px 10px rgba(15, 23, 42, 0.1);
}

@keyframes hero-card-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, var(--hero-float-y, -10px), 0);
  }
}

@keyframes hero-center-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__centerpiece,
  .hero__centerpiece-art,
  .dash-card {
    animation: none !important;
    transition: none;
  }
}
