:root {
  color-scheme: light;
}

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

html,
body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  color: #333132;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.site-header {
  position: relative;
  z-index: 10;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 clamp(20px, 4vw, 48px);
  background-color: #ffffff;
  border-bottom: 2px solid #333132;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #333132;
}

.site-brand__logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

.site-brand__name {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-brand__page {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ebb41c;
  margin-left: -6px;
}

.page-blank {
  flex: none;
  width: 100%;
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  background-color: #ffffff;
}

/* ==========================================================================
   Catalog Pages (Lab — Research projects / Factory — Business use cases)
   ========================================================================== */

.catalog-page {
  flex: 1;
  width: 100%;
  background-color: #ffffff;
  padding: clamp(40px, 6vw, 76px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 88px);
}

.catalog-container {
  max-width: 1120px;
  margin: 0 auto;
}

.catalog-hero {
  padding-bottom: clamp(24px, 3.5vw, 40px);
  border-bottom: 2px solid #333132;
}

.catalog-hero__eyebrow {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ebb41c;
  margin-bottom: 10px;
}

.catalog-hero__title {
  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #333132;
  margin-bottom: 14px;
}

.catalog-hero__lead {
  font-size: clamp(0.98rem, 1.3vw, 1.15rem);
  font-weight: 600;
  line-height: 1.5;
  color: rgba(51, 49, 50, 0.68);
  max-width: 60ch;
}

.catalog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: clamp(24px, 3.5vw, 36px);
}

.catalog-item {
  position: relative;
  display: block;
  padding: clamp(22px, 2.8vw, 30px) clamp(20px, 3vw, 32px);
  background-color: #ffffff;
  border: 2px solid #333132;
  border-radius: 16px;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.catalog-item:hover {
  border-color: #ebb41c;
  background-color: rgba(235, 180, 28, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(235, 180, 28, 0.45);
}

.catalog-item__num {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ebb41c;
  padding-top: 4px;
}

.catalog-item__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalog-item__title {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #333132;
  transition: color 0.2s ease;
}

.catalog-item:hover .catalog-item__title {
  color: #1c1b1b;
}

.catalog-item__desc {
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  font-weight: 600;
  line-height: 1.55;
  color: rgba(51, 49, 50, 0.72);
  max-width: 64ch;
}

.catalog-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.catalog-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border: 1.5px solid rgba(51, 49, 50, 0.32);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #333132;
  background-color: #ffffff;
}

.catalog-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

.catalog-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border: 2px solid #333132;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #333132;
  background-color: #ffffff;
  white-space: nowrap;
}

.catalog-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ebb41c;
}

.catalog-status--blue .catalog-status__dot {
  background-color: #82c3e1;
}

.catalog-cta-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding-top: clamp(32px, 4.5vw, 48px);
}

.catalog-cta-bar__text {
  font-size: clamp(0.96rem, 1.25vw, 1.08rem);
  font-weight: 600;
  color: #333132;
}

/* ==========================================================================
   Team Page (Squad & External Collaborators — Longitudinal Portrait Cards)
   ========================================================================== */

.team-section + .team-section {
  margin-top: clamp(48px, 6.5vw, 80px);
}

.team-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
  gap: 24px;
  margin-top: clamp(24px, 3.5vw, 36px);
}

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #ffffff;
  border: 2px solid #333132;
  border-radius: 16px;
  transition:
    border-color 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.team-card:hover {
  border-color: #ebb41c;
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -14px rgba(235, 180, 28, 0.45);
}

.team-card__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #f7f7f6;
  border-bottom: 2px solid #333132;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.team-card__placeholder {
  width: 72px;
  height: 72px;
  color: rgba(51, 49, 50, 0.28);
}

.team-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px 24px;
}

.team-card__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #333132;
}

.team-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  background-color: #ebb41c;
  color: #333132;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  white-space: nowrap;
}

.team-card__role {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ebb41c;
  margin-bottom: 4px;
}

.team-card__desc {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.5;
  color: rgba(51, 49, 50, 0.72);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
}

.lang-switch {
  position: relative;
}

.lang-switch__btn {
  height: 34px;
  min-width: 48px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: #ffffff;
  border: 2px solid #333132;
  color: #333132;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.lang-switch__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 14px;
  flex: none;
}

.lang-switch__flag svg {
  width: 20px;
  height: 14px;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(51, 49, 50, 0.14);
}

.lang-switch__arrow {
  width: 11px;
  height: 11px;
  flex: none;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.lang-switch.is-open .lang-switch__arrow {
  transform: rotate(180deg);
}

.lang-switch__btn:hover,
.lang-switch.is-open .lang-switch__btn {
  border-color: #ebb41c;
  color: #ebb41c;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 132px;
  background-color: #ffffff;
  border: 2px solid #333132;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 30;
}

.lang-switch.is-open .lang-switch__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-switch__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: #333132;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switch__option + .lang-switch__option {
  border-top: 1px solid rgba(51, 49, 50, 0.14);
}

.lang-switch__option:hover {
  background-color: rgba(235, 180, 28, 0.12);
  color: #333132;
}

.lang-switch__option.is-active {
  color: #ebb41c;
}

.menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 2px solid #333132;
  color: #333132;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle[aria-expanded="true"] {
  border-color: #ebb41c;
  color: #ebb41c;
}

