/* Main Styles for domain.com */

/* === CSS Variables === */
:root {
  --c-bg: #141726; /* Very Deep Indigo */
  --c-surface: #1b1f33; /* Charcoal Indigo */
  --c-primary: #19f7c8; /* Neon Mint */
  --c-secondary: #7a5cff; /* Electric Violet */
  --c-warm: #ff5e57; /* Warm Coral */
  --c-text: #f6f7f9; /* Off-White */
  --c-muted: #c9cdd8; /* Cool Gray */
  --c-line: rgba(255, 255, 255, 0.12); /* Dividers */

  /* Gradients */
  --g-mint: linear-gradient(135deg, #19f7c8 0%, #7a5cff 100%);
  --g-coral: linear-gradient(135deg, #ff5e57 0%, #7a5cff 100%);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* === Global Rules === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
}

body {
  font-family: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial,
    sans-serif;
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

section[id] {
  scroll-margin-top: 40px;
}

div {
  word-break: break-word;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
}

section {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  section {
    padding: 2rem 0;
  }
}

/* === Grid & Card Layout === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.card {
  background-color: var(--c-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.glass-card {
  background-color: rgba(27, 31, 51, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--c-line);
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

h2:after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--g-mint);
  margin-top: 0.5rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--c-secondary);
  text-decoration: underline;
}

ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-subtitle {
  color: var(--c-muted);
  text-align: center;
  margin: -1rem auto 2rem;
  max-width: 650px;
}

/* === Header & Navigation === */
.site-header {
  background-color: rgba(20, 23, 38, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--c-text);
  text-transform: lowercase;
  background: var(--g-mint);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-fast);
  z-index: 98; /* Вище ніж меню */
}

.logo:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.navigation-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.main-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--c-text);
  font-weight: 500;
  position: relative;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--c-primary);
}

.main-nav a:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--g-mint);
  transition: width var(--transition-fast);
}

.main-nav a:hover:after,
.main-nav a:focus:after {
  width: 100%;
}

/* Мобільне меню (тільки CSS) */
.mobile-menu-toggle {
  display: none;
  position: absolute;
  left: -9999px;
}

.mobile-menu-button {
  display: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  z-index: 1001; /* Над оверлеєм та меню */
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.mobile-menu-icon,
.mobile-menu-icon:before,
.mobile-menu-icon:after {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--c-text);
  position: relative;
  transition: all var(--transition-fast);
}

.mobile-menu-icon:before,
.mobile-menu-icon:after {
  content: "";
  position: absolute;
  left: 0;
}

.mobile-menu-icon:before {
  top: -8px;
}

.mobile-menu-icon:after {
  top: 8px;
}

/* Mobile styles */
@media (max-width: 768px) {
  .navigation-wrapper {
    order: 2;
  }

  /* Показуємо кнопку меню */
  .mobile-menu-button {
    display: flex;
  }

  /* Ховаємо навігацію за межами екрану */
  .navigation-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    z-index: 99;
    pointer-events: none;
  }

  /* Темний оверлей для всього екрану */
  .navigation-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 0;
    right: -0; /* Ховаємо праворуч */
    width: 280px;
    height: auto;
    background-color: var(--c-surface);
    padding: 5rem 1.5rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 105;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav li {
    width: 100%;
    border-bottom: 1px solid var(--c-line);
  }

  .main-nav li:last-child {
    border-bottom: none;
  }

  .main-nav a {
    display: block;
    padding: 0.5rem 0;
    font-size: 1.1rem;
  }

  /* Трансформація іконки меню при активації */
  .mobile-menu-toggle:checked + .mobile-menu-button .mobile-menu-icon {
    background-color: transparent;
  }

  .mobile-menu-toggle:checked + .mobile-menu-button .mobile-menu-icon:before {
    transform: rotate(45deg);
    top: 0;
  }

  .mobile-menu-toggle:checked + .mobile-menu-button .mobile-menu-icon:after {
    transform: rotate(-45deg);
    top: 0;
  }

  /* Показуємо меню при активації чекбоксу */
  .mobile-menu-toggle:checked ~ .navigation-wrapper {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-toggle:checked ~ .navigation-wrapper .main-nav {
    display: block;
  }

  /* Запобігання скролу боді при відкритому меню */
  body.menu-open {
    overflow: hidden;
  }
}

/* === Hero Section === */
.hero {
  min-height: 80vh;
  background-image: url("./img/phM8d.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 23, 38, 0.7),
    rgba(20, 23, 38, 0.9)
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--c-text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--c-muted);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background-color: transparent;
  white-space: nowrap;
  outline: none;
}

.btn:focus {
  box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.4);
}

.btn-primary {
  background: var(--g-mint);
  color: var(--c-bg);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 247, 200, 0.3);
  color: var(--c-bg);
  text-decoration: none;
}

