
:root {
  --bg: #fdfefc;
  --surface: #ffffff;
  --border: #e2e8e0;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #346ab8;
  --brand-light: #4488e7;
  --brand-additional: rgba(94, 94, 95, 0.986);
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding:0;
}

body {
  font-family: opensans-ns; 
  background: var(--bg); 
  color: var(--text); 
  line-height: 1.6;
}

@font-face {
  font-family: opensans-ns;
  src: url('./fonts/OpenSansCondensedBold.woff2')
}

a {
  text-decoration: none; 
  color: var(--brand);
}

.container {
  width: min(960px, 92%); 
  margin: auto;
}

header {
  background: var(--surface); 
  border-bottom: 1px solid var(--border);
  top: 0; 
  z-index: 20;
}

.compact-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(253, 254, 252, 0.82);
  border-bottom: 1px solid rgba(226, 232, 224, 0.8);
  box-shadow: 0 4px 16px rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.compact-nav.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.compact-nav .lang-switcher {
  flex-shrink: 0;
  margin: 0;
}

.compact-nav .lang-btn {
  padding: 5px 8px;
}

.compact-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.compact-nav-links .btn {
  padding: 7px 10px;
  font-size: 14px;
}

section[id] {
  scroll-margin-top: 72px;
}

.nav {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 14px 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f3f7fb;
  border: 1px solid var(--border);
}

.lang-btn {
  appearance: none;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s ease;
}

.lang-btn.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(52,106,184,0.18);
}

.logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
}

.logo-image {
  display: block;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  object-fit: contain;
}

.logo-description {
  font-size: 12px;
  color: var(--brand-additional);
}

@media (min-width: 1025px) {
  .logo {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .logo-description {
    white-space: nowrap;
  }
}

.nav-bar {
  display: flex; 
  gap: 10px;
  justify-content: space-between;
}

.btn {
  padding: 10px 16px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: .2s;
}

.btn.primary {
  background: var(--brand); 
  color: white; border: none;
}

.btn.big {
  padding: 16px 20px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(52,106,184,0.15);
}

.btn:hover {
  box-shadow: var(--shadow); 
  background: var(--brand-light); 
  color: #fff;
}

.hero {
  display: grid; 
  gap: 50px; 
  grid-template-columns: 1fr 1fr; 
  align-items: center; 
  padding: 50px 0;
}

.hero h1 {
  font-size: 38px; 
  margin-bottom: 12px; 
  color: var(--brand);
}

.hero p {
  color: var(--muted); 
  margin-bottom: 16px;
}

/* Machine images section */
.machine-images {
  display: flex;
  gap: 0;
}

.machine-images img {
  width: 40%;
  border-radius: var(--radius); 
  box-shadow: var(--shadow);

  margin-left: -40px;
  transition: all 0.3s ease;
  position: relative;
  filter: brightness(1);

  z-index: 1;
}

.machine-images img:nth-child(1) {
  z-index: 3;
}

.machine-images img:nth-child(2) {
  z-index: 2;
}

.machine-images img:nth-child(3) {
  z-index: 1;
}

.machine-images img:hover {
  transform: scale(1);
  z-index: 10;

  filter: brightness(1.2);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* If the third image is hovered, then the first image goes below the second */
.machine-images:has(img:nth-child(3):hover) img:nth-child(1) {
  z-index: 0;
}

.section {
  padding: 50px 0;
}

.grid-3 {
  display: grid; 
  gap: 20px; 
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  display: grid; 
  gap: 20px; 
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  padding: 20px; 
  box-shadow: var(--shadow); 
  transition: .2s;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  max-width: 720px;
  width: min(720px, calc(100% - 20px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 26px;
  border-radius: 16px;
  z-index: 62;
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}

.modal-close:hover {
  background: rgba(52, 106, 184, 0.1);
  color: var(--brand);
  transform: rotate(90deg);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.92);
}

.modal-close:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.contact-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,250,250,0.9));
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  transition: transform .16s ease, box-shadow .16s ease;
}

