/* ZnaetAPPS Docs / Знает Приложения: Документ */
/* Universal Design System & Layout */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Theme Light */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --border-color: #E2E8F0;
  --border-focus: #3B82F6;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;

  --accent-word: #2563EB;
  --accent-sheet: #059669;
  --accent-pdf: #DC2626;
  --accent-slides: #D97706;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-main: #0F172A;
  --bg-card: #1E293B;
  --bg-subtle: #334155;
  --border-color: #334155;
  --border-focus: #60A5FA;

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;

  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-light: #1E3A8A;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  text-decoration: underline;
}

/* Header & Ecosystem Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.85);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);

}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

/* Ecosystem Links Bar */
.ecosystem-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.ecosystem-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;

}

.ecosystem-link:hover, .ecosystem-link.active {
  color: var(--primary);
  text-decoration: none;
}

.ecosystem-link.active {
  font-weight: 700;
}

/* Controls (Lang, Theme, Info) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* Hero & Main View */
.main-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem;
}

.hero-banner {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.privacy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

.pill-green {
  border-color: #10B981;
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
}

/* Standalone App Launcher Hub Grid */
.app-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.app-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.app-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.app-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-icon-word { background: rgba(37, 99, 235, 0.1); color: var(--accent-word); }
.card-icon-sheet { background: rgba(5, 150, 105, 0.1); color: var(--accent-sheet); }
.card-icon-pdf { background: rgba(220, 38, 38, 0.1); color: var(--accent-pdf); }
.card-icon-slides { background: rgba(217, 119, 6, 0.1); color: var(--accent-slides); }

.app-card-icon svg {
  width: 28px;
  height: 28px;
}

.app-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.app-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex: 1;
}

.app-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.75rem 1.25rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.app-card-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  text-decoration: none;
}

/* Office Suite Hub Tabs */
.suite-nav-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.suite-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.suite-tab:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.suite-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.suite-tab svg {
  width: 20px;
  height: 20px;
}

.suite-tab.tab-word.active { color: var(--accent-word); }
.suite-tab.tab-sheet.active { color: var(--accent-sheet); }
.suite-tab.tab-pdf.active { color: var(--accent-pdf); }
.suite-tab.tab-slides.active { color: var(--accent-slides); }

/* Work Area / Suite Panel */
.suite-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-height: 600px;
}

.suite-panel.active {
  display: flex;
  flex-direction: column;
}

/* Mobile App Announcement Card */
.android-banner {
  background: linear-gradient(135deg, #065F46 0%, #047857 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
}

.android-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.android-info p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.badge-soon {
  background: #F59E0B;
  color: #000000;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  display: inline-block;
  margin-left: 8px;
}

.android-btn {
  background: #FFFFFF;
  color: #047857;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.android-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 2rem 1.5rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

/* Modal Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.modal-body h4 {
  font-size: 1.05rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Embedded iFrame View Overrides (No duplicate header/footer inside modals) */
body.iframe-embed .site-header,
body.iframe-embed .site-footer {
  display: none !important;
}

body.iframe-embed .main-content {
  padding: 0.5rem !important;
}

body.iframe-embed .modal-card {
  box-shadow: none !important;
  border: none !important;
  max-width: 100% !important;
}

/* Responsive adjustments (MS Office Mobile Style) */
@media (max-width: 768px) {
  .site-header {
    height: 48px;
    display: flex;
    align-items: center;
  }

  .header-container {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.35rem 0.75rem !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .brand-wrapper {
    gap: 0.4rem !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    flex: 1 !important;
  }

  .brand-logo {
    width: 26px !important;
    height: 26px !important;
  }

  .brand-title {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .brand-badge {
    display: none !important;
  }

  .ecosystem-bar {
    display: none !important;
  }

  .header-controls {
    width: auto !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .lang-select {
    padding: 2px 6px !important;
    font-size: 0.75rem !important;
    height: 28px !important;
  }

  .btn-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
  }

  .hero-banner {
    padding: 1.5rem 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .suite-nav-container {
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
  }

  .android-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1rem;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
