/* Spheres Framework - Page-Specific Styles
   Colors gradient from inner (coral/warm) to outer (stone/cool)
*/

/* ===== Sphere Colors ===== */
:root {
  --color-sphere-me: #E05252;       /* Coral - innermost, most control */
  --color-sphere-family: #D4915D;   /* Terracotta - close relationships */
  --color-sphere-business: #B5728B; /* Dusty rose - work domain */
  --color-sphere-community: #8B7B8B;/* Muted purple-gray */
  --color-sphere-world: #7B7B7B;    /* Stone gray - outermost */
}

/* ===== Insight Section ===== */
.insight-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .insight-layout {
    grid-template-columns: 1fr;
  }
}

.insight-content p {
  margin-bottom: var(--space-4);
}

.insight-pullquote {
  position: sticky;
  top: var(--space-8);
}

.insight-pullquote blockquote {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--color-ink);
  font-style: italic;
  border-left: 4px solid var(--color-sphere-me);
  padding-left: var(--space-5);
  margin: 0;
}

/* ===== Spheres Explainer (Interactive Section) ===== */
.spheres-explainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .spheres-explainer {
    grid-template-columns: 1fr;
  }

  .spheres-explainer-visual {
    order: -1;
  }
}

.sphere-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sphere-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-canvas);
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sphere-item:hover {
  transform: translateX(4px);
}

.sphere-item[data-highlight="me"]:hover {
  border-left-color: var(--color-sphere-me);
  background: color-mix(in srgb, var(--color-sphere-me) 8%, var(--color-canvas));
}
.sphere-item[data-highlight="family"]:hover {
  border-left-color: var(--color-sphere-family);
  background: color-mix(in srgb, var(--color-sphere-family) 8%, var(--color-canvas));
}
.sphere-item[data-highlight="business"]:hover {
  border-left-color: var(--color-sphere-business);
  background: color-mix(in srgb, var(--color-sphere-business) 8%, var(--color-canvas));
}
.sphere-item[data-highlight="community"]:hover {
  border-left-color: var(--color-sphere-community);
  background: color-mix(in srgb, var(--color-sphere-community) 8%, var(--color-canvas));
}
.sphere-item[data-highlight="world"]:hover {
  border-left-color: var(--color-sphere-world);
  background: color-mix(in srgb, var(--color-sphere-world) 8%, var(--color-canvas));
}

.sphere-item-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sphere-item-ring img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sphere-item-ring--me { background: color-mix(in srgb, var(--color-sphere-me) 15%, white); }
.sphere-item-ring--family { background: color-mix(in srgb, var(--color-sphere-family) 15%, white); }
.sphere-item-ring--business { background: color-mix(in srgb, var(--color-sphere-business) 15%, white); }
.sphere-item-ring--community { background: color-mix(in srgb, var(--color-sphere-community) 15%, white); }
.sphere-item-ring--world { background: color-mix(in srgb, var(--color-sphere-world) 15%, white); }

.sphere-item-content {
  flex: 1;
}

.sphere-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-1) 0;
}

.sphere-item[data-highlight="me"] .sphere-item-title { color: var(--color-sphere-me); }
.sphere-item[data-highlight="family"] .sphere-item-title { color: var(--color-sphere-family); }
.sphere-item[data-highlight="business"] .sphere-item-title { color: var(--color-sphere-business); }
.sphere-item[data-highlight="community"] .sphere-item-title { color: var(--color-sphere-community); }
.sphere-item[data-highlight="world"] .sphere-item-title { color: var(--color-sphere-world); }

.sphere-item-control {
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 0 var(--space-2) 0;
}

.sphere-item[data-highlight="me"] .sphere-item-control { color: var(--color-sphere-me); }
.sphere-item[data-highlight="family"] .sphere-item-control { color: var(--color-sphere-family); }
.sphere-item[data-highlight="business"] .sphere-item-control { color: var(--color-sphere-business); }
.sphere-item[data-highlight="community"] .sphere-item-control { color: var(--color-sphere-community); }
.sphere-item[data-highlight="world"] .sphere-item-control { color: var(--color-sphere-world); }

