:root {
  --bg: #f2f8f8;
  --surface: #ffffff;
  --text: #10202a;
  --muted: #48606f;
  --line: #c8d8dd;
  --brand: #0d7f79;
  --brand-strong: #07514d;
  --brand-soft: #daf3ef;
  --shadow: 0 16px 34px rgba(13, 48, 63, 0.12);
}

body.dark {
  --bg: #0d161c;
  --surface: #13222c;
  --text: #e7f3f8;
  --muted: #9eb8c6;
  --line: #2b4452;
  --brand: #3fceb9;
  --brand-strong: #84e9db;
  --brand-soft: #1a3947;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  line-height: 1.55;
  background: radial-gradient(circle at 6% 6%, #d8f5ef 0%, transparent 24%),
    radial-gradient(circle at 95% 10%, #dbe8ff 0%, transparent 30%), var(--bg);
}

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.8rem 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-links a.active {
  color: var(--text);
  background: var(--brand-soft);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.84rem;
  min-height: 40px;
  background: var(--surface);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  cursor: pointer;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.84rem;
  min-height: 40px;
  background: var(--surface);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  cursor: pointer;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  background: var(--surface);
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  line-height: 1;
  border-radius: 999px;
  padding: 0.3rem 0.46rem;
}

.lang-switch a.active {
  background: var(--brand-soft);
  color: var(--text);
}

main {
  padding-bottom: 1rem;
}

.page-hero {
  padding: 4.2rem 0 2.7rem;
}

.hero-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.kicker {
  display: inline-block;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: "IBM Plex Mono", monospace;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

h1 {
  margin: 0.65rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.lead {
  color: var(--muted);
  max-width: 60ch;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  border: 0;
  border-radius: 10px;
  padding: 0.82rem 1rem;
  min-height: 44px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #00a897);
  font-weight: 600;
  cursor: pointer;
}

.section {
  padding: 2.6rem 0;
}

.section.alt {
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--brand-soft) 60%, transparent));
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.card:hover {
  transform: scale(1.02);
  transition: transform 0.18s ease;
}

.card .portrait {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.85rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}

.staff-card .staff-text h2,
.staff-card .staff-text h3,
.staff-card .staff-text p {
  margin: 0 0 0.35rem 0;
}

.card p,
.card li,
.text-muted {
  color: var(--muted);
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.checklist,
.simple-list {
  margin: 0;
  padding-left: 1.15rem;
}

.simple-list li,
.checklist li {
  margin: 0.35rem 0;
}

.reference-list {
  margin: 0;
  padding-left: 1.2rem;
}

.reference-list li {
  margin: 0.8rem 0;
}

.reference-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.reference-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.reference-controls-grid label {
  display: grid;
  gap: 0.32rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.reference-controls-grid input,
.reference-controls-grid select {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 42px;
  padding: 0.62rem 0.75rem;
  background: var(--surface);
  color: var(--text);
}

.reference-controls-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.reference-controls-meta p {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.reference-controls-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo-slider {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
  min-height: 200px;
}

.logo-slide {
  display: none;
  gap: 1.2rem;
  align-items: center;
}

.logo-slide.is-active {
  display: flex;
}

.logo-slide img {
  width: clamp(120px, 18vw, 180px);
  max-height: 64px;
  object-fit: contain;
}

.logo-slide p {
  margin: 0;
  color: var(--muted);
}

.logo-slide p strong {
  color: var(--text);
}

.control-btn {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  cursor: pointer;
}

.control-btn.active {
  background: var(--brand-soft);
  color: var(--text);
  border-color: var(--brand);
}

.reference-group.hidden {
  display: none;
}

.reference-list li.hidden {
  display: none;
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem;
  min-height: 44px;
  background: var(--bg);
  color: var(--text);
}

.form-status {
  margin: 0;
  min-height: 1.2em;
  color: var(--brand-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.contact-map {
  margin-top: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #dfe8ec;
  box-shadow: var(--shadow);
}

.contact-map iframe {
  width: 100%;
  height: 240px;
  border: 0;
  display: block;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 1.2rem;
}

.footer-wrap {
  padding: 1.1rem 0 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  align-items: center;
}

.footer-logo {
  height: 56px;
  width: auto;
  display: block;
}

.footer-logo--dark {
  display: none;
}

body.dark .footer-logo--light {
  display: none;
}

body.dark .footer-logo--dark {
  display: block;
}

.footer-wrap a {
  color: var(--muted);
}

/* Changed back to 900px */
@media (max-width: 900px) {
  .hero-grid,
  .cards,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .reference-controls-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 40;
    width: 100%;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow);
    max-height: 68vh;
    overflow-y: auto;
  }

  .logo img {
    height: 34px;
  }

  .footer-logo {
    height: 48px;
  }

  .site-header.menu-open .nav-links {
    display: flex;
  }

  .nav-links a {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0.52rem 0.68rem;
  }

  .page-hero {
    padding: 2.7rem 0 1.9rem;
  }

  .page-hero .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-left: 0 !important;
  }
}

@media (max-width: 640px) {
  .logo-slider {
    min-height: 240px;
  }

  .logo-slide {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .staff-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.9rem;
    align-items: center;
  }

  .staff-card .portrait {
    width: 110px;
    height: 110px;
    margin: 0;
  }

  .staff-card .staff-text {
    grid-column: 2;
  }
}




@media (max-width: 640px) {
  .container {
    width: min(1120px, 94%);
  }

  .nav-wrap {
    gap: 0.55rem;
  }

  .logo {
    font-size: 1rem;
  }

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

  .theme-toggle {
    padding: 0.44rem 0.72rem;
    font-size: 0.8rem;
  }

  .lang-switch a {
    font-size: 0.72rem;
    padding: 0.3rem 0.42rem;
  }
}

.sample-map-card {
  padding: 1.2rem;
}

.sample-map-note {
  margin-top: -0.4rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
}

.sample-map {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #dfe8ec;
}

.sample-map img {
  width: 100%;
  display: block;
  height: auto;
}

.sample-hotspot {
  position: absolute;
  width: clamp(20px, 1.8vw, 30px);
  height: clamp(20px, 1.8vw, 30px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(1px);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.sample-hotspot:hover,
.sample-hotspot:focus-visible,
.sample-hotspot.is-open {
  outline: none;
  border-color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(13, 127, 121, 0.2);
}

.sample-popup {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(320px, 90vw);
  padding: 0.9rem 0.95rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, #ffffff);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 18px));
  transition: opacity 120ms ease;
  z-index: 3;
}

.sample-popup.visible {
  opacity: 1;
  pointer-events: auto;
}

.sample-popup.mobile-floating {
  position: fixed;
  left: 50% !important;
  top: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 20px));
  max-height: min(52vh, 360px);
  overflow-y: auto;
  z-index: 1000;
}

.sample-popup.below {
  transform: translate(-50%, 18px);
}

.sample-popup h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.sample-popup p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.sample-popup p strong {
  color: var(--text);
}

.sample-popup-close {
  position: absolute;
  right: 0.35rem;
  top: 0.2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 900px) {
  .sample-hotspot {
    width: 30px;
    height: 30px;
  }

  .sample-popup {
    width: min(300px, 92vw);
  }

  .sample-popup.mobile-floating {
    width: min(360px, calc(100vw - 20px));
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

.map-page {
  padding: 3rem 0;
}

.map-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  align-items: start;
}

.map-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.95rem;
  position: sticky;
  top: 84px;
}

.map-side h3 {
  margin: 0 0 0.6rem;
}

.map-info-item {
  border-left: 4px solid var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface));
  border-radius: 10px;
  padding: 0.65rem;
}

.map-info-item h4 {
  margin: 0 0 0.3rem;
}

.map-info-item p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.map-main {
  display: grid;
  gap: 0.85rem;
}

.map-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.map-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}

.map-filters {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.map-filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0.46rem 0.8rem;
  font: inherit;
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
}

.map-filter.active,
.map-filter:hover {
  color: var(--text);
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 65%, var(--line));
}

.world-map {
  width: 100%;
  min-height: 560px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.map-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem;
}

.map-metric strong {
  display: block;
  font-size: 1.28rem;
}

.map-metric span {
  color: var(--muted);
  font-size: 0.86rem;
}

.map-legend {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.map-dot-wrapper {
  background: transparent;
  border: 0;
}

.map-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.map-dot i {
  font-size: 12px;
}

.map-dot-customer {
  background: #1a5f7a;
}

.map-dot-sample {
  background: #2a9d8f;
}

.map-dot-research {
  background: #e76f51;
}

.map-popup h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.map-popup p,
.map-popup li {
  color: #4d5f6a;
  font-size: 0.86rem;
  margin: 0.22rem 0;
}

.map-popup ul {
  margin: 0.3rem 0;
  padding-left: 1rem;
}

@media (max-width: 1000px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-main {
    order: 1;
  }

  .map-side {
    position: static;
    order: 2;
  }

  .map-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .map-tools {
    grid-template-columns: 1fr;
  }

  .map-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .map-filter {
    flex: 0 0 auto;
  }

  .world-map {
    min-height: 360px;
    height: 56vh;
  }

  .map-summary {
    grid-template-columns: 1fr;
  }
}
