/* DEC — Deutsche Engineering Consultants
   Clean, corporate engineering aesthetic. Refine colors/spacing against
   _extracted/<page>/screenshot.png to match the current Wix design. */

/* Original DEC brand fonts (Kabel Demi/Medium BT), self-hosted from the live site. */
@font-face {
  font-family: "Kabel Demi";
  src: url("/fonts/kabel-demi.woff2") format("woff2"), url("/fonts/kabel-demi.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Kabel Medium";
  src: url("/fonts/kabel-medium.woff2") format("woff2"), url("/fonts/kabel-medium.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --color-bg: #ffffff;
  --color-fg: #536173;          /* DEC slate (matches Wix rgb(83,97,115)) */
  --color-muted: #767f8c;
  --color-accent: #536173;      /* DEC slate */
  --color-accent-2: #1f8fb0;    /* teal accent */
  --color-line: #e3e8ee;
  --color-soft: #f1f3f5;
  --maxw: 1140px;
  --radius: 6px;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-head: "Kabel Demi", "Mulish", "Helvetica Neue", Arial, sans-serif;
  --font-head-med: "Kabel Medium", "Mulish", "Helvetica Neue", Arial, sans-serif;
  --font-num: "Mulish", "Helvetica Neue", Arial, sans-serif; /* Avenir-heavy substitute for figures */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;               /* Helvetica Light — matches the original body */
  color: var(--color-fg);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1.25rem;             /* 20px base, as on the Wix site */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; font-weight: 400; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; color: var(--color-fg); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 78px; width: auto; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.main-nav ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.main-nav a { color: var(--color-fg); font-weight: 400; font-size: 0.9375rem; }
.main-nav a.active { color: var(--color-accent); font-weight: 600; }
.lang-switcher { display: flex; gap: 0.4rem; font-size: 0.85rem; }
.lang-switcher .lang { padding: 0.15rem 0.4rem; border-radius: 4px; color: var(--color-muted); }
.lang-switcher .lang.active { background: var(--color-accent); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--color-fg); }

/* ---------- Banner ---------- */
.banner {
  background-size: cover; background-position: center; min-height: 240px;
  display: flex; align-items: center;
}
.banner-overlay {
  width: 100%; background: linear-gradient(rgba(20, 34, 56, 0.55), rgba(20, 34, 56, 0.55));
  color: #fff; padding: 3.5rem 1.25rem; text-align: center;
}
.banner-overlay h1 { font-family: var(--font-head); font-weight: 400; font-size: clamp(1.9rem, 4.2vw, 2.85rem); letter-spacing: 0.01em; margin: 0; }
.banner-overlay .locations { font-family: var(--font-head-med); letter-spacing: 0.22em; margin: 1rem 0 0; font-size: clamp(1.05rem, 2.2vw, 1.55rem); opacity: 0.95; }

/* ---------- Tagline ---------- */
.tagline { padding: 3rem 1.25rem 2.5rem; text-align: center; }
.tagline-inner {
  max-width: 900px; margin: 0 auto; border-bottom: 2px solid rgba(83, 97, 115, 0.5); padding-bottom: 1.75rem;
  font-family: var(--font-head); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 400;
  color: var(--color-accent); line-height: 1.4;
}
.tagline-inner h2, .tagline-inner p { font: inherit; color: inherit; margin: 0; }

/* ---------- Intro two-column ---------- */
.intro { padding: 2rem 1.25rem 3.5rem; }
.intro-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch;
}
.intro-text {
  background: var(--color-accent); color: #fff; padding: 2.5rem 2rem; border-radius: 2px;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.intro-text p {
  font-family: var(--font-head-med); font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem); line-height: 1.35; margin: 0 0 1.5rem;
}
.intro-text p:last-child { margin-bottom: 0; }
.intro-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: #fff; color: var(--color-accent);
  padding: 0.7rem 1.4rem; border-radius: var(--radius); font-weight: 600;
  border: 0; cursor: pointer; font-size: 1rem;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.hero .btn { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); }

