/* atmosphere.css — rich web backgrounds, depth, desktop polish */

html {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  background-color: var(--bg-app);
  background-image:
    radial-gradient(ellipse 900px 500px at 100% -10%, var(--atmosphere-1), transparent 60%),
    radial-gradient(ellipse 700px 420px at -5% 20%, var(--atmosphere-2), transparent 55%),
    radial-gradient(ellipse 600px 400px at 80% 100%, var(--atmosphere-3), transparent 50%),
    var(--atmosphere-pattern);
  background-attachment: fixed;
  min-height: 100dvh;
  transition: background-color 0.35s ease, color 0.25s ease;
}

.app-shell-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.app-shell-bg::before,
.app-shell-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: ambienceFloat 16s ease-in-out infinite alternate;
}
.app-shell-bg::before {
  width: min(48vw, 520px);
  height: min(48vw, 520px);
  background: var(--primary);
  top: -12%;
  left: -8%;
  opacity: 0.12;
}
.app-shell-bg::after {
  width: min(40vw, 420px);
  height: min(40vw, 420px);
  background: var(--success);
  bottom: -10%;
  right: -6%;
  opacity: 0.1;
  animation-delay: -6s;
}

@keyframes ambienceFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, -40px) scale(1.12); }
}

/* Wider desktop containers */
.page-wrap,
.container-wide {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 100px;
}
@media (min-width: 1100px) {
  .page-wrap,
  .container-wide {
    padding: 28px 28px 60px;
  }
}

/* Glass cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.surface-elevated {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.surface-elevated:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Theme toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover {
  transform: scale(1.06);
  box-shadow: var(--shadow-md);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hero photo strip */
.hero-photo {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
}
.hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(17,24,39,0.72), rgba(167,28,32,0.35));
}
.hero-photo-content {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  color: #fff;
}

/* Product / dash media tiles */
.media-tile {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  background: var(--bg-surface-hover);
}

/* Section divider with image accent */
.section-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--primary-light), transparent);
  border: 1px solid var(--border-color);
  margin: 20px 0 14px;
}

html[data-theme="dark"] .app-header {
  background: rgba(18, 18, 18, 0.85);
  backdrop-filter: blur(16px);
}
html:not([data-theme="dark"]) .app-header {
  background: rgba(253, 253, 248, 0.88);
  backdrop-filter: blur(16px);
}

/* Fix home container width on desktop */
@media (min-width: 900px) {
  body .container {
    max-width: 1180px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell-bg::before,
  .app-shell-bg::after {
    animation: none;
  }
}
