/* ============================================================
   GLOBAL TYPOGRAPHY
   ============================================================ */

body {
  font-family: "Inter", system-ui, sans-serif;
  color: #e8ecff;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  color: #f5f7ff;
}

/* Unified, tightened header block */
.app-title {
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  margin-bottom: 0rem;
  line-height: 1.1;
  position: relative;
  padding-bottom: 0.25rem;
}

/* Twilight underline */
.app-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 42px;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--accent-orange),
    rgba(255,255,255,0.0)
  );
  border-radius: 2px;
  opacity: 0.85;
}

/* Optional 828 glyph */
.app-title::before {
  content: "⛰️";
  margin-right: 0.35rem;
  font-size: 1.25rem;
  opacity: 0.9;
  vertical-align: -2px;
}

.subtitle {
  font-size: 0.9rem;
  color: #c8d3ff;
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

/* Header animation */
.header-animate {
  opacity: 0;
  transform: translateY(6px);
  animation: headerFadeUp 0.6s ease forwards;
}

@keyframes headerFadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   METRIC GRID (Legacy Observations)
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 0.78rem;
  color: #c8d3ff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
}

.metric-sub {
  font-size: 0.82rem;
  color: #a8b4e6;
}


/* ============================================================
   BADGES + STATUS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffcc66;
}

.badge-dot.ok {
  background: #4fda7b;
}

.badge-dot.error {
  background: #ff6b6b;
}

.status-text {
  font-size: 0.85rem;
  color: #c8d3ff;
  margin-top: 4px;
}


/* ============================================================
   CARD + MODULE SPACING
   ============================================================ */

.card {
  display: flex;
  flex-direction: column;
  gap: 16px; /* tightened from 20px */
}

.module {
  padding: var(--module-padding);
  border-radius: var(--module-radius);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 28px rgba(0,0,0,0.32);
  backdrop-filter: blur(4px);
}


/* ============================================================
   CURRENT OBSERVATIONS — 828 TWILIGHT GLASS UPGRADE
   ============================================================ */

#current-obs-wrapper {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  position: relative;
}

/* Live Tempest Pulse */
#current-obs-wrapper.live::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 10px;
  height: 10px;
  background: #ffb86b;
  border-radius: 50%;
  box-shadow: 0 0 10px #ffb86b;
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

#current-obs-inline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.obs-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #e8ecf2;
}

/* Micro‑icons */
.obs-item::before {
  content: attr(data-icon);
  margin-right: 4px;
  opacity: 0.85;
  font-size: 0.9rem;
}

/* Accent badges */
.obs-item strong {
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 700;
  color: #fff;
}

/* Temp */
.obs-item[data-type="temp"] strong {
  background: rgba(255, 184, 107, 0.28);
}

/* Dew */
.obs-item[data-type="dew"] strong {
  background: rgba(125, 211, 252, 0.28);
}

/* Humidity */
.obs-item[data-type="humidity"] strong {
  background: rgba(142, 240, 184, 0.28);
}

/* Wind */
.obs-item[data-type="wind"] strong {
  background: rgba(255, 123, 123, 0.28);
}

/* UV */
.obs-item[data-type="uv"] strong {
  background: rgba(255, 255, 255, 0.18);
}

.obs-dot {
  opacity: 0.35;
  margin: 0 0.15rem;
}


/* ============================================================
   BEST WINDOW — HOURLY STRIP
   ============================================================ */

.fc-strip {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.fc-hour {
  flex: 0 0 90px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.fc-hour-label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.fc-hour-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.fc-hour-extra {
  font-size: 0.7rem;
  opacity: 0.8;
}


/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.text-muted { color: #a8b4e6; }
.text-gold  { color: #f0b777; }
.text-orange { color: #ffb866; }
.text-blue { color: #c8d3ff; }
