/* Ensephra — grounding / breathing tool */

.ground-launch-btn {
  position: fixed;
  left: 1.75rem;
  bottom: 5.25rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  color: var(--ink, #1E2820);
  border: 1px solid rgba(122,158,135,0.35);
  border-radius: 100px;
  padding: 0.7rem 1.25rem 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(20,30,24,0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.ground-launch-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(20,30,24,0.2); border-color: rgba(122,158,135,0.6); }
.ground-launch-btn svg { width: 16px; height: 16px; stroke: var(--sage, #7A9E87); fill: none; stroke-width: 1.6; flex-shrink: 0; }
@media (max-width: 640px) {
  .ground-launch-btn { left: 1rem; bottom: 4.6rem; padding: 0.6rem 1rem 0.6rem 0.85rem; font-size: 0.76rem; }
}

.ground-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(20, 28, 22, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.ground-overlay.ground-open { opacity: 1; pointer-events: auto; }

.ground-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #F5F7F5;
  padding: 2rem;
  max-width: 420px;
}

.ground-close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  background: none;
  border: none;
  color: rgba(245,247,245,0.7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.4rem;
}
.ground-close:hover { color: #fff; }

.ground-stage {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.ground-ring-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(245,247,245,0.14);
}

.ground-ring-progress {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#7A9E87 calc(var(--ground-pct, 0) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  transition: background 0.1s linear;
}

.ground-orb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #DCEBE1 0%, #7A9E87 55%, #47624f 100%);
  box-shadow: 0 0 50px rgba(122,158,135,0.55);
  transform: scale(var(--ground-scale, 0.66));
  transition: transform 4s cubic-bezier(.45,0,.4,1), box-shadow 4s ease;
}

.ground-phase {
  font-family: var(--serif, Georgia, serif);
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  min-height: 2rem;
}

.ground-sub {
  font-size: 0.85rem;
  color: rgba(245,247,245,0.6);
  font-weight: 300;
  margin-bottom: 1.75rem;
}

.ground-controls { display: flex; align-items: center; gap: 1rem; }
.ground-btn {
  border: 1px solid rgba(245,247,245,0.3);
  background: transparent;
  color: #F5F7F5;
  border-radius: 100px;
  padding: 0.55rem 1.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ground-btn:hover { background: rgba(245,247,245,0.1); border-color: rgba(245,247,245,0.6); }
.ground-btn-primary { background: #7A9E87; border-color: #7A9E87; }
.ground-btn-primary:hover { background: #6a8c77; }

.ground-cycles { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(245,247,245,0.45); margin-top: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  .ground-orb { transition: transform 0.3s ease; }
  .ground-overlay { transition: none; }
}
