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

:root {
  /* Font Family */
  --font-sans:
    "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Theme Tokens - Default Light Mode */
  --color-primary-rgb: 37, 99, 235; /* #2563eb Blue */
  --color-secondary-rgb: 16, 185, 129; /* #10b981 Spring Green */

  --bg-canvas-light: #f8fafc;
  --text-canvas-light: #0f172a;
  --border-color-light: rgba(15, 23, 42, 0.08);
  --card-bg-light: rgba(255, 255, 255, 0.7);
  --navbar-bg-light: rgba(248, 250, 252, 0.8);
  --badge-bg-light: #e2e8f0;
  --badge-text-light: #475569;

  /* Theme Tokens - Dark Mode */
  --bg-canvas-dark: #090d16;
  --text-canvas-dark: #f1f5f9;
  --border-color-dark: rgba(241, 245, 249, 0.08);
  --card-bg-dark: rgba(15, 23, 42, 0.6);
  --navbar-bg-dark: rgba(9, 13, 22, 0.8);
  --badge-bg-dark: #1e293b;
  --badge-text-dark: #94a3b8;

  /* Fallback System Colors */
  --bg-canvas: var(--bg-canvas-light);
  --text-canvas: var(--text-canvas-light);
  --border-color: var(--border-color-light);
  --card-bg: var(--card-bg-light);
  --navbar-bg: var(--navbar-bg-light);
  --badge-bg: var(--badge-bg-light);
  --badge-text: var(--badge-text-light);

  /* Set color-scheme */
  color-scheme: light dark;
}

/* Dark mode class overrides */
.dark {
  --bg-canvas: var(--bg-canvas-dark);
  --text-canvas: var(--text-canvas-dark);
  --border-color: var(--border-color-dark);
  --card-bg: var(--card-bg-dark);
  --navbar-bg: var(--navbar-bg-dark);
  --badge-bg: var(--badge-bg-dark);
  --badge-text: var(--badge-text-dark);
}

/* If supported, use the modern light-dark() function */
@supports (color: light-dark(white, black)) {
  :root {
    --bg-canvas: light-dark(var(--bg-canvas-light), var(--bg-canvas-dark));
    --text-canvas: light-dark(
      var(--text-canvas-light),
      var(--text-canvas-dark)
    );
    --border-color: light-dark(
      var(--border-color-light),
      var(--border-color-dark)
    );
    --card-bg: light-dark(var(--card-bg-light), var(--card-bg-dark));
    --navbar-bg: light-dark(var(--navbar-bg-light), var(--navbar-bg-dark));
    --badge-bg: light-dark(var(--badge-bg-light), var(--badge-bg-dark));
    --badge-text: light-dark(var(--badge-text-light), var(--badge-text-dark));
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  accent-color: rgb(var(--color-primary-rgb));
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-canvas);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography Selection */
::selection {
  background-color: rgba(var(--color-primary-rgb), 0.3);
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--color-primary-rgb), 0.5);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: padding 0.3s ease;
  padding: 1.25rem 0;
  /* Force hardware acceleration / stacking layer in WebKit (Safari iOS) */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-canvas);
  letter-spacing: -0.02em;
}

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

.logo-dot {
  color: rgb(var(--color-secondary-rgb));
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-canvas);
  opacity: 0.8;
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover {
  opacity: 1;
  color: rgb(var(--color-primary-rgb));
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-canvas);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--border-color);
}

/* Toggle icon display based on active class */
.sun-icon {
  display: none;
}
.moon-icon {
  display: block;
}
.dark .sun-icon {
  display: block;
}
.dark .moon-icon {
  display: none;
}

.cta-button {
  text-decoration: none;
  background-color: rgb(var(--color-primary-rgb));
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.cta-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-canvas);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

.blur-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
}

.dark .blur-glow {
  opacity: 0.15;
}

.glow-primary {
  top: -100px;
  right: -50px;
  background-color: rgb(var(--color-primary-rgb));
}

