:root {
  --bg-primary: #1b0a0a;
  --bg-secondary: #1e5994;
  --bg-accent: #3a127c;
  --text-primary: #117e0d;
  --text-secondary: #570c38;
  --text-muted: #1a7e75;
  --border-color: #e2e8f0;
  --accent-color: #0ea5e9;
  --accent-hover: #0284c7;
  --btn-text: #b14444;
  --card-bg: #8d0a0a;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #f1f5f9;

  --border-radius: 14px;
  --transition-speed: 0.2s;
  --container-max-width: 1200px;
  --header-height: 92px;
}

[data-theme="dark"] {
  --bg-primary: #750c15;
  --bg-secondary: #0b101a;
  --bg-accent: #0e1a3d;
  --text-primary: #62aaf1;
  --text-secondary: #f56c1c;
  --text-muted: #162d4d;
  --border-color: #7bb2ff;
  --accent-color: #38bdf8;
  --accent-hover: #0ea5e9;
  --btn-text: #ffffff;
  --card-bg: #1e293b;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --header-bg: rgba(15, 23, 42, 0.95);
  --footer-bg: #1e293b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-color);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: none;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--btn-text);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--btn-text);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-color);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background-color var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo img {
  width: 40px;
  height: 40px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.menu a {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem;
  position: relative;
}

.menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width var(--transition-speed) ease;
}

.menu a:hover::after,
.active a::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.icon-bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--text-primary);
  transition: transform var(--transition-speed) ease,
    opacity var(--transition-speed) ease;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-speed) ease;
}

.theme-toggle:hover {
  background-color: var(--bg-secondary);
}

.moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

.hero {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-text {
  flex: 1;
  min-width: 300px;
  animation: fadeInUp 1s ease-out;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  animation: fadeIn 1.5s ease-out;
}

.hero-title {
  margin-bottom: 1.5rem;
  font-size: 3rem;
  line-height: 1.1;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.features {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
}

.section-description {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-icon {
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-size: 2.5rem;
}

.card-title {
  margin-bottom: 1rem;
}

.card-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.card-link {
  margin-top: auto;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.card-link svg {
  transition: transform var(--transition-speed) ease;
}

.card-link:hover svg {
  transform: translateX(5px);
}

.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.card-features span {
  display: inline-block;
  background-color: var(--bg-accent);
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.about {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
}

.about-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.about-image {
  flex: 1;
  min-width: 300px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-title {
  margin-bottom: 1.5rem;
}

.about-description {
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-feature svg {
  color: var(--accent-color);
}

.technology {
  padding: 4rem 0;
}

.tech-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
}

.tech-text {
  flex: 1;
  min-width: 300px;
}

.tech-image {
  flex: 1;
  min-width: 300px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.tech-specs {
  margin-top: 2rem;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spec-icon {
  min-width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
}

.spec-text {
  flex: 1;
}

.spec-title {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.spec-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.testimonials {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
  height: 100%;
}

.testimonial:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-text {
  margin-bottom: 1.5rem;
  position: relative;
}

.testimonial-text::before {
  content: '"';
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.2;
  position: absolute;
  top: -1.5rem;
  left: -1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
}

.author-info {
  flex: 1;
}

.author-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-title {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.cta {
  padding: 4rem 0;
  background-color: var(--bg-accent);
  text-align: center;
}

.cta-title {
  margin-bottom: 1.5rem;
}

.cta-description {
  max-width: 700px;
  margin: 0 auto 2rem;
}

.site-footer {
  background-color: var(--footer-bg);
  padding: 4rem 0 2rem;
  color: var(--text-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-info {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-logo img {
  width: 40px;
  height: 40px;
}

.contact-info {
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.contact-item svg {
  color: var(--accent-color);
  margin-top: 3px;
}

.contact-item span {
  font-size: 0.95rem;
  line-height: 1.5;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

.social-links a:hover {
  background-color: var(--accent-color);
  color: white;
}

.footer-links h3 {
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-links h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-primary);
  transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.contact-form h3 {
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.contact-form h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
}

.form-group {
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color var(--transition-speed) ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--transition-speed) ease,
    visibility var(--transition-speed) ease,
    transform var(--transition-speed) ease,
    background-color var(--transition-speed) ease;
  z-index: 99;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: var(--accent-hover);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 1s ease-out;
}

.fade-in-up {
  animation: fadeInUp 1s ease-out;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 1rem 0;
  }

  .menu-toggle {
    display: block;
  }

  .menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--card-bg);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease;
  }

  .menu.show {
    max-height: 300px;
  }

  .menu li {
    width: 100%;
  }

  .menu a {
    display: block;
    padding: 1rem 1.5rem;
    width: 100%;
  }

  .menu a::after {
    display: none;
  }

  .menu-toggle[aria-expanded="true"] .icon-bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] .icon-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle[aria-expanded="true"] .icon-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .social-links {
    justify-content: center;
  }

  .footer-links h3,
  .contact-form h3 {
    display: block;
    text-align: center;
  }

  .footer-links h3::after,
  .contact-form h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links ul {
    text-align: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero,
  .features,
  .about,
  .technology,
  .testimonials,
  .cta {
    padding: 3rem 0;
  }
}

.feature-transition {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
  display: none;
}

.feature-transition.active {
  display: block;
  animation: fadeIn 0.5s ease-out;
}

.feature-transition::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-accent);
  z-index: -1;
  clip-path: polygon(0 0, 100% 5%, 100% 95%, 0% 100%);
}

.feature-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3rem;
}

.feature-image {
  flex: 1;
  min-width: 300px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.feature-transition.active .feature-image {
  transform: translateY(0);
  opacity: 1;
}

.feature-text {
  flex: 1;
  min-width: 300px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.6s ease 0.2s, opacity 0.6s ease 0.2s;
}

.feature-transition.active .feature-text {
  transform: translateY(0);
  opacity: 1;
}

.feature-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.feature-title::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
}

.feature-description {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.feature-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 16px;
  height: 16px;
  background-color: var(--accent-color);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.close-transition {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color var(--transition-speed) ease;
  border: none;
  z-index: 10;
}

.close-transition:hover {
  background-color: var(--bg-accent);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed) ease,
    visibility var(--transition-speed) ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}
