:root {
  --bg-main: #0f1115;
  --bg-alt: #161a22;
  --bg-hover: #1b2030;
  --text-main: #e6e8eb;
  --text-muted: #a0a6b3;
  --accent: #5fa8ff;
  --border-soft: #262b36;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
}

body.dark {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3 {
  line-height: 1.3;
  margin-top: 0;
}

h1 {
  font-size: 2.4rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

p {
  color: var(--text-muted);
  max-width: 720px;
}

section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Language switch */
.lang-switch {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 0.9rem;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg-main));
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.site-logo {
  display: block;
  margin: 0 auto 2rem;
  width: 60%;
  max-width: 360px;
  height: auto;
  opacity: 0.95;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.hero p {
  margin: 0 auto;
}

/* Services */
.services article {
  background-color: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1.8rem;
  color: var(--text-main);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.services article:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background-color: var(--bg-hover);
  box-shadow: 0 0 0 1px rgba(95,168,255,0.4);
}

.services ul {
  padding-left: 1.2rem;
}

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

/* Footer / contact */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  border-top: 1px solid var(--border-soft);
  text-align: left;
}

/* CTA button */
.cta-button {
  margin-top: 1.5rem;
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.cta-button:hover {
  background: var(--accent);
  color: #0f1115;
}

/* Modal */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.contact-modal.open {
  display: flex;
}

.contact-modal-content {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.contact-modal-content label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.contact-modal-content input,
.contact-modal-content textarea {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  border-radius: 4px;
  resize: vertical;
  max-height: 200px;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ========================= */
/* Mobile adjustments */
/* ========================= */

@media (max-width: 768px) {

  /* Typography */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  p {
    font-size: 0.95rem;
  }

  /* Hero */
  .hero {
    padding: 4rem 1.25rem 3.5rem;
    text-align: left;
  }

  .site-logo {
    width: 80%;
    max-width: 420px;
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    margin-bottom: 1rem;
  }

  /* Sections */
  section {
    padding: 3rem 1.25rem;
  }

  /* Services grid */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .services article {
    padding: 1.5rem;
  }

  /* Language switch */
  .lang-switch {
    position: static;
    text-align: right;
    margin: 1rem 1.25rem 0;
  }

  /* Footer */
  footer {
    padding: 2.5rem 1.25rem 3rem;
  }
  
  .cta-button {
    width: 100%;
    text-align: center;
  }
  
  /* Modal */
  .contact-modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}