.contact-item > div:last-child {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(20,30,60,0.08);
}

.contact-item.is-copied {
  border-color: rgba(52,106,184,0.6);
  background: linear-gradient(180deg, rgba(52,106,184,0.08), rgba(68,136,231,0.12));
}

.contact-icon {
  width:54px; height:54px; display:flex; align-items:center; justify-content:center; font-size:22px; border-radius:12px; background:linear-gradient(135deg,var(--brand),var(--brand-light)); color:#fff;
  box-shadow: 0 8px 20px rgba(52,106,184,0.12);
  flex-shrink: 0;
}

.contact-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-title { font-weight:700; font-size:15px }
.contact-sub {
  color:var(--muted);
  font-size:13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card:hover {
  border-color: var(--brand-light); 
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
}

.card h3 {
  margin-bottom: 6px; 
  font-size: 18px; 
  color: var(--brand);
}

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

form {
  display: grid; gap: 12px;
}

.input, textarea {
  padding: 10px 14px; 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  font: inherit;
}

.input:focus, textarea:focus {
  outline: none; 
  border-color: var(--brand);
}

footer {
  padding: 20px 0; 
  border-top: 1px solid var(--border); 
  text-align: center; 
  color: var(--muted);
}

footer a {
  color: inherit;
}

footer a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

@media (min-width: 741px){
  .modal-content {
    width: min(860px, calc(100% - 20px));
  }
}

@media (max-width: 740px){
  .modal-content {
    width: min(100% - 12px, 720px);
    padding: 18px 14px 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-item {
    width: 100%;
    min-width: 0;
    align-items: center;
  }

  .contact-sub {
    word-break: break-word;
  }
}

@media (max-width: 640px){
  .modal-content {
    width: min(100% - 12px, 720px);
    padding: 18px 14px 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-item {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
  }

  .contact-sub {
    word-break: break-word;
  }
}

@media (max-width: 640px){
  .compact-nav {
    gap: 8px;
    padding: 7px 8px;
  }

  .compact-nav .lang-btn {
    padding: 4px 6px;
  }

  .compact-nav-links {
    gap: 4px;
  }

  .compact-nav-links .btn {
    padding: 7px 8px;
    font-size: 13px;
  }

  .nav {
    flex-direction: column;
    gap: 10px;
  }

  .nav-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .lang-switcher {
    margin: 0 auto;
  }

  .nav-bar {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px){
  .compact-nav {
    flex-wrap: wrap;
    gap: 6px;
    row-gap: 4px;
    padding: 6px;
  }

  .compact-nav .lang-switcher {
    gap: 4px;
  }

  .compact-nav .lang-btn {
    padding: 4px 5px;
  }

  .compact-nav-links .btn {
    padding: 7px 5px;
    font-size: 12px;
  }

  .compact-nav-links {
    flex-wrap: wrap;
  }

  .nav {
    gap: 10px;
  }

  .machine-images {
    gap: 40px;
  }
  
  .machine-images img {
    margin-left: 0;
    width: 20%;
  }

  .logo {
    flex-direction: column;
    gap: 0;
  }

  .modal-close {
    right: 8px;
    top: 6px;
  }
}

@media (max-width: 800px){
  .hero, h2 {
    justify-items: center;
    text-align: center;
  }

  .nav {
    flex-direction: column;
  }

  .logo {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    text-align: center;
  }

  .machine-images {
    justify-content: center;
  }
}

@media (min-width: 641px) and (max-width: 800px) {
  .nav {
    gap: 28px;
  }
}

@media (max-width: 1024px){
  .hero {
    grid-template-columns: 1fr;
  }

  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .machine-images {
    gap: 10px;
  }

  .machine-images img {
    width: 30%;
    margin-left: 0;
  }
}

@media (min-width: 1200px) {
  .machine-images {
    gap: 10px;
  }

  .machine-images img {
    margin-left: 0;
  }
}