.sphere-item-desc {
  margin: 0;
  color: var(--color-ink);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* ===== Interactive Spheres Diagram ===== */
.spheres-interactive {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.spheres-state {
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.spheres-state--base {
  position: relative;
}

.spheres-state--me,
.spheres-state--family,
.spheres-state--business,
.spheres-state--community,
.spheres-state--world {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

/* Show specific state on hover */
.spheres-interactive[data-active="me"] .spheres-state--me,
.spheres-interactive[data-active="family"] .spheres-state--family,
.spheres-interactive[data-active="business"] .spheres-state--business,
.spheres-interactive[data-active="community"] .spheres-state--community,
.spheres-interactive[data-active="world"] .spheres-state--world {
  opacity: 1;
}

/* Hide base when sphere is active */
.spheres-interactive[data-active="me"] .spheres-state--base,
.spheres-interactive[data-active="family"] .spheres-state--base,
.spheres-interactive[data-active="business"] .spheres-state--base,
.spheres-interactive[data-active="community"] .spheres-state--base,
.spheres-interactive[data-active="world"] .spheres-state--base {
  opacity: 0;
}

/* Spheres Description */
.spheres-description {
  margin-top: var(--space-4);
  min-height: 50px;
  text-align: center;
  width: 100%;
}

.spheres-desc {
  display: none;
  padding: var(--space-3) var(--space-4);
  background: var(--color-canvas);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.2s ease;
}

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

/* Show descriptions based on active state */
.spheres-interactive[data-active="me"] ~ .spheres-description .spheres-desc--me,
.spheres-interactive[data-active="family"] ~ .spheres-description .spheres-desc--family,
.spheres-interactive[data-active="business"] ~ .spheres-description .spheres-desc--business,
.spheres-interactive[data-active="community"] ~ .spheres-description .spheres-desc--community,
.spheres-interactive[data-active="world"] ~ .spheres-description .spheres-desc--world {
  display: block;
}

/* Color the description titles */
.spheres-desc--me strong { color: var(--color-sphere-me); }
.spheres-desc--family strong { color: var(--color-sphere-family); }
.spheres-desc--business strong { color: var(--color-sphere-business); }
.spheres-desc--community strong { color: var(--color-sphere-community); }
.spheres-desc--world strong { color: var(--color-sphere-world); }

/* ===== Pattern Contrast ===== */
.pattern-contrast {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

@media (max-width: 600px) {
  .pattern-contrast {
    grid-template-columns: 1fr;
  }
}

.pattern-item {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
}

.pattern-item--outer {
  background: color-mix(in srgb, var(--color-sphere-world) 10%, var(--color-parchment));
  border-left: 4px solid var(--color-sphere-world);
}

.pattern-item--inner {
  background: color-mix(in srgb, var(--color-sphere-me) 10%, var(--color-parchment));
  border-left: 4px solid var(--color-sphere-me);
}

.pattern-item h4 {
  margin: 0 0 var(--space-3) 0;
  font-size: 1.1rem;
}

.pattern-item--outer h4 { color: var(--color-sphere-world); }
.pattern-item--inner h4 { color: var(--color-sphere-me); }

.pattern-item ul {
  margin: 0;
  padding-left: var(--space-4);
  color: var(--color-ink);
}

.pattern-item li {
  margin-bottom: var(--space-2);
}

/* ===== Usage Grid ===== */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .usage-grid {
    grid-template-columns: 1fr;
  }
}

.usage-card {
  background: var(--color-canvas);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--color-sphere-me);
}

.usage-card:nth-child(2) { border-top-color: var(--color-sphere-family); }
.usage-card:nth-child(3) { border-top-color: var(--color-sphere-business); }
.usage-card:nth-child(4) { border-top-color: var(--color-sphere-community); }

.usage-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-ink);
  margin: 0 0 var(--space-3) 0;
}

.usage-card p {
  margin: 0;
  color: var(--color-stone);
  line-height: 1.6;
}

/* ===== Questions Layout ===== */
.questions-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .questions-layout {
    grid-template-columns: 1fr;
  }
}

.question-item {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-tan);
}

.question-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-sphere-me);
  margin: 0 0 var(--space-3) 0;
}

.question-item p:last-child {
  margin: 0;
  color: var(--color-stone);
  line-height: 1.6;
}

.questions-sidebar {
  position: sticky;
  top: var(--space-8);
}

.sidebar-card {
  background: var(--color-parchment);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-sphere-world);
}

.sidebar-card h4 {
  margin: 0 0 var(--space-4) 0;
  color: var(--color-ink);
}

.sidebar-card ul {
  margin: 0;
  padding-left: var(--space-4);
  color: var(--color-stone);
}

.sidebar-card li {
  margin-bottom: var(--space-2);
}

/* ===== Application Section ===== */
.application-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 900px) {
  .application-layout {
    grid-template-columns: 1fr;
  }
}

.application-content p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.balance-example {
  background: var(--color-parchment);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
}

.balance-example h4 {
  margin: 0 0 var(--space-4) 0;
  font-size: 1rem;
  color: var(--color-stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-tan);
}

.balance-row:last-child {
  border-bottom: none;
}

.balance-sphere {
  font-weight: 600;
  color: var(--color-ink);
}

.balance-status {
  font-size: 0.9rem;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
}

.balance-status--good {
  background: color-mix(in srgb, var(--color-automate) 15%, white);
  color: var(--color-automate);
}

.balance-status--warn {
  background: color-mix(in srgb, var(--color-sphere-family) 15%, white);
  color: var(--color-sphere-family);
}

.balance-status--neglect {
  background: color-mix(in srgb, var(--color-sphere-me) 15%, white);
  color: var(--color-sphere-me);
}

.balance-status--neutral {
  background: var(--color-tan);
  color: var(--color-stone);
}

/* ===== Override sticky container for this page ===== */
.framework-diagram-sticky {
  flex-direction: column;
  align-items: center;
}
