:root {
  color-scheme: light dark;
  --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-bg: #f3f7fb;
  --color-surface: #ffffff;
  --color-text: #0b1d33;
  --color-muted: #4b5a73;
  --color-primary: #1f7aec;
  --color-primary-dark: #1150a3;
  --color-accent: #ffd25d;
  --shadow-soft: 0 15px 45px rgba(11, 29, 51, 0.12);
  --border-radius: 18px;
  --max-width: 1200px;
  --header-bg: rgba(243, 247, 251, 0.85);
  --header-border: rgba(11, 29, 51, 0.08);
  --hero-gradient: linear-gradient(145deg, rgba(31,122,236,0.12), rgba(255,210,93,0.15));
}

body[data-theme='dark'] {
  --color-bg: #050b16;
  --color-surface: #0f1b2d;
  --color-text: #f4f7ff;
  --color-muted: #a0b5d8;
  --color-primary: #7ab8ff;
  --color-primary-dark: #5a95d6;
  --shadow-soft: 0 15px 45px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(5, 11, 22, 0.85);
  --header-border: rgba(255, 255, 255, 0.08);
  --hero-gradient: linear-gradient(145deg, rgba(122, 184, 255, 0.12), rgba(255, 210, 93, 0.1));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-base);
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  transition: padding 0.3s ease;
}

.brand .logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

.brand .tagline {
  margin: 0.2rem 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 1.2rem;
  font-weight: 500;
}

.main-nav a {
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.main-nav a:focus-visible,
.main-nav a:hover {
  color: var(--color-primary);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switch {
  display: inline-flex;
  background: var(--color-surface);
  border-radius: 999px;
  padding: 0.2rem;
  box-shadow: var(--shadow-soft);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.theme-toggle::before,
.theme-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: opacity 0.25s ease;
}

.theme-toggle::before {
  background: #ffb347;
  box-shadow: 0 0 10px rgba(255, 179, 71, 0.8);
  opacity: 1;
}

body[data-theme='dark'] .theme-toggle::before {
  opacity: 0;
}

.theme-toggle::after {
  background: #c7d2f5;
  clip-path: circle(35% at 65% 35%);
  opacity: 0;
}

body[data-theme='dark'] .theme-toggle::after {
  opacity: 1;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--hero-gradient);
  border-radius: 32px;
  box-shadow: var(--shadow-soft);
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0.5rem 0 1.5rem;
  background: linear-gradient(to right, var(--color-text), var(--color-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-text); /* Fallback */
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 25px rgba(31, 122, 236, 0.35);
}

.btn.primary:disabled {
  background: var(--color-primary-dark);
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.ghost {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}

.btn:hover:not(:disabled),
.btn:focus-visible {
  transform: translateY(-2px);
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.hero-card {
  background: var(--color-surface);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.hero-card .stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hero-card .label {
  color: var(--color-muted);
}

.hero-card .value {
  font-size: 1.8rem;
  font-weight: 700;
}

.section {
  margin-top: 4rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  font-weight: 600;
}

.section-subtitle {
  color: var(--color-muted);
}

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

.card,
.projects-grid article,
.expertise-grid article,
.trust-grid article {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(127, 127, 127, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.projects-grid article:hover,
.expertise-grid article:hover,
.trust-grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.card h3,
.projects-grid h3,
.expertise-grid h3,
.trust-grid h3 {
  margin-top: 0;
}

.card ul {
  padding-left: 1.1rem;
  color: var(--color-muted);
}

.trust {
  margin-top: 3rem;
}

.cta {
  margin-top: 4rem;
  padding: 2.5rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cta .btn.primary {
  background: #fff;
  color: var(--color-primary);
  box-shadow: none;
}

form {
  display: grid;
  gap: 1.2rem;
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

label span {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(11, 29, 51, 0.2);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  color: var(--color-text);
}

body[data-theme='dark'] input,
body[data-theme='dark'] select,
body[data-theme='dark'] textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--color-text);
}

textarea {
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

.form-status {
  min-height: 1.5rem;
  font-weight: 600;
}

.form-status.error {
  color: #e35c5c;
}

.form-status.success {
  color: #2f9e62;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
  color: var(--color-muted);
}

.site-footer a {
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .main-nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .hero,
  form {
    padding: 1.5rem;
  }

  .site-header {
    position: static;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }
}