/* ---------- Stats ---------- */
.stats { background: var(--color-accent); color: #fff; padding: 2.5rem 1.25rem; }
.stats-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center;
}
.stat-value { display: block; font-family: var(--font-num); font-size: clamp(2.6rem, 5vw, 3.75rem); font-weight: 800; color: #f7f7f7; line-height: 1.1; }
.stat-label { display: block; font-family: var(--font-head); font-weight: 400; color: rgba(255, 255, 255, 0.9); font-size: clamp(1.1rem, 1.7vw, 1.375rem); margin-top: 0.45rem; }

/* ---------- Competencies ---------- */
.competencies { padding: 3.5rem 1.25rem; }
.competencies-inner { max-width: var(--maxw); margin: 0 auto; }
.competencies h2, .clients h2 {
  font-family: var(--font-head); font-weight: 400; color: var(--color-accent);
  text-align: center; font-size: clamp(1.8rem, 3.8vw, 2.6rem); margin: 0 0 2.25rem;
}
.clients h2 { text-transform: uppercase; letter-spacing: 0.03em; }
.competencies ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem;
}
.competencies li {
  position: relative; overflow: hidden; min-height: 150px;
  background: var(--color-soft); background-size: cover; background-position: center;
  border: 1px solid var(--color-line); border-radius: var(--radius);
}
.competencies li::before { content: ""; position: absolute; inset: 0; background: rgba(83, 97, 115, 0.55); transition: background 0.2s; }
.competencies li:hover::before { background: rgba(83, 97, 115, 0.35); }
.competencies li a {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 150px; text-align: center; padding: 1rem; text-decoration: none;
}
.competencies li span {
  font-family: var(--font-body); font-weight: 700;
  font-size: clamp(1.15rem, 1.7vw, 1.44rem); color: #fff; line-height: 1.2;
}
.client-cell a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ---------- Home body & generic content ---------- */
.home-body { padding: 3.5rem 1.25rem; }
.home-body-inner { max-width: 820px; margin: 0 auto; }
.page { padding: 3.5rem 1.25rem 4.5rem; background: var(--color-soft); }
.page-inner { max-width: 820px; margin: 0 auto; }
.page-inner h1 {
  font-family: var(--font-head); font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.8rem); text-align: center; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--color-accent); margin: 0 0 2rem;
  padding-bottom: 1.25rem; border-bottom: 2px solid rgba(83, 97, 115, 0.45);
}
.page-content { font-size: 1.25rem; line-height: 1.65; font-weight: 300; }
.subtitle { color: var(--color-muted); font-size: 1.3rem; margin-top: -0.75rem; text-align: center; }
.page-content h2, .page-content h3 {
  font-family: var(--font-head); font-weight: 400; color: var(--color-accent);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); text-transform: uppercase; letter-spacing: 0.04em;
  margin: 2.75rem 0 1.25rem;
}
.page-content h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.page-content strong { font-weight: 700; }
.page-content a { font-weight: 400; }
.page-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-date { color: var(--color-muted); font-size: 0.9rem; }

/* ---------- Legal pages (imprint / privacy) ---------- */
.page.legal .page-content { font-size: 1rem; line-height: 1.6; }
.page.legal .page-content h2 {
  font-family: var(--font-body); font-weight: 700; color: var(--color-fg);
  font-size: 1.2rem; text-transform: none; letter-spacing: 0; margin: 2rem 0 0.6rem;
}
.page.legal .page-content h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; text-transform: none; letter-spacing: 0; margin: 1.5rem 0 0.5rem; }
.page.legal .page-inner h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page.legal .page-content ul { padding-left: 1.2rem; }
/* two-column office blocks (imprint) */
.office-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.office-cols .office-col { font-size: 1rem; line-height: 1.65; }
.office-cols .office-col p:first-child { font-weight: 700; margin-top: 0; }
@media (max-width: 640px) { .office-cols { grid-template-columns: 1fr; } }

/* ---------- Text-box-beside-image layout (mission-model etc.) ---------- */
.textbox-wrap { max-width: var(--maxw); margin: 0 auto; }
.page-title {
  font-family: var(--font-head); font-weight: 400; text-align: center; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--color-accent); font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0 0 2rem; padding-bottom: 1.25rem; border-bottom: 2px solid rgba(83, 97, 115, 0.45);
}
.textbox-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; margin-bottom: 1.5rem; }
.textbox-text {
  background: var(--color-accent); color: #fff; padding: 2.5rem; border-radius: 2px;
  display: flex; flex-direction: column; justify-content: center;
  font-family: var(--font-head-med); font-weight: 400; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.45;
}
.textbox-text p { margin: 0 0 1.1rem; }
.textbox-text p:last-child { margin-bottom: 0; }
.textbox-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
@media (max-width: 760px) { .textbox-row { grid-template-columns: 1fr; } }

