:root {
  --white: #ffffff;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #007bca;
  --primary-dark: #005a96;
  --accent: #0ea5e9;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius: 12px;
  --header-h: 72px;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-head: 'Outfit', system-ui, sans-serif;
  --max-w: 1140px;
  --prose-w: 720px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: min(100% - 2rem, var(--max-w));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  margin-right: 0.75rem;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lang-btn:hover {
  color: var(--primary);
  border-color: rgba(0, 123, 202, 0.35);
}

.lang-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  justify-content: flex-end;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: rgba(0, 123, 202, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  margin-top: var(--header-h);
  background: var(--white) url('../images/bg-hero.jpg') center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(244, 247, 251, 0.80) 45%,
    rgba(255, 255, 255, 0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0 4rem;
  max-width: 720px;
}

.hero-tagline {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 123, 202, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(0, 123, 202, 0.4);
}

.btn-outline {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Service cards */
.services-strip {
  padding: 0 0 4rem;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 123, 202, 0.35);
  color: inherit;
}

.service-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
}

.service-card h3 {
  font-family: var(--font-head);
  font-size: 1.125rem;
  margin: 0.5rem 0 0.35rem;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Content sections */
.content-section {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.83);
}

.section-it .section-bg { background-image: url('../images/bg-it.jpg'); }
.section-security .section-bg { background-image: url('../images/bg-security.jpg'); }
.section-web .section-bg { background-image: url('../images/bg-web.jpg'); }
.section-cnc .section-bg { background-image: url('../images/bg-cnc.jpg'); }

.section-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-inner > .section-label,
.section-inner > h2,
.section-inner > .prose {
  width: 100%;
  max-width: var(--prose-w);
  text-align: left;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.content-section h2 {
  font-family: var(--font-head);
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1.75rem;
  color: var(--text);
}

.prose {
  max-width: var(--prose-w);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose em {
  color: var(--text);
  font-style: italic;
}

.prose strong {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--white) 0%, #eef4fa 100%);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.footer-logo {
  height: 36px;
  width: auto;
  margin: 0 auto 0.75rem;
  object-fit: contain;
}

.footer-tagline {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  text-align: left;
}

.footer-col-left {
  text-align: right;
}

.footer-col p {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.footer-col a {
  font-weight: 500;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Contact page */
.page-hero {
  position: relative;
  margin-top: var(--header-h);
  padding: 4rem 0 3rem;
  background: var(--white) url('../images/bg-security.jpg') center / cover no-repeat;
}

.contact-page .page-hero {
  padding: 1.75rem 0 1rem;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.86) 0%,
    rgba(244, 247, 251, 0.82) 100%
  );
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-page .page-hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 0.4rem;
}

.contact-page .hero-tagline {
  margin-bottom: 0.4rem;
}

.page-hero-lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.contact-page .page-hero-lead {
  font-size: 1rem;
  margin-bottom: 0;
}

.contact-section {
  padding: 3rem 0 5rem;
}

.contact-page .contact-section {
  padding: 0.75rem 0 3rem;
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-form {
  width: 100%;
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
}

.contact-page .contact-form {
  gap: 0.65rem 1rem;
  padding: 1.35rem 1.5rem;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  padding-right: 0.25rem;
}

.form-label-full {
  grid-column: 1 / -1;
  justify-content: flex-start;
  text-align: left;
  padding-right: 0;
  margin-top: 0.5rem;
}

.form-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 202, 0.15);
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-textarea {
  min-height: 12rem;
  resize: vertical;
  line-height: 1.6;
}

.contact-page .form-textarea {
  min-height: 7.5rem;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.contact-page .form-actions {
  padding-top: 0.25rem;
}

.contact-page .form-label-full {
  margin-top: 0.15rem;
}

.form-message {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
}

.form-message-ok {
  color: #059669;
}

.form-message-error {
  color: #dc2626;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.status-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.status-modal.is-open {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.status-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.status-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.status-modal-dialog.form-message-ok {
  border-top: 4px solid #059669;
}

.status-modal-dialog.form-message-error {
  border-top: 4px solid #dc2626;
}

.status-modal-title {
  font-family: var(--font-head);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.status-modal-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.status-modal-dialog.form-message-ok .status-modal-text {
  color: #047857;
}

.status-modal-dialog.form-message-error .status-modal-text {
  color: #b91c1c;
}

.status-modal-btn {
  min-width: 120px;
  justify-content: center;
}

/* Responsive */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .lang-switch {
    margin-right: 0.25rem;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .services-strip {
    margin-top: -1rem;
  }

  .prose {
    padding: 1.5rem;
  }

  .section-bg {
    background-attachment: scroll;
  }

  .footer-contact {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
  }

  .footer-col-left {
    text-align: center;
  }

  .contact-form {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .form-label {
    justify-content: flex-start;
    text-align: left;
  }
}
