/* ==========================================================================
   base.css — Shared styles for all sysinit.at pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (Light Mode Defaults)
   -------------------------------------------------------------------------- */

:root {
  --primary-color: #0f172a;
  --secondary-color: #1e293b;
  --accent-color: #c82829;
  --accent-gradient: linear-gradient(135deg, #c82829 0%, #e74c3c 100%);
  --accent-color-icons: #4a6da7;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --muted-color: #64748b;
  --text-color: #334155;
  --light-bg: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --header-bg: rgba(255, 255, 255, 0.8);
  --header-shadow: rgba(0, 0, 0, 0.05);
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --gradient-mesh: radial-gradient(at 0% 0%, rgba(200, 40, 41, 0.05) 0px, transparent 50%),
                   radial-gradient(at 100% 0%, rgba(74, 109, 167, 0.08) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
}

/* --------------------------------------------------------------------------
   2. Dark Mode Overrides
   -------------------------------------------------------------------------- */

[data-theme="dark"] {
  --primary-color: #f1f5f9;
  --secondary-color: #e2e8f0;
  --accent-color: #f43f5e;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  --accent-color-icons: #60a5fa;
  --accent-blue: #60a5fa;
  --accent-purple: #a78bfa;
  --muted-color: #94a3b8;
  --text-color: #cbd5e1;
  --light-bg: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
  --header-bg: rgba(15, 23, 42, 0.8);
  --header-shadow: rgba(0, 0, 0, 0.2);
  --gradient-mesh: radial-gradient(at 0% 0%, rgba(244, 63, 94, 0.1) 0px, transparent 50%),
                   radial-gradient(at 100% 0%, rgba(96, 165, 250, 0.12) 0px, transparent 50%),
                   radial-gradient(at 100% 100%, rgba(167, 139, 250, 0.1) 0px, transparent 50%);
}

/* --------------------------------------------------------------------------
   3. CSS Reset
   -------------------------------------------------------------------------- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background: var(--gradient-mesh);
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

/* --------------------------------------------------------------------------
   4. Links
   -------------------------------------------------------------------------- */

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #0284c7;
}

/* --------------------------------------------------------------------------
   5. Container
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

header {
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px var(--header-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
}

.logo:hover {
  color: var(--primary-color);
}

.logo-svg {
  height: auto;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo-divider {
  color: var(--muted-color);
  font-weight: 300;
}

.logo-product {
  font-family: var(--font-display);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --------------------------------------------------------------------------
   7. Navigation
   -------------------------------------------------------------------------- */

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

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

nav a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Controls (theme toggle)
   -------------------------------------------------------------------------- */

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-color);
  position: relative;
  transition: all 0.3s ease;
  background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.sun-icon,
.moon-icon {
  position: absolute;
  transition: all 0.3s ease;
}

.sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

.moon-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="dark"] .sun-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

[data-theme="dark"] .moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

/* --------------------------------------------------------------------------
   9. Language Selector
   -------------------------------------------------------------------------- */

.language-selector {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.language-selector a {
  color: var(--muted-color);
  padding: 0.3rem 0.5rem;
  text-decoration: none;
  transition: color 0.3s;
}

.language-selector a.active {
  color: var(--accent-color);
}

.language-selector a:hover {
  color: var(--primary-color);
}

.language-divider {
  color: var(--muted-color);
  margin: 0 0.1rem;
}

/* --------------------------------------------------------------------------
   10. Section Header
   -------------------------------------------------------------------------- */

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--muted-color);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */

footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand .logo-svg {
  opacity: 0.9;
}

.footer-brand .logo-text {
  color: rgba(255, 255, 255, 0.9);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-by {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-by a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

.footer-by a:hover {
  color: white;
}

/* --------------------------------------------------------------------------
   12. Back to Top
   -------------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(200, 40, 41, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(200, 40, 41, 0.4);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

/* --------------------------------------------------------------------------
   13. Responsive — Shared rules (header, nav, back-to-top, footer)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .header-content {
    position: relative;
    flex-wrap: wrap;
  }

  .mobile-menu-btn {
    display: block;
    order: 3;
  }

  .header-controls {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
  }

  nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: all 0.3s ease;
    opacity: 0;
  }

  nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }

  nav ul {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }

  nav a::after {
    display: none;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   14. Reduced Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  /* Disable transitions that cause movement (hover lifts, slides) */
  .expertise-item,
  .feature-card,
  .contact-item,
  .tier-card,
  .back-to-top,
  .hero-cta,
  .cta-button,
  .btn-primary,
  .btn-secondary,
  .footer-links a {
    transition: none !important;
  }

  /* Disable scroll-triggered entrance animations */
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
