/* ============================================
   EVOLVE ROBOT LAB — Design System
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --border-color: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #0084d6;
  --accent-hover: #0099ff;
  --accent-dark: #006bb3;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 130px;
  --container-width: 1200px;
  --section-padding: 120px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.7;
}

/* --- Layout --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: var(--section-padding) 0;
}

.section--dark {
  background-color: var(--bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__header h2 {
  margin-bottom: 16px;
}

.section__header p {
  max-width: 600px;
  margin: 0 auto;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* --- Grid System --- */
.grid {
  display: grid;
  gap: 32px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* --- Background Slideshow --- */
.has-slideshow {
  position: relative;
  overflow: hidden;
}

.slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slideshow__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  will-change: opacity;
}

.slideshow__slide.active {
  opacity: 1;
}

.slideshow__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.slideshow__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.7) 0%,
    rgba(10, 10, 10, 0.6) 40%,
    rgba(10, 10, 10, 0.8) 100%
  );
  z-index: 1;
}

/* --- Section Showcase (full-bg clickable sections) --- */
.section-showcase {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 24px;
}

.section-showcase__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.section-showcase__content h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 20px;
}

.section-showcase__content .lead {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  margin-bottom: 40px;
}

.section-showcase__content .section__label {
  margin-bottom: 16px;
}

/* Home products slideshow should fill screen cleanly */
#platforms {
  min-height: 100vh;
}

#platforms .slideshow__slide {
  background-size: cover;
  background-position: center center;
  background-color: #070b12;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--nav-height) 24px 80px;
}

.hero--short {
  min-height: 50vh;
}

.hero__content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero__content h1 {
  margin-bottom: 24px;
}

.hero__content p {
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Stats Bar --- */
.stats-bar {
  padding: 64px 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stats-bar__item {
  padding: 16px;
}

.stats-bar__number {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  white-space: nowrap;
}

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

/* --- Split Layout --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}

.split__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #0d1117, #111827);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.split__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}

.split__content h3 {
  margin-bottom: 16px;
}

.split__content p {
  margin-bottom: 24px;
}

/* Image Placeholder */
.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Animation Base --- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-animate="fade-in"] {
  transform: translateY(0);
}

[data-animate="slide-up"] {
  transform: translateY(40px);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- WhatsApp Floating Button --- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  z-index: 1100;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
}

.whatsapp-float:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.whatsapp-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* --- Skip to Content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: 4px;
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
}