.menu-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: #333132;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 4px 0;
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: #ebb41c;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: #ebb41c;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.split {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: calc(100vh - 68px);
  height: calc(100dvh - 68px);
}

.split::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background-color: #333132;
  pointer-events: none;
  z-index: 1;
}

.side {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ebb41c;
}

.side__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: #ffffff;
}

.side__bg::before,
.side__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.side__bg::after {
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.side--lab {
  background-color: #ffffff;
}

.side--lab .side__bg::before {
  background-image: url("assets/bg-lab-gray.jpg");
}

.side--lab .side__bg::after {
  background-image: url("assets/bg-lab-gold.jpg");
}

.side--factory {
  background-color: #ffffff;
}

.side--factory .side__bg::before {
  background-image: url("assets/bg-factory-gray.jpg");
}

.side--factory .side__bg::after {
  background-image: url("assets/bg-factory-gold.jpg");
}

.side:hover .side__bg::after,
.side:has(:focus-visible) .side__bg::after,
.side.is-active .side__bg::after {
  opacity: 1;
}

.side__title {
  position: relative;
  z-index: 1;
  font-size: clamp(2.4rem, 5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  transform: translateY(-7vh);
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.side:hover .side__title,
.side:has(:focus-visible) .side__title,
.side.is-active .side__title {
  opacity: 0;
  transform: translateY(calc(-7vh - 10px));
  pointer-events: none;
}

.side__hover {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 2;
  width: min(76%, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 12px));
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.side:hover .side__hover,
.side:has(:focus-visible) .side__hover,
.side.is-active .side__hover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.side__text {
  font-size: clamp(0.98rem, 1.3vw, 1.15rem);
  font-weight: 600;
  line-height: 1.55;
  color: #333132;
}

.side__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  background-color: #ebb41c;
  color: #333132;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(235, 180, 28, 0.32);
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.2s ease,
    box-shadow 0.25s ease;
}

.side__cta:hover {
  background-color: #f3bf2c;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(235, 180, 28, 0.45);
}

.logo-center {
  position: absolute;
  top: 38%;
  left: 50%;
  height: clamp(200px, 34vh, 320px);
  aspect-ratio: 814 / 1068;
  transform: translate(-9.89%, -7.58%);
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

.bottle-rig {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 9.89% 7.58%;
  transform: rotate(34.01deg);
  will-change: transform;
}

.bottle-liquid,
.bottle-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bottle-frame {
  object-fit: contain;
}

.site-footer {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px clamp(20px, 4vw, 48px);
  background-color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(51, 49, 50, 0.55);
}

@media (max-width: 768px) {
  .site-header {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }

  .site-brand__logo {
    width: 30px;
    height: 30px;
  }

  .site-brand__name {
    font-size: 0.96rem;
  }

  .site-brand__page {
    margin-left: -6px;
    font-size: 0.96rem;
  }

  .site-header__right {
    gap: 8px;
  }

  .menu-toggle {
    display: inline-flex;
    width: 30px;
    height: 30px;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: #ffffff;
    border-top: 2px solid #333132;
    border-bottom: 2px solid #333132;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition:
      opacity 0.22s ease,
      transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 25;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 13px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(51, 49, 50, 0.12);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .site-nav a::after {
    display: none;
  }

  .lang-switch__btn {
    height: 30px;
    min-width: 42px;
    padding: 0 5px;
    gap: 4px;
  }

  .lang-switch__flag,
  .lang-switch__flag svg {
    width: 17px;
    height: 12px;
  }

  .site-footer {
    padding: 18px 14px;
    font-size: 0.76rem;
  }

  .page-blank {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
  }

  .catalog-item {
    padding: 18px 18px;
    border-radius: 14px;
  }

  .catalog-cta-bar {
    align-items: center;
  }

  .team-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 340px;
  }

  .split {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    touch-action: pan-y;
  }

  .split::after {
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
  }

  .side {
    align-items: flex-start;
    padding: 0 10px;
    -webkit-tap-highlight-color: transparent;
  }

  /* On touch screens, rely strictly on .is-active (not sticky :hover) */
  .side:hover .side__bg::after {
    opacity: 0;
  }

  .side:hover .side__title {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .side:hover .side__hover {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-50% + 10px));
  }

  .side.is-active .side__bg::after {
    opacity: 1;
  }

  .side.is-active .side__title {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  .side.is-active .side__hover {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
  }

  .side--lab,
  .side--factory {
    padding: 0 10px;
  }

  .side__title {
    margin-top: 28vh;
    font-size: clamp(1.35rem, 6vw, 2.2rem);
    text-align: center;
    transform: none;
  }

  .side__hover {
    position: absolute;
    left: 50%;
    top: 30%;
    width: 88%;
    gap: 12px;
  }

  .side--lab .side__hover,
  .side--factory .side__hover {
    top: 30%;
  }

  .side__text {
    font-size: clamp(0.76rem, 3.1vw, 0.9rem);
    line-height: 1.4;
  }

  .side__cta {
    padding: 8px 16px;
    font-size: 0.78rem;
  }

  .logo-center {
    top: 52%;
    height: clamp(115px, 21vh, 165px);
  }
}