.glow-secondary {
  bottom: -100px;
  left: -50px;
  background-color: rgb(var(--color-secondary-rgb));
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  align-self: flex-start;
  border: 1px solid var(--border-color);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.5s infinite;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    rgb(var(--color-primary-rgb)),
    rgb(var(--color-secondary-rgb))
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 550px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
  text-decoration: none;
  padding: 1rem 1.75rem;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--text-canvas);
  color: var(--bg-canvas);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary svg {
  transition: transform 0.2s ease;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-canvas);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.hero-trust {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  opacity: 0.7;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* IDE / Visual Element */
.ide-window {
  width: 100%;
  max-width: 450px;
  min-width: 0;
  background-color: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.ide-header {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ide-dots {
  display: flex;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background-color: #ef4444;
}
.dot.yellow {
  background-color: #f59e0b;
}
.dot.green {
  background-color: #10b981;
}

.ide-title {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ide-content {
  padding: 1.5rem;
  overflow: hidden;
}

.ide-content pre {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #a9b2c3;
  overflow-x: auto;
  width: 100%;
}

.keyword {
  color: #c792ea;
}
.type {
  color: #82aaff;
}
.string {
  color: #c3e88d;
}
.number {
  color: #f78c6c;
}
.literal {
  color: #ff5370;
}
.comment {
  color: #546e7a;
  font-style: italic;
}

.progress-container {
  margin-top: 1.5rem;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 75%;
  background: linear-gradient(
    90deg,
    rgb(var(--color-primary-rgb)),
    rgb(var(--color-secondary-rgb))
  );
}

/* Services Section */
.services-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-canvas);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgb(var(--color-primary-rgb));
}

.section-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--color-primary-rgb), 0.3);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
}

.dark .service-card:hover {
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: rgb(var(--color-primary-rgb));
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.service-card:hover .card-icon {
  background-color: rgb(var(--color-primary-rgb));
  color: #fff;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.card-desc {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.6;
}

.card-tech {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* About Section */
.about-section {
  padding: 6rem 0;
  background-color: var(--bg-canvas);
  border-top: 1px solid var(--border-color);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 4rem;
  align-items: center;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about-text {
  font-size: 1.1rem;
  opacity: 0.85;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgb(var(--color-primary-rgb));
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.7;
}

.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 350px;
}

.about-card-back {
  position: absolute;
  width: 80%;
  height: 80%;
  background: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.1),
    rgba(var(--color-secondary-rgb), 0.1)
  );
  border: 1px solid var(--border-color);
  border-radius: 24px;
  transform: rotate(-6deg);
  z-index: 1;
}

.about-card-front {
  position: absolute;
  width: 85%;
  height: 85%;
  background-color: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  transform: rotate(3deg);
  z-index: 2;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.about-card-front h3 {
  font-size: 1.35rem;
  font-weight: 800;
}

.principles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.principles-list li {
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.25rem;
}

.principles-list li::before {
  content: "→";
  color: rgb(var(--color-secondary-rgb));
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

/* Contact Section */
.contact-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-canvas);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-text {
  font-size: 1.1rem;
  opacity: 0.85;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.detail-item svg {
  color: rgb(var(--color-primary-rgb));
}

.contact-form-container {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group select option {
  background-color: #0b0f19;
  color: #f1f5f9;
  padding: 0.5rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgb(var(--color-primary-rgb));
}

.submit-button {
  background-color: var(--text-canvas);
  color: var(--bg-canvas);
  border: none;
  padding: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
}

.submit-button:hover {
  opacity: 0.9;
}

.form-status {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  display: none;
}

.form-status.success {
  display: block;
  color: rgb(var(--color-secondary-rgb));
}

.form-status.error {
  display: block;
  color: #ef4444;
}

/* Footer */
.footer {
  background-color: var(--bg-canvas);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-canvas);
  opacity: 0.7;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    opacity 0.2s ease,
    color 0.2s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: rgb(var(--color-primary-rgb));
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 968px) {
  .hero-section {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }

  .hero-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }

  .badge {
    align-self: center;
  }

  .hero-desc {
    margin: 0 auto;
  }

  .hero-actions {
    justify-content: center;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 1rem auto 0 auto;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-visual {
    height: 320px;
  }

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

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .navbar {
    padding: 1rem 0;
  }

  .nav-links {
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    gap: 2rem;
    transform: translateY(-200%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .cta-button {
    width: 100%;
    text-align: center;
    padding: 0.85rem;
  }

  .mobile-menu-btn {
    display: block;
    padding: 0.5rem;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .service-card {
    padding: 1.75rem;
  }

  .about-card-front {
    padding: 1.75rem;
    width: 90%;
    height: 90%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .contact-form-container {
    padding: 1.5rem;
  }
}

