/* ============================================
   Rodsan Innovative Solutions - Website Styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --primary-mint: #7FFFD4;
  --primary-teal: #20B2AA;
  --background-navy: #0A1628;
  --dark-blue: #0F1E33;
  --accent-light-teal: #5CE1E6;
  --accent-cyan: #38B2AC;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7FFFD4, #20B2AA);
  --gradient-hero-bg: linear-gradient(180deg, #0A1628 0%, #0F1E33 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(127, 255, 212, 0.3), rgba(32, 178, 170, 0.1));

  /* Spacing */
  --section-padding: 5rem 0;
  --container-max: 1200px;
  --container-padding: 0 1.5rem;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.6;

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 40px rgba(32, 178, 170, 0.15);
  --shadow-glow: 0 0 20px rgba(127, 255, 212, 0.15);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-secondary);
  background-color: var(--background-navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

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

.section {
  padding: var(--section-padding);
  position: relative;
}

.section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section__label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary-mint);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-primary);
  color: var(--background-navy);
  border-color: transparent;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(127, 255, 212, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--primary-mint);
  border-color: var(--primary-mint);
}

.btn--outline:hover {
  background: rgba(127, 255, 212, 0.1);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn__icon {
  transition: transform var(--transition-fast);
}

.btn:hover .btn__icon {
  transform: translateX(4px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar--scrolled {
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 0;
  box-shadow: 0 1px 0 rgba(127, 255, 212, 0.08);
}

.navbar__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
}

.navbar__logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.navbar__brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.navbar__brand-accent {
  color: var(--primary-mint);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
  border-radius: 1px;
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--text-primary);
}

.navbar__link.active::after,
.navbar__link:hover::after {
  width: 100%;
}

.navbar__cta {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.navbar__hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.navbar__hamburger.active .navbar__hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.active .navbar__hamburger-line:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.active .navbar__hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem 3rem;
  background: var(--gradient-hero-bg);
}

/* Video Background */
.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.4;
}

/* Dark Overlay for Text Readability */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 22, 40, 0.7) 0%,
    rgba(15, 30, 51, 0.85) 50%,
    rgba(10, 22, 40, 0.9) 100%
  );
  z-index: 1;
}

/* Circuit Board Background Pattern */
.hero__bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 2px 2px, var(--primary-teal) 1px, transparent 1px),
    linear-gradient(90deg, transparent 49.5%, rgba(32, 178, 170, 0.3) 49.5%, rgba(32, 178, 170, 0.3) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(32, 178, 170, 0.3) 49.5%, rgba(32, 178, 170, 0.3) 50.5%, transparent 50.5%);
  background-size:
    40px 40px,
    80px 80px,
    80px 80px;
  animation: patternDrift 30s linear infinite;
  z-index: 2;
}

@keyframes patternDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(40px, 40px); }
}

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

.hero__tagline {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary-mint);
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero__subheadline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero__cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 4;
  cursor: pointer;
  transition: color var(--transition-base);
}

.hero__scroll-indicator:hover {
  color: var(--primary-mint);
}

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

/* ---------- Services ---------- */
.services {
  background: var(--background-navy);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  background: var(--dark-blue);
  border: 1px solid rgba(127, 255, 212, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(127, 255, 212, 0.2);
  box-shadow: var(--shadow-card-hover);
}

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

.service-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(127, 255, 212, 0.06);
  border: 1px solid rgba(127, 255, 212, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.service-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.service-card__description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---------- How It Works ---------- */
.how-it-works {
  background: var(--dark-blue);
}

.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 800px;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  width: 100%;
  padding: 1.5rem;
  background: rgba(10, 22, 40, 0.5);
  border: 1px solid rgba(127, 255, 212, 0.08);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.step:hover {
  border-color: rgba(127, 255, 212, 0.2);
  box-shadow: var(--shadow-glow);
}

.step__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--background-navy);
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
}

.step__content {
  flex: 1;
}

.step__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.step__description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.step__connector {
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, var(--primary-mint), var(--primary-teal));
  opacity: 0.3;
  margin: 0 auto;
}

/* ---------- About ---------- */
.about {
  background: var(--background-navy);
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}

.about__image-wrapper {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  padding: 4px;
  background: var(--gradient-primary);
  margin: 0 auto;
}

.about__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--background-navy);
}

.about__text p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.about__text p:first-child {
  font-size: 1.05rem;
}

.about__achievements {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(127, 255, 212, 0.1);
}

.achievement {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.achievement svg {
  flex-shrink: 0;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--dark-blue);
}

.contact__content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact__text {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact__cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(127, 255, 212, 0.06);
  background: var(--background-navy);
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer__logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Scroll Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   RESPONSIVE - Tablet (641px+)
   ============================================ */
@media (min-width: 641px) {
  .section__title {
    font-size: 2.5rem;
  }

  .hero__headline {
    font-size: 3.25rem;
  }

  .hero__logo {
    width: 160px;
    height: 160px;
  }

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

  .about__content {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }

  .about__image {
    flex-shrink: 0;
  }

  .about__image-wrapper {
    width: 260px;
    height: 260px;
  }

  .steps {
    gap: 0;
  }
}

/* ============================================
   RESPONSIVE - Desktop (1025px+)
   ============================================ */
@media (min-width: 1025px) {
  :root {
    --section-padding: 6rem 0;
  }

  .section__title {
    font-size: 2.75rem;
  }

  .hero__headline {
    font-size: 3.75rem;
  }

  .hero__logo {
    width: 180px;
    height: 180px;
  }

  /* 5 cards: 3 top row, 2 bottom row centered */
  .services__grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .service-card:nth-child(1) { grid-column: 1 / 3; }
  .service-card:nth-child(2) { grid-column: 3 / 5; }
  .service-card:nth-child(3) { grid-column: 5 / 7; }
  .service-card:nth-child(4) { grid-column: 2 / 4; }
  .service-card:nth-child(5) { grid-column: 4 / 6; }

  .about__image-wrapper {
    width: 300px;
    height: 300px;
  }

  .about__content {
    gap: 4rem;
  }

  .navbar__cta {
    display: inline-flex;
  }
}

/* ============================================
   RESPONSIVE - Large Desktop (1440px+)
   ============================================ */
@media (min-width: 1440px) {
  :root {
    --container-max: 1280px;
  }

  .hero__headline {
    font-size: 4rem;
  }
}

/* ============================================
   RESPONSIVE - Mobile (<641px)
   ============================================ */
@media (max-width: 640px) {
  .navbar__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--dark-blue);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right var(--transition-base);
    border-left: 1px solid rgba(127, 255, 212, 0.1);
    z-index: 1000;
  }

  .navbar__links.active {
    right: 0;
  }

  .navbar__link {
    font-size: 1.1rem;
  }

  .navbar__cta {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .hero {
    padding: 5rem 1.25rem 3rem;
    min-height: calc(100vh - 2rem);
  }

  .hero__headline {
    font-size: 2rem;
  }

  .hero__subheadline {
    font-size: 1rem;
  }

  .hero__tagline {
    font-size: 0.8rem;
  }

  .hero__video {
    opacity: 0.25;
  }

  .hero__scroll-indicator {
    bottom: 1.5rem;
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: center;
  }

  .btn--lg {
    padding: 0.9rem 1.75rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .section__header {
    margin-bottom: 2.5rem;
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact__cta-group {
    flex-direction: column;
    align-items: center;
  }

  .about__image-wrapper {
    width: 180px;
    height: 180px;
  }
}

/* ---------- Body scroll lock for mobile menu ---------- */
body.menu-open {
  overflow: hidden;
}