/* ---------- References card grid ---------- */
.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem 1.5rem; }
.ref-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 2px; }
.ref-body { padding-top: 0.9rem; }
.ref-card h3 {
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; color: var(--color-fg);
  margin: 0 0 0.35rem; line-height: 1.3; text-transform: none; letter-spacing: 0;
}
.ref-card p { font-size: 0.9rem; line-height: 1.5; margin: 0; color: var(--color-fg); }
.ref-note { margin-top: 2.5rem; font-size: 0.9rem; color: var(--color-muted); }
@media (max-width: 820px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .ref-grid { grid-template-columns: 1fr; } }

/* ---------- Galleries ---------- */
.gallery { margin: 2.5rem 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-grid img { width: 100%; height: auto; border-radius: var(--radius); }
.gallery-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.gallery-stack img { width: 100%; border-radius: var(--radius); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

.contact-banner { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin-bottom: 2.5rem; }

/* ---------- Contact offices ---------- */
.contact-offices { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 1.5rem 0 2.5rem; }
.contact-offices .office { background: var(--color-soft); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 1.75rem; text-align: center; }
.contact-offices .office, .contact-offices .office p, .contact-offices .office a { font-family: var(--font-head-med); font-weight: 400; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.5; }
.contact-offices .office h3 { font-family: var(--font-head-med); margin: 0 0 1rem; color: var(--color-accent); font-size: clamp(1.5rem, 2.8vw, 1.9rem); }
@media (max-width: 700px) { .contact-offices { grid-template-columns: 1fr; } }

/* ---------- Clients ---------- */
.clients { background: var(--color-soft); padding: 3.5rem 1.25rem; }
.clients-inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.client-logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 2.5rem; margin-top: 2rem;
}
.client-logos img { max-height: 48px; width: auto; filter: grayscale(1); opacity: 0.7; }
.client-logos img:hover { filter: none; opacity: 1; }
/* Home 3-column client-logo grid (KEY CLIENT PROJECTS) */
.client-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 1.5rem;
  max-width: 860px; margin: 2.5rem auto 0;
}
.client-cell { display: flex; align-items: center; justify-content: center; min-height: 96px; }
.client-cell img { max-height: 84px; max-width: 70%; width: auto; filter: grayscale(1) opacity(0.6); }
@media (max-width: 600px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Blog list ---------- */
.post-list { list-style: none; padding: 0; }
.post-item { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--color-line); }
.post-thumb { width: 180px; height: 120px; object-fit: cover; border-radius: var(--radius); }
.post-meta h2 { margin: 0 0 0.25rem; font-size: 1.3rem; }

/* ---------- Forms ---------- */
.contact-form { display: grid; gap: 1rem; max-width: 560px; margin-top: 2rem; }
.contact-form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
.contact-form input, .contact-form textarea {
  font: inherit; padding: 0.65rem 0.75rem; border: 1px solid var(--color-line);
  border-radius: var(--radius); background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--color-accent-2); border-color: var(--color-accent-2);
}
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form .btn { background: var(--color-accent); color: #fff; justify-self: start; }
.form-status { font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #1a7a3c; }
.form-status.err { color: #b3261e; }
.scheduler-embed { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-fg); color: #cbd3df; padding: 2.5rem 1.25rem; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center;
}
.footer-contact { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-contact a, .footer-nav a { color: #d3d9e1; }
.footer-contact a { font-size: 1.15rem; }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a { font-size: 1rem; }
.copyright { margin: 0 0 0 auto; font-size: 1.15rem; color: #aeb7c4; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; margin-left: auto; }
  .header-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: flex-start; gap: 1rem; background: #fff; padding: 1.25rem;
    border-bottom: 1px solid var(--color-line); display: none;
  }
  .header-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0.75rem; }
  .post-item { flex-direction: column; }
  .post-thumb { width: 100%; height: auto; }
  .copyright { margin: 0; }
}

/* Taiwan: LINE contact button + note */
.tw-contact-note { background: var(--color-soft); border: 1px solid var(--color-line); border-left: 4px solid #06C755; border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0 2rem; }
.line-btn { display: inline-flex; align-items: center; gap: 0.6rem; background: #06C755; color: #fff; font-weight: 700; padding: 0.6rem 1.25rem; border-radius: 999px; margin-top: 0.75rem; }
.line-btn:hover { text-decoration: none; opacity: 0.92; }
.line-mark { background: #fff; color: #06C755; font-weight: 800; border-radius: 5px; padding: 0.05rem 0.4rem; font-size: 0.85rem; }
.line-note { font-size: 0.9rem; color: var(--color-muted); margin: 0.75rem 0 0; }
