:root {
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --accent-strong: #0ea5e9;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 20px 35px rgba(15, 23, 42, 0.85);
  --transition-fast: 0.2s ease;
  --transition-med: 0.3s ease;
}

/* THEME: DARK (default) */
body.theme-dark {
  --bg: #020617;
  --bg-alt: #020617;
  --bg-card: #020617;
  --bg-muted: #020617;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
}

/* THEME: LIGHT */
body.theme-light {
  --bg: #f3f4f6;
  --bg-alt: #ffffff;
  --bg-card: #f9fafb;
  --bg-muted: #e5e7eb;
  --text-main: #0f172a;
  --text-muted: #6b7280;
  --border-subtle: #d1d5db;
}

/* nice light background */
body.theme-light {
  background: radial-gradient(circle at top, #e0f2ff 0, #f9fafb 45%, #e5e7eb 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f172a 0, var(--bg) 45%, #000 100%);
  color: var(--text-main);
  transition: background 0.4s ease, color 0.3s ease;
}

/* Layout */

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

/* PRELOADER */

#preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #0f172a, #020617 55%, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.preloader-inner {
  text-align: center;
  animation: float 2.6s ease-in-out infinite;
}

.preloader-logo {
  width: 120px;
  max-width: 45vw;
  margin-bottom: 10px;
}

.preloader-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.preloader-bar {
  width: 180px;
  max-width: 60vw;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 1);
  margin: 0 auto;
}

.preloader-progress {
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(to right, #38bdf8, #0ea5e9);
  animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(40%);
  }
  100% {
    transform: translateX(120%);
  }
}

/* Header / Nav */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.97),
    rgba(15, 23, 42, 0.9),
    transparent
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.7);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.theme-light .header {
  background: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0.98),
    rgba(249, 250, 251, 0.94),
    transparent
  );
  border-bottom-color: rgba(209, 213, 219, 0.9);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
}

/* Logo */

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 64px; /* bigger logo */
  height: auto;
  object-fit: contain;
}

body.theme-light .logo-img {
  filter: drop-shadow(0 2px 4px rgba(148, 163, 184, 0.7));
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.logo-sub-text {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Nav */

.nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  border-radius: 12px;
  transition: width var(--transition-fast);
}

.nav a:hover {
  color: var(--text-main);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle */

.theme-toggle {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.2s ease,
    border-color 0.25s ease, color 0.25s ease;
}

body.theme-light .theme-toggle {
  background: #f9fafb;
  color: #0f172a;
  border-color: #d1d5db;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

/* Nav CTA */

.nav-cta {
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: radial-gradient(circle at top left, #38bdf8, #0f172a);
  color: #0b1120;
  padding: 8px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 14px 40px rgba(56, 189, 248, 0.35);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 55px rgba(56, 189, 248, 0.45);
  background: radial-gradient(circle at top left, #0ea5e9, #0f172a);
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Hero */

.hero {
  padding: 70px 0 60px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 36px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 3vw + 1rem, 2.8rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-subtitle {
  color: var(--text-muted);
  margin-bottom: 18px;
  max-width: 480px;
}

.hero-dynamic {
  margin-bottom: 22px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.dynamic-text {
  font-weight: 600;
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 8px;
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

/* Buttons */

.btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(to right, #38bdf8, #0ea5e9);
  color: #0b1120;
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.4);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 60px rgba(56, 189, 248, 0.5);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
}

body.theme-light .btn.ghost {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--accent);
}

body.theme-light .btn.ghost:hover {
  background: #e5f6ff;
}

.btn.full {
  width: 100%;
}

/* Hero Stats */

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
}

.hero-stats > div {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.75);
}

body.theme-light .hero-stats > div {
  background: #f9fafb;
  border-color: #e5e7eb;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.stat-number {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

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

/* Hero Card */

.hero-card {
  background: radial-gradient(circle at top, #0b1120, #020617 50%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15, 23, 42, 0.85);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
}

body.theme-light .hero-card {
  background: radial-gradient(circle at top, #ffffff, #e5f3ff 60%);
  border-color: #d1e6ff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 10% 0,
    rgba(56, 189, 248, 0.25),
    transparent 45%
  );
  opacity: 0.9;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
}

.card-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  font-size: 0.9rem;
}

.card-list li {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.9);
  margin-bottom: 8px;
}

body.theme-light .card-list li {
  background: rgba(249, 250, 251, 0.95);
  border-color: #e5e7eb;
}

.card-list li:last-child {
  margin-bottom: 0;
}

.card-footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Floating animation for hero card */
.floating-card {
  animation: float 4.5s ease-in-out infinite;
}

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

/* Sections */

.section {
  padding: 40px 0;
}

.section.muted {
  background: radial-gradient(circle at top, #020617, #020617 55%, #000 100%);
}

body.theme-light .section.muted {
  background: #f3f4f6;
}

.section-header {
  text-align: center;
  margin-bottom: 26px;
}

.section-header h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

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

/* Services */

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

.service-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 16px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  transition: transform var(--transition-med),
    box-shadow var(--transition-med), border-color var(--transition-med),
    background var(--transition-med);
  font-size: 0.9rem;
}

body.theme-light .service-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at top, #020617, #020617 55%);
}

body.theme-light .service-card:hover {
  background: #eff6ff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.service-icon {
  font-size: 1.6rem;
  margin-bottom: 5px;
}

.service-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

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

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 26px;
  align-items: flex-start;
}

.about-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.highlight {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 14px;
  font-size: 0.9rem;
}

.highlight.secondary {
  background: rgba(15, 23, 42, 0.9);
}

body.theme-light .highlight,
body.theme-light .highlight.secondary {
  background: #ffffff;
  border-color: #e5e7eb;
}

.highlight h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.highlight ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  color: var(--text-muted);
}

.highlight li {
  margin-bottom: 4px;
}

.highlight li:last-child {
  margin-bottom: 0;
}

/* Testimonials */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.testimonial-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 16px 18px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.9rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    border-color 0.3s ease, background 0.3s ease;
}

body.theme-light .testimonial-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.7);
}

