/* ============================================================
   Enhancement styles — throttle gauge, waterline, outlook,
   scroll-reveal, active nav. Reuses global palette variables.
   ============================================================ */

/* ---- 1. Throttle gauge ---- */
.hero-throttle {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  margin-top: 28px;
}

.hero-throttle .ht-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 500ms ease;
}

.hero-throttle.run .ht-on {
  color: var(--cyan);
}

.ht-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(25, 23, 21, 0.1);
  overflow: visible;
}

.ht-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ht-knob {
  position: absolute;
  top: 50%;
  left: 6%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--text);
  border: 3px solid #fffaf2;
  box-shadow: 0 4px 12px rgba(47, 35, 25, 0.28);
  transform: translate(-50%, -50%);
  transition: left 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-throttle.run .ht-fill {
  width: 90%;
}

.hero-throttle.run .ht-knob {
  left: 90%;
}

/* ---- 2. 道术界 waterline ---- */
.outlook-section {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0;
}

.waterline {
  margin: 6px 0 36px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.wl-scene {
  position: relative;
  height: 340px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbf7ef 0%, #f2e9dc 100%);
  display: flex;
  flex-direction: column;
}

.wl-layer {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  border-bottom: 1px dashed rgba(25, 23, 21, 0.12);
}

.wl-layer:last-of-type {
  border-bottom: none;
}

.wl-layer strong {
  flex: 0 0 auto;
  width: 58px;
  font-size: 44px;
  line-height: 1;
  text-align: center;
  color: var(--text);
}

.wl-layer span {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 640px;
}

.wl-dao strong { color: var(--cyan); }
.wl-jie strong { color: var(--blue); }
.wl-shu strong { color: var(--lime); }

.wl-shu {
  transition: opacity 500ms ease, filter 500ms ease;
}

.wl-shu.submerged {
  opacity: 0.5;
  filter: grayscale(0.5);
}

.wl-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 14%;
  background: linear-gradient(180deg, rgba(50, 107, 133, 0.34), rgba(50, 107, 133, 0.52));
  border-top: 2px solid rgba(50, 107, 133, 0.6);
  transition: height 600ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.wl-wave {
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 8px;
  background: radial-gradient(circle at 10px -2px, rgba(50, 107, 133, 0.5) 6px, transparent 7px) repeat-x;
  background-size: 22px 10px;
  opacity: 0.7;
}

.wl-control {
  margin-top: 18px;
}

.wl-slider,
#wlSlider {
  width: 100%;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.wl-years {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 8px;
}

.wl-years span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wl-years strong {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

/* ---- Outlook cards ---- */
.outlook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.outlook-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.outlook-tag {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(201, 100, 66, 0.12);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.outlook-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.outlook-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- 3. Scroll-reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- 4. Active-section nav ---- */
.site-header nav a.is-active {
  color: var(--text);
  background: rgba(201, 100, 66, 0.12);
}

/* ---- Responsive ---- */
@media (max-width: 1020px) {
  .outlook-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .outlook-section {
    width: min(350px, calc(100% - 36px));
    margin-left: 18px;
    margin-right: 0;
    padding: 42px 0;
  }
  .hero-throttle {
    max-width: 100%;
  }
  .wl-scene {
    height: 380px;
  }
  .wl-layer {
    gap: 12px;
    padding: 0 14px;
  }
  .wl-layer strong {
    width: 40px;
    font-size: 32px;
  }
  .wl-layer span {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ht-fill,
  .ht-knob,
  .wl-water,
  .reveal {
    transition: none !important;
  }
}
