/* ==========================================================================
   ChromaSpace - macOS Components & UI System
   ========================================================================== */

/* --- Navigation Header --- */
.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 20px;
}

.nav-bar {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-glass-nav);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-smooth);
}

.site-header.scrolled .nav-bar {
  background: rgba(10, 10, 14, 0.88);
  border-color: var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 400;
  transition: color var(--transition-smooth);
}

.nav-menu a:hover {
  color: var(--text-primary);
}

/* Nav App Store Button (Crisp, No Glow Halo) */
.btn-nav-appstore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: none !important;
  filter: none !important;
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.btn-nav-appstore:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none !important;
}

/* App Store Badge Button */
.appstore-btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.appstore-btn-content svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.appstore-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.appstore-small-text {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
  font-weight: 500;
}

.appstore-large-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Hero Section --- */
.hero-section {
  padding-top: 160px;
  padding-bottom: 70px;
  text-align: center;
  position: relative;
}

.hero-pill-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-h1 {
  font-size: clamp(2.8rem, 5.8vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  max-width: 900px;
  margin: 0 auto 20px auto;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px auto;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
}

/* --- Realistic macOS Window Shell --- */
.window-wrapper {
  margin-top: 20px;
  position: relative;
}

.mac-desktop-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-window);
  position: relative;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.mac-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(18, 18, 22, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  user-select: none;
}

.traffic-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.traffic-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: default;
}

.traffic-dot.red { background: #ff5f56; }
.traffic-dot.yellow { background: #ffbd2e; }
.traffic-dot.green { background: #27c93f; }

.window-identity {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Canvas Area */
.canvas-area {
  position: relative;
  width: 100%;
  height: 520px;
  background: #000;
  overflow: hidden;
  cursor: crosshair;
}

#wallpaperCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* On-Canvas Preset Selector */
.canvas-control-pill {
  position: absolute;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(14, 14, 18, 0.82);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.preset-pill-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.preset-pill-btn:hover {
  color: var(--text-primary);
}

.preset-pill-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.pill-sep {
  width: 1px;
  height: 16px;
  background: var(--border-light);
  margin: 0 4px;
}

.canvas-pause-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-smooth);
}

.canvas-pause-btn:hover {
  color: var(--text-primary);
}

/* Minimal macOS Dock Mockup */
.mac-dock-strip {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.dock-app {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.dock-app:hover {
  transform: translateY(-8px) scale(1.15);
}

.dock-app.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

.dock-app.finder { background: linear-gradient(180deg, #4da4ff 0%, #0066ee 100%); }
.dock-app.safari { background: linear-gradient(180deg, #40c4ff 0%, #007aff 100%); }
.dock-app.chromaspace {
  background: var(--grad-vibrant);
  box-shadow: 0 4px 12px rgba(175, 82, 222, 0.4);
}
.dock-app.settings { background: linear-gradient(180deg, #8e8e93 0%, #48484a 100%); }

.dock-app svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.cursor-interaction-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  pointer-events: none;
  backdrop-filter: blur(10px);
}

/* --- Features Bento Grid --- */
.bento-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.bento-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 34px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.bento-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }

.bento-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.bento-icon svg {
  width: 22px;
  height: 22px;
}

.bento-item h3 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.bento-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Menubar Popover Mockup inside Bento */
.menubar-preview {
  margin-top: 24px;
  background: rgba(20, 20, 26, 0.85);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.menubar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.menubar-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 0;
}

.switch-toggle {
  width: 38px;
  height: 22px;
  background: var(--accent-green);
  border-radius: var(--radius-full);
  position: relative;
}

.switch-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
}

/* ProMotion Frequency Graphic */
.promotion-graphic {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.promotion-number {
  font-size: 2.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.promotion-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.gallery-cover {
  height: 170px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}

.cover-nebula { background: radial-gradient(circle at center, #7c3aed 0%, #171536 70%, #000 100%); }
.cover-wave { background: radial-gradient(circle at center, #ec4899 0%, #1e1b4b 70%, #000 100%); }
.cover-aurora { background: linear-gradient(135deg, #059669 0%, #0284c7 50%, #7c3aed 100%); }
.cover-matrix { background: linear-gradient(180deg, #042f2e 0%, #064e3b 60%, #000 100%); }

.gallery-action {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.gallery-body {
  padding: 18px;
}

.gallery-body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gallery-body p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  line-height: 1.45;
}

/* --- FAQ --- */
.faq-wrap {
  max-width: 780px;
  margin: 40px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-smooth);
}

.faq-row.open {
  border-color: var(--border-light);
}

.faq-btn {
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-smooth);
  color: var(--text-secondary);
}

.faq-row.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth), padding var(--transition-smooth);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 0 22px;
}

.faq-row.open .faq-content {
  max-height: 180px;
  padding-bottom: 20px;
}

/* --- Call to Action Banner --- */
.cta-card {
  background: linear-gradient(180deg, rgba(22, 22, 28, 0.9) 0%, rgba(10, 10, 14, 0.95) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 60px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-window);
}

.cta-card::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(175, 82, 222, 0.25) 0%, transparent 70%);
  filter: blur(40px);
}

/* --- Footer --- */
.site-footer {
  padding: 60px 0 40px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-smooth);
}

.site-footer a:hover {
  color: var(--text-primary);
}

/* Language Selector */
.lang-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  transition: border-color var(--transition-smooth), background var(--transition-smooth);
}

.lang-selector-wrap:hover {
  border-color: var(--border-light);
  background: rgba(255, 255, 255, 0.08);
}

.lang-label {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.lang-select {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  padding: 2px 0;
}

.lang-select option {
  background: #16161c;
  color: #f5f5f7;
}

.lang-select:hover,
.lang-select:focus {
  color: var(--text-primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* Minimal Toast */
.toast-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(22, 22, 28, 0.95);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 10px 22px;
  color: var(--text-primary);
  font-size: 0.85rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: all var(--transition-smooth);
  z-index: 1000;
  pointer-events: none;
}

.toast-bar.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