body.theme-light .testimonial-card:hover {
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.18);
  background: #eff6ff;
}

.testimonial-quote {
  color: var(--text-main);
  margin-bottom: 10px;
}

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

.testimonial-name {
  font-weight: 600;
  display: block;
}

/* FAQ */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

body.theme-light .faq-item {
  background: #ffffff;
  border-color: #e5e7eb;
}

.faq-question {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  cursor: pointer;
}

.faq-icon {
  margin-left: 8px;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.faq-answer {
  padding: 0 14px 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 250px;
  opacity: 1;
  padding: 0 14px 10px;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 24px;
}

.contact-text h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.contact-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-info {
  margin-top: 14px;
  font-size: 0.9rem;
}

.contact-info p {
  margin: 4px 0;
}

.contact-info a {
  color: var(--accent-strong);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Contact form */

.contact-form {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 18px 16px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.85);
  font-size: 0.9rem;
}

body.theme-light .contact-form {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
}

.form-row {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

input,
select,
textarea {
  border-radius: 10px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background var(--transition-fast),
    color 0.2s ease;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #0f172a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.98);
}

body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus {
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.form-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */

.footer {
  padding: 18px 0 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.85);
  background: rgba(2, 6, 23, 0.98);
}

body.theme-light .footer {
  background: #f9fafb;
  border-top-color: #e5e7eb;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-left {
  max-width: 60%;
}

.footer-small {
  margin-top: 2px;
}

.footer-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-follow-label {
  font-size: 0.8rem;
}

.footer-social {
  display: flex;
  gap: 6px;
}

.social-icon {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease;
}

.social-icon:hover {
  background: var(--accent);
  color: #0b1120;
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

/* Reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Responsive */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    max-width: 360px;
    margin: 0 auto;
  }

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

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

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
    position: absolute;
    top: 54px;
    right: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 16px;
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
    flex-direction: column;
    gap: 8px;
  }

  body.theme-light .nav {
    background: #f9fafb;
    border-color: #e5e7eb;
  }

  .nav.show {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding-top: 54px;
  }

  .services-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-left {
    max-width: 100%;
  }

  .footer-right {
    width: 100%;
    justify-content: flex-start;
  }
}
