/* ==========================================================
   DREAMWORLD SOFTWARE – Premium Dark Theme
   Following Vercel Web Interface Guidelines
   ========================================================== */

:root {
  /* Core Palette */
  --bg-primary: #060913;
  --bg-secondary: #0c1020;
  --bg-card: rgba(12, 16, 32, 0.6);
  --bg-glass: rgba(6, 9, 19, 0.8);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(99, 102, 241, 0.4);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  /* Accent */
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --accent-glow-strong: rgba(99, 102, 241, 0.3);
  --gradient-accent: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);

  /* Typography */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Radius */
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;

  /* Timing */
  --speed: 0.3s;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }

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

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--speed) var(--ease);
}
.skip-link:focus { top: 20px; }

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.accent-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 20px 0;
  background: transparent;
  z-index: 100;
  transition: background-color var(--speed) var(--ease),
              backdrop-filter var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              padding var(--speed) var(--ease);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom-color: var(--border-subtle);
  padding: 14px 0;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  color: var(--accent);
  font-size: 1.5rem;
}
.logo-text { color: var(--text-primary); letter-spacing: -0.04em; }
.logo-accent { color: var(--accent); }

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--speed) var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }

.btn-nav {
  padding: 10px 24px !important;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill) !important;
  color: var(--accent-light) !important;
  transition: background-color var(--speed) var(--ease),
              transform var(--speed) var(--ease) !important;
}
.btn-nav:hover {
  background: rgba(99, 102, 241, 0.2) !important;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--speed) var(--ease), opacity var(--speed);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              background-color var(--speed) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
  background: var(--accent-light);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
  padding-bottom: 60px;
}

.hero-video {
  position: absolute;
  top: 50%; left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
  opacity: 0.85; /* Increased opacity */
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.04) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(6,9,19,0.05) 0%, rgba(6,9,19,0.3) 60%, var(--bg-primary) 100%);
  z-index: 1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 3;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) forwards;
  animation-delay: 0.3s;
}

.badge-wrapper { margin-bottom: 32px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-pill);
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.hero-title {
  font-size: clamp(3.2rem, 8vw, 5.5rem);
  margin-bottom: 28px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 640px;
  margin-inline: auto;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}
.stat-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s infinite;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section-padding { padding: 140px 0; }

.section-header {
  margin-bottom: 80px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
}

/* =====================================================
   SERVICES
   ===================================================== */
.services {
  background: 
    radial-gradient(circle at 80% 20%, var(--accent-glow) 0%, transparent 40%),
    var(--bg-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  transition: transform var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease);
  cursor: default;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.1) 50%, transparent 90%);
}

.card-glow {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 2;
}

.service-card:hover .card-glow { opacity: 1; }

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4),
              0 0 0 1px var(--border-hover);
}

.service-icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.service-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.service-card:hover .service-image {
  transform: scale(1.05);
}

.service-content {
  padding: 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.card-arrow {
  margin-top: 24px;
  color: var(--accent-light);
  font-size: 1.4rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--speed) var(--ease),
              transform var(--speed) var(--ease);
}
.service-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* =====================================================
   HISTORY
   ===================================================== */
.history {
  background:
    radial-gradient(circle at 20% 80%, var(--accent-glow) 0%, transparent 40%),
    var(--bg-primary);
}

.history-flex {
  display: flex;
  align-items: center;
  gap: 100px;
}

.history-visual {
  flex: 1;
  position: relative;
}

/* Image Container */
.history-image-container {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.history-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,9,19,0.8) 0%, transparent 50%);
  pointer-events: none;
}

.history-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 1s var(--ease);
}

.history-visual:hover .history-image {
  transform: scale(1.05);
}

.floating-box {
  position: absolute;
  bottom: -30px; right: -30px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  animation: float 6s ease-in-out infinite;
  z-index: 5;
}

.big-number {
  font-size: 4rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -0.05em;
}

.small-text {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.history-text { flex: 1; }

.history-text .section-tag { display: block; }

.history-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  font-weight: 500;
}

.feature-check {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 50%;
  color: var(--accent-light);
  flex-shrink: 0;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--bg-secondary);
  padding-top: 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-cta {
  text-align: center;
  padding: 100px 0 80px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 80px;
}

.footer-cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.footer-cta p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 80px;
}

.footer-brand { max-width: 320px; }
.footer-logo { margin-bottom: 20px; }

.footer-tagline {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 0.95rem;
}

.footer-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-col {
  font-style: normal;
}

.footer-col p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.contact-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--speed);
}
.contact-link:hover { color: var(--text-primary); }

.footer-bottom {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* =====================================================
   ANIMATIONS & UTILITIES
   ===================================================== */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

@keyframes scroll-pulse {
  0% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.5); }
  100% { opacity: 1; transform: scaleY(1); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .history-flex { flex-direction: column; gap: 60px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .floating-box { right: 10px; bottom: -20px; }
  .hero-stats { gap: 40px; }
}

@media (max-width: 768px) {
  .section-padding { padding: 80px 0; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .floating-box { display: none; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .hero-actions { flex-direction: column; align-items: center; }
}