.btn-outline {
  border: 2px solid var(--c-primary);
  color: var(--c-primary);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--c-primary);
  color: var(--c-bg);
  text-decoration: none;
}

/* Button animations */
.pulse-border {
  position: relative;
  overflow: hidden;
}

.pulse-border:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--c-primary);
  border-radius: var(--radius-sm);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* === Sections === */
/* Trust Indicators */
.trust-indicators {
  padding: 3rem 0;
  background-color: var(--c-surface);
}

.trust-grid {
  display: flex;
  justify-content: space-around;
  text-align: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.trust-item {
  flex: 1;
  min-width: 200px;
}

.trust-item img {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
}

/* Services */
.service-card {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-icon {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-sm);
}

.service-title {
  margin-bottom: 1rem;
  color: var(--c-primary);
  font-size: 1.25rem;
}

.service-features {
  margin: 1rem 0;
}

.service-features li {
  margin-bottom: 0.5rem;
}

.service-card .btn {
  margin-top: auto;
}

/* Industries */
.industries {
  background-color: var(--c-surface);
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.industry-item {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.05);
  transition: transform var(--transition-normal);
}

.industry-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.1);
}

.industry-item img {
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
}

/* Steps */
.steps-grid {
  counter-reset: step;
}

.step-card {
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: var(--g-mint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--c-bg);
}

.step-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

/* Benefits */
.benefits {
  background-color: var(--c-surface);
}

.benefit-card {
  padding: 1.5rem;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.benefit-card img {
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
}

.benefit-title {
  margin-bottom: 1rem;
  color: var(--c-primary);
}

/* Case Studies */
.case-card {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.case-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.metrics {
  display: flex;
  margin: 1rem 0;
  gap: 1rem;
}

.metric {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--c-primary);
}

.metric-label {
  font-size: 0.9rem;
  color: var(--c-muted);
}

/* Testimonials */
.testimonial-card {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.testimonial-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

.testimonial-text {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.testimonial-text:before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.5rem;
  font-size: 2rem;
  color: var(--c-primary);
  font-family: serif;
}

.testimonial-author {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author-name {
  font-weight: bold;
  color: var(--c-text);
}

.author-position {
  font-size: 0.85rem;
  color: var(--c-muted);
}

/* Contact */
.contact {
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-info {
  padding: 2rem;
  background-color: var(--c-surface);
  border-radius: var(--radius-md);
}

.contact-map {
  position: relative;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.contact-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Form */
.form-container {
  background-color: var(--c-surface);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--c-line);
}

.glass-form {
  background-color: rgba(27, 31, 51, 0.7);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  margin-inline: auto;
  max-width: 600px;
}

.glass-form:before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--g-mint);
  z-index: -1;
  border-radius: calc(var(--radius-md) + 2px);
  opacity: 0.7;
  filter: blur(6px);
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(25, 247, 200, 0.2);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23F6F7F9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 2rem;
}

select option {
  background-color: white;
  color: var(--c-bg);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

/* Footer */
.site-footer {
  background-color: var(--c-surface);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-heading {
  color: var(--c-primary);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 0.9rem;
}

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background-color: var(--c-surface);
  padding: 1rem 0;
  z-index: 1000;
  transition: bottom var(--transition-normal);
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.cookie-banner.visible {
  bottom: 0;
}

.cookie-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 250px;
}

/* === Thank you page === */
.thank-you {
  text-align: center;
  max-width: 600px;
  margin: 8rem auto 5rem;
  padding: 3rem 2rem;
  background-color: var(--c-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-line);
  position: relative;
  overflow: hidden;
}

.thank-you:before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--g-mint);
  z-index: -1;
  border-radius: calc(var(--radius-md) + 2px);
  opacity: 0.5;
  filter: blur(8px);
}

.thank-you h1 {
  color: var(--c-primary);
}

/* === Policy pages === */
.policy-content {
  max-width: 800px;
  margin: 2rem auto 4rem;
  background-color: var(--c-surface);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-line);
}

.breadcrumbs {
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--c-muted);
}

.breadcrumbs a {
  color: var(--c-muted);
}

.breadcrumbs span:after {
  content: "›";
  margin: 0 0.5rem;
}

.breadcrumbs span:last-child:after {
  display: none;
}

.policy-content h2 {
  margin-top: 2rem;
}

.policy-content p,
.policy-content ul {
  margin-bottom: 1rem;
}

/* === Animations === */
.shine {
  position: relative;
  overflow: hidden;
}

.shine:after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: rotate(30deg);
  transition: all 0.8s;
  opacity: 0;
}

.shine:hover:after {
  animation: shine 1.5s ease;
}

@keyframes shine {
  0% {
    left: -100%;
    opacity: 0;
  }
  20% {
    opacity: 0.2;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

.float {
  transition: transform 0.3s ease;
}

.float:hover {
  transform: translateY(-10px);
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}
