/* ====================================================
   LCD Counter — digital meter, JetBrains Mono, segment-display feel
   ==================================================== */

.lcd {
  position: relative;
  padding: 6rem 0 7rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elev-1) 100%);
  overflow: hidden;
}

/* Subtle hex pattern background — echoes the hero panels */
.lcd::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 70'%3E%3Cpath d='M30 2 L55 16 L55 50 L30 64 L5 50 L5 16 Z' fill='none' stroke='rgba(16,185,129,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 70px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
  opacity: 0.6;
  pointer-events: none;
}

.lcd__intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  position: relative;
}
.lcd__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  color: var(--heading);
  margin: 1rem 0;
  line-height: 1.05;
}
.lcd__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--solar-light), var(--emerald-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lcd__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

.lcd-cell {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid var(--glass-border-emerald);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 rgba(15, 23, 42, 0.076),
    inset 0 0 30px rgba(16, 185, 129, 0.08);
  overflow: hidden;
  /* faint scanline overlay for LCD feel */
}
.lcd-cell::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 3px,
    rgba(16, 185, 129, 0.04) 3px,
    rgba(16, 185, 129, 0.04) 4px
  );
  pointer-events: none;
}
.lcd-cell::after {
  /* top vignette + subtle screen reflection */
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.07), transparent);
  pointer-events: none;
}

.lcd-cell__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 1rem;
  position: relative;
}
.lcd-cell__label::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-bright);
  animation: pulse 2.2s ease-in-out infinite;
}

.lcd-cell__num-wrap {
  position: relative;
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 0.5rem;
}
.lcd-cell__num {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--emerald-dark);
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 0 12px rgba(110, 231, 183, 0.65),
    0 0 28px rgba(16, 185, 129, 0.40);
  /* phantom 8888 "off-segments" feel: very subtle dim background of the same digit width */
}
.lcd-cell__num--gold {
  color: var(--solar-dark);
  text-shadow: 0 0 12px rgba(252, 211, 77, 0.65), 0 0 28px rgba(245, 158, 11, 0.40);
}
.lcd-cell__num--sky {
  color: var(--sky-blue);
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.65), 0 0 28px rgba(14, 165, 233, 0.40);
}
.lcd-cell__unit {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--emerald-dark);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.lcd-cell__caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  position: relative;
}

/* tick-tock subtle visual flicker during animation */
.lcd-cell__num.is-counting {
  animation: lcdTick 90ms ease-out;
}
@keyframes lcdTick {
  0%   { opacity: 0.92; }
  50%  { opacity: 1; }
  100% { opacity: 0.96; }
}

.lcd__disclaimer {
  margin: 3rem auto 0;
  max-width: 760px;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .lcd__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .lcd__grid { grid-template-columns: 1fr; }
}
