/* ================================================
   byteRP — Design System & Styles
   ================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  --primary-color: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --accent-color: #0ea5e9;
  --accent-dark: #0284c7;
  --accent-glow: rgba(14, 165, 233, 0.35);
  --text-color: #f8fafc;
  --text-light: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-light: #0f172a;
  --bg-dark: #020617;
  --bg-card: #1e293b;
  --white: #ffffff;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 120px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-color);
  background: var(--bg-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul { list-style: none; }

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(2, 6, 23, 0.98);
  box-shadow: var(--shadow-md);
  height: 90px;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent-color);
}

.logo-img {
  height: 90px;
  width: auto;
  display: block;
  transition: var(--transition);
}

.navbar.scrolled .logo-img {
  height: 70px;
}

.logo-img-footer {
  height: 60px;
  margin: 0 auto 16px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: 
    linear-gradient(135deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.95) 40%, rgba(30, 58, 138, 0.95) 100%),
    url('../img/logo-byterp.png') no-repeat center center;
  background-size: cover, 60%;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 82, 204, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 8s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent-color), #ffaa80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 540px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  color: var(--white);
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255, 107, 53, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ---- Services Section ---- */
.services-section {
  padding: 120px 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

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

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 36px 28px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
  display: block;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 12px;
}

.card p {
  color: var(--text-light);
  font-size: 0.92rem;
  flex-grow: 1;
  margin-bottom: 20px;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: var(--transition);
}

.card:hover .card-btn {
  color: var(--accent-color);
  gap: 10px;
}

/* ---- Detail Sections ---- */
.detail-section {
  padding: 100px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-section:nth-child(even) {
  background: var(--bg-light);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-header .detail-icon {
  font-size: 2.4rem;
}

.detail-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: -0.5px;
}

.detail-content p {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 720px;
  margin-bottom: 40px;
  line-height: 1.85;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  padding: 20px 24px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.detail-section:nth-child(even) .feature-item {
  background: var(--bg-card);
}

.feature-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.feature-item .check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
  margin-top: 2px;
}

.feature-item span {
  font-size: 0.95rem;
  color: var(--text-color);
  font-weight: 500;
}

/* ---- About Section ---- */
.about-section {
  padding: 120px 0;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-light));
  color: var(--white);
}

.about-section .section-header h2 {
  color: var(--white);
}

.about-section .section-header p {
  color: rgba(255, 255, 255, 0.6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.stat-number {
  font-size: 2.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-color), #ffaa80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* ---- Contact Section ---- */
.contact-section {
  padding: 120px 0;
  background: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.contact-item .icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item div strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.contact-item div span {
  color: var(--text-color);
  font-weight: 500;
}

.contact-form {
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-color);
  transition: var(--transition);
  background: var(--bg-dark);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: var(--bg-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  justify-content: center;
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Form feedback messages */
.form-feedback {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.feedback-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
}

.feedback-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Footer ---- */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 48px 0 32px;
  text-align: center;
}

.footer .logo {
  margin-bottom: 16px;
  display: inline-block;
}

.footer p {
  font-size: 0.85rem;
}

/* ---- Scroll-to-top Button ---- */
.scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 999;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ---- Animations ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger cards */
.cards-grid .card:nth-child(2) { transition-delay: 0.1s; }
.cards-grid .card:nth-child(3) { transition-delay: 0.2s; }
.cards-grid .card:nth-child(4) { transition-delay: 0.3s; }

/* ---- Responsive ---- */
/* Tablets and small laptops */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    gap: 32px;
  }
}

/* Smartphones and tablets (portrait) */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.5rem;
    width: 100%;
    text-align: center;
    padding: 16px;
  }

  .logo-img {
    height: 60px;
  }

  .hero { 
    min-height: 90vh; 
    padding-top: 80px; 
  }

  .hero h1 { 
    font-size: 2.2rem; 
  }
  
  .hero p {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .hero-buttons { 
    flex-direction: column; 
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
}

/* Small Smartphones */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .services-section,
  .about-section,
  .contact-section {
    padding: 60px 0;
  }

  .detail-section { padding: 48px 0; }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .card {
    padding: 24px 20px;
  }

  .contact-form { 
    padding: 24px 20px; 
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .detail-header h2 {
    font-size: 1.6rem;
  }
}
