/* ============================================================
   B2C — Smart Home Air Intelligence
   ============================================================ */

/* Sub-nav — pill style */
.sub-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.sub-nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}
.sub-nav-link:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.07); }
.sub-nav-link.active { background: #ffffff; color: #0d0d1a; font-weight: 700; }
.sub-nav-icon { display: flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex-shrink: 0; }
.back-link {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 500;
  color: var(--white-50);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.back-link:hover { color: var(--white-80); }

/* ============================================================
   HOME SENSE CARD — house with AQI orb inside
   ============================================================ */
.card-visual--home-sense {
  background: radial-gradient(ellipse at 50% 55%, rgba(0,173,241,0.07) 0%, transparent 65%);
}
.home-sense-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.house-shape {
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 0 16px rgba(0,173,241,0.2));
}
.house-roof {
  width: 0;
  height: 0;
  border-left: 68px solid transparent;
  border-right: 68px solid transparent;
  border-bottom: 48px solid rgba(0,173,241,0.18);
}
.house-body {
  width: 118px;
  height: 88px;
  background: rgba(0,173,241,0.07);
  border: 1px solid rgba(0,173,241,0.22);
  border-top: none;
  border-radius: 0 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-orb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.home-aqi-num {
  font-family: var(--font-primary);
  font-size: 44px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: aqi-breathe 4s ease-in-out infinite;
}
@keyframes aqi-breathe {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.25); }
}
.home-aqi-status {
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.14em;
  animation: data-flicker 2.5s infinite;
}
.home-sensor-dot {
  position: absolute;
  bottom: 58px;
  right: 58px;
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: core-pulse 2s infinite;
}
.home-data-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6,3,17,0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  width: 180px;
}
.hd-key {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  color: var(--white-30);
  width: 42px;
}
.hd-bar {
  flex: 1;
  height: 4px;
  background: var(--white-10);
  border-radius: 2px;
  overflow: hidden;
}
.hd-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 2px;
}
.hd-val {
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  white-space: nowrap;
}

/* ============================================================
   HOME PURIFY CARD — shared particle flow (same as b2b)
   ============================================================ */
.card-visual--home-purify {
  background: radial-gradient(ellipse at 50% 50%, rgba(0,173,241,0.04) 0%, transparent 70%);
}
.purify-scene {
  position: absolute;
  inset: 0;
}
.ptcl {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.ptcl--d {
  background: rgba(237,0,140,0.75);
  box-shadow: 0 0 6px rgba(237,0,140,0.4);
  animation: ptcl-dirty 2.5s linear infinite;
}
.ptcl--c {
  background: rgba(0,173,241,0.75);
  box-shadow: 0 0 6px rgba(0,173,241,0.4);
  animation: ptcl-clean 2.5s linear infinite;
}
@keyframes ptcl-dirty {
  0%   { left: 82%; opacity: 0; }
  12%  { opacity: 0.9; }
  88%  { opacity: 0.9; }
  100% { left: 52%; opacity: 0; }
}
@keyframes ptcl-clean {
  0%   { left: 48%; opacity: 0; }
  12%  { opacity: 0.9; }
  88%  { opacity: 0.9; }
  100% { left: 18%; opacity: 0; }
}
.purifier {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 108px;
  background: var(--surface);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  z-index: 2;
  box-shadow: 0 0 20px rgba(0,173,241,0.12);
}
.purifier-top,
.purifier-bot {
  font-family: var(--font-primary);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan);
}
.purifier-fan {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fan-spin 2s linear infinite;
  box-shadow: 0 0 8px rgba(0,173,241,0.3);
}
@keyframes fan-spin { to { transform: rotate(360deg); } }
.fan-cross {
  width: 16px;
  height: 2px;
  background: var(--cyan);
  position: relative;
}
.fan-cross::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 16px;
  background: var(--cyan);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.purify-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.purify-label--l { left: 8%;  color: var(--cyan); }
.purify-label--r { right: 8%; color: var(--magenta); }
.purify-auto {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0,173,241,0.12);
  border: 1px solid rgba(0,173,241,0.25);
  border-radius: 6px;
  padding: 3px 7px;
  letter-spacing: 0.08em;
  animation: data-flicker 3s infinite;
}

/* ============================================================
   STAY SAFE CARD — phone with outdoor map + alert
   ============================================================ */
.card-visual--stay-safe {
  background: radial-gradient(ellipse at 50% 40%, rgba(237,0,140,0.05) 0%, transparent 65%);
}
.ss-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-phone {
  width: 148px;
  height: 222px;
  background: var(--surface);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(237,0,140,0.1), 0 0 60px rgba(0,0,0,0.3);
}
.ss-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 6px;
  font-family: var(--font-primary);
  font-size: 9px;
  font-weight: 600;
  color: var(--white-50);
  flex-shrink: 0;
}
.ss-live {
  color: var(--cyan);
  animation: data-flicker 2s infinite;
}
.ss-map {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.ss-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 18px 18px;
}
.ss-danger-zone {
  position: absolute;
  top: 10%;
  left: 8%;
  width: 75px;
  height: 75px;
  background: radial-gradient(circle, rgba(237,0,140,0.25) 0%, transparent 70%);
  border-radius: 50%;
  animation: danger-pulse 2.5s ease-in-out infinite;
}
@keyframes danger-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.2); opacity: 1; }
}
.ss-safe-zone {
  position: absolute;
  bottom: 15%;
  right: 8%;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(0,173,241,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.ss-gps-ring {
  position: absolute;
  bottom: 22%;
  right: 14%;
  transform: translate(50%, 50%);
  border-radius: 50%;
  border: 1px solid rgba(0,173,241,0.5);
  animation: gps-ring-expand 2s ease-out infinite;
}
@keyframes gps-ring-expand {
  0%   { width: 6px;  height: 6px;  opacity: 1; }
  100% { width: 36px; height: 36px; opacity: 0; }
}
.ss-gps-dot {
  position: absolute;
  bottom: 22%;
  right: 14%;
  transform: translate(50%, 50%);
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  z-index: 2;
}
.ss-danger-label {
  position: absolute;
  top: 28%;
  left: 10%;
  font-family: var(--font-primary);
  font-size: 8px;
  font-weight: 700;
  color: var(--magenta);
  background: rgba(237,0,140,0.12);
  padding: 2px 5px;
  border-radius: 4px;
}
.ss-notif {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(237,0,140,0.13);
  border-top: 1px solid rgba(237,0,140,0.2);
  flex-shrink: 0;
  animation: notif-cycle 5s ease infinite;
}
@keyframes notif-cycle {
  0%, 10%   { opacity: 0; transform: translateY(4px); }
  22%, 80%  { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(-3px); }
}
.ss-notif-ico {
  font-size: 14px;
  flex-shrink: 0;
}
.ss-notif-body { display: flex; flex-direction: column; gap: 1px; }
.ss-notif-body strong { font-family: var(--font-primary); font-size: 9px; font-weight: 700; color: var(--white); }
.ss-notif-body span   { font-family: var(--font-body); font-size: 8px; color: var(--white-50); }

/* Responsive */
@media (max-width: 768px) {
  .sub-nav { display: none; }
  .back-link { font-size: 12px; }
  .site-header-bar { position: relative; }
  .mobile-menu-link { gap: 10px; }
}